Category: C Language

Function Declaration in C Language

Function Declaration in C Language: (1) In this blog we will see how to declare Function in C Language. (2) It is recommended for optimizing the code. It should be advisable to write separate function definitions and function declarations. (3) You can add as many parameters as you want. (4) Sample C language code and its …

Continue Statement in C Language

Continue Statement in C Language: (1) The continue is another jump statement like the break statement as both the statements skip over a part of the code. But the continue statement is somewhat different from the break. Instead of forcing termination, it forces the next iteration of the loop to take place, skipping any code in …

Break Statement in C language

Break Statement in C language: (1) The break statement enables a program to skip over part of the code. A break statement terminates the smallest enclosing while, do-while, for or switch statement. Execution resumes at the statement immediately following the body of the terminated statement. (2) Sample C language code and its output, as shown: #include …

Assignment Operators in C Language

Assignment Operators in C Language: (1) Assignment Operators are used for assigning values to variables.  (2) Sample C language code and its output, as shown: #include <stdio.h>#include <conio.h>// Assignment Operators in C Languageint main(){int x;  x = 5;printf(“Value of ‘=’: %d\n”, x);  x = x + 10;printf(“Value of ‘+’: %d\n”, x);  x = x – 9;printf(“Value …

ARRAY in C Language

ARRAY in C Language: (1) An Array is a collection of variables of the same type that are referenced by a common name. It is used for storing multiple values in one variable. (2) Sample C language code and its output, as shown: #include <stdio.h>#include <conio.h>//Assign 1-10 values in one variable x container having array of …

DO WHILE Loop in C Language

DO WHILE Loop in C Language: (1) Unlike the for and while loops, the do-while is an exit-controlled loop i.e. it evaluates its test-expression at the bottom of the loop after executing its loop-body statements. This means that a do-while loop always executes at least once. In other two loops for and while, the test-expression is …

WHILE Loop in C Language

WHILE Loop in C Language: (1) The while statement executes a block of code repeatedly as long as the control condition of the loop is true. The control condition of the while loop is executed before any statement inside the loop is executed. (2) Sample C language code and its output, as shown: #include <stdio.h>#include <conio.h>//Table …