with Example C Programs
Subject and UNIT: Programming in C: Unit I (c): Decision Control and Looping Statements
The conditional branching statements help to jump from one part of the program to another depending on whether a particular condition is satisfied or not.
Programming in C
Subject and UNIT: Programming in C: Unit I (c): Decision Control and Looping Statements
Till now we know that the code in a C program is executed sequentially from the first line of the program to its last line, i.e., the second statement is executed after the first, the third statement is executed after the second, and so on.
Syntax with Example C Programs
Subject and UNIT: Programming in C: Unit I (b): Introduction to C
Till now we have assumed that all the expressions involved data of the same type. But what happens when expressions involve two different data types, like multiplying a floating point number and an integer.
Syntax with Example C Programs
Subject and UNIT: Programming in C: Unit I (b): Introduction to C
An operator is a symbol that specifies the mathematical, logical, or relational operation to be performed. C language supports different types of operators, which can be used with variables and constants to form expressions.
Syntax with Example C Programs
Subject and UNIT: Programming in C: Unit I (b): Introduction to C
Before performing input and output in C programs let us first understand the concept from scratch. This section deals with the basic understanding of the streams involved in accepting input and printing output in C programs.
C Program
Subject and UNIT: Programming in C: Unit I (b): Introduction to C
Constants are identifiers whose values do not change. While values of variables can be changed at any time, values of constants can never be changed.
C Program
Subject and UNIT: Programming in C: Unit I (b): Introduction to C
A variable is defined as a meaningful name given to a data storage location in computer memory. When using a variable, we actually refer to address of the memory where the data is stored.
C Program
Subject and UNIT: Programming in C: Unit I (b): Introduction to C
C language provides very few basic data types.lists the basic data types, their size, range, and usage for a C programmer on a 16-bit computer.
C Program
Subject and UNIT: Programming in C: Unit I (b): Introduction to C
Identifiers, as the name suggests, help us to identify data and other objects in the program. Identifiers are basically the names given to program elements such as variables, arrays, and functions.
C Program
Subject and UNIT: Programming in C: Unit I (b): Introduction to C
Like every computer language, C has a set of reserved words often known as keywords that cannot be used as an identifier.
C Program
Subject and UNIT: Programming in C: Unit I (b): Introduction to C
Like in natural languages, computer languages also use a character set that defines the fundamental units used to represent information.
C Program
Subject and UNIT: Programming in C: Unit I (b): Introduction to C
Tokens are the basic building blocks in C language. You may think of a token as the smallest individual unit in a C program.