Free
|
C language is a middle level language. It is a structured language. C language is a case sensitive language. All syntax written in c language is in lower case. C is the basis for C++.
|
|
|
|
IF ELSE, ELSE IF Statement in C languageif (condition) For example you have to print a message if student scores less than 50, complete score of 100,& between 50-100.Here is how you will use these statements.
In above c program if number entered is less than 10 it will display the number otherwise it will say "Number is larger than 10". Use of Logical Operators (Logical AND) && and (Logical OR) || with if else statements
If either of above conditions is true i.e a<b or b<c it will print the name else ABC will be printed. We can replace the Logical OR operator || with && in the above program. then the name will be printed only if both conditions satisfy. a<b && b<c. Here is another e.g in C++ if ( score < 50 )
{ // If the Score is less than 50
you are not allowed |
|