Continue statement in C

continue is useful with the next repetition of a loop. When continue inside a loop is executed, the flow of execution goes back to the starting of the loop, and the next repetition will take place, When continue inside a loop is executed, the subsequent statements in the loop are not executed, but the statements […]

Continue reading

Switch statement in C

switch statement is useful to execute a particular task from among several tasks depending on the value of a variable or expression.. If the variable value equals value1 then statements1 will be executed. If the variable value equals value2 then statements2 will be executed, etc. If the variable value does not equal to any of […]

Continue reading

for loop in C

for loop is useful to execute group of statements as long as the condition is true. for loop is more suitable when the programmer knows how many times exactly the statements should be executed. It means for loop is suitable to execute statements a fixed number of times. Here, expression1 is called ‘initialization expression’ as […]

Continue reading

while loop in C

In while loop the condition is tested first and then only the statements are executed. While loop executes group of statements repeatedly as long as a condition is true. Compiler tests the condition first. If condition is true, then the statements in the while loop are executed. The compiler goes back and tests the condition […]

Continue reading

do while loop in C

This loop is useful to execute a group of statements repeatedly as long as a condition is true. Once the condition becomes false, the loop terminates. First the compiler executes all the statements and then tests the condition.If the condition is true, then it goes back and executes the statements the second time.If the condition […]

Continue reading

If Else Statement in C

This statement is useful to execute a task depending on whether a condition is true or not. If the condition is true, then statement1 will be executed. If the condition is false, then the statement2 will be executed. The else part is written inside the square braces:[].This represents another part that is optional. In the […]

Continue reading

Operators in C

Operators: The below table specifies list of Operators available in C Operator Category Operator Symbols Arithmetic Operators +,-,*,/,% Assignment Operators =,+=,-=,*=,/=,%= Unary Operators -,++ and — Ternary Operators ?: Relational Operators <,<=,>,>=,= =,!= Logical Operators &&,| |, ! Bitwise Operators ~,&,|,^,<<,>> Miscellaneous Operators sizeof(),&,*, , Arithmetic Operators These operators are useful for performing basic arithmetic […]

Continue reading

 Input/output Functions in C Programming

C Statements: Input Functions Output Functions getchar() putchar() gets() puts() scanf() printf() getchar(): getchar() function takes the character and stores it into a variable. Here getchar() function takes the character and stores it into a variable. putchar(): Using putchar() function we can display a single character as output on the monitor. Here putchar() function is […]

Continue reading

Datatypes in C

Datatypes Datatypes represent the type of data stored in a variable. Primary datatypes These datatypes represent single value.It means they store only one value. char:This datatype represents only one character, like N, n, 8 ,* ? etc.Char datatype takes only 1 byte of memory. int:This datatype stores an integer number.It takes 2 bytes of memory. […]

Continue reading