Explain the for keyword
The “for” keyword is used to declare a for-loop. A for-loop is a loop that is specified to run a certain amount of times. Below is the C program to…
The “for” keyword is used to declare a for-loop. A for-loop is a loop that is specified to run a certain amount of times. Below is the C program to…
The enum keyword is used to declare an enum (short for enumeration). An enum is a user-defined datatype, which holds a list of user-defined integer constants. By default, the value of each…
The if-else statement is used to make decisions, where if a condition is true, then it will execute a block of code; if it isn’t true (else), then it will…
The doubles and floats are datatypes used to declare decimal type variables. They are similar, but doubles have 15 decimal digits, and floats only have 7. Example: float marks =…
The do statement is used to declare a do-while loop. A do-while loop is a loop that executes once, and then checks it’s condition to see if it should continue…
The const keyword defines a variable who’s value cannot be changed. const int num = 10; Below is the C program to demonstrate the const keyword: #include <stdio.h> int main()…
char keyword in C is used to declare a character variable in the C programming language. char x = 'D'; Below is the C program to demonstrate the char keyword:…
The switch statement in C is used as an alternate to the if-else ladder statement. For a single variable i.e, switch variable it allows us to execute multiple operations for…
The break statement is used to terminate the innermost loop. It generally terminates a loop or a break statement. The continue statement skips to the next iteration of the loop.…
In C Programming language, there are many rules so to avoid different types of errors. One of such rule is not able to declare variable names with auto, long, etc.…