Variable in C language

A variable in C language As we have seen before, an entity that can vary during program execution is called a variable. Variable names are names given to locations in memory. These locations can contain integers, real, or character constants. In any language, the types of variables it can support depend on the types of … Read more Variable in C language

Control Instructions in C language

As the name suggests “Control instructions”, it allows us to specify the order in which the different instructions in a program will be executed by the computer. In other words, the control instructions determine the “control flow” in a program. There are four types of Control Instructions in C. These are: Sequence control instructions Instructions … Read more Control Instructions in C language

Compilation and Execution

Compilation and Execution | After you have written the program, you must type it and train the machine to execute it. To type C, you need another program called Editor. After the program has been typed, it must be converted into the machine language (0s and 1s) before the machine can execute it. To perform … Read more Compilation and Execution

Instructions in C languages

Now that we have written a few programs, let’s look at the instructions we used in these programs. There are basically three types of instructions in C: Type Declaration Instruction Arithmetic Instruction Control Instruction The purpose of each of these instructions is set out below: Type declaration instruction To declare the type of variables used … Read more Instructions in C languages

Constants in C language

Constants in C language can be divided into two major categories: Primary Constants Secondary Constants These constants are further classified as shown in Figure At this stage we restricted only the primary discussions Constants, that is, whole constants, real and character. Let us see the details of each of these constants. For their construction different … Read more Constants in C language

Hierarchy of Operations in C language

While executing an arithmetic statement, which has two or more operators, we may have some problems with how it is executed exactly. For example, does the expression 2 * x – 3 * y correspond to (2x) – (3y) or 2 (x-3y)? Similarly, A / B * C correspond to A / (B * C) … Read more Hierarchy of Operations in C language

Associativity of Operators in C language

When an expression contains two operators with equal priority, the connection between them is established using the operators’ association. The associativity can be of two types – from left to right or from right to left. Left associative right means that the left operand must be unambiguous. Without ambiguity in what sense? It should not … Read more Associativity of Operators in C language