if Statement in C

if statement is one of the basic and primitive decision making statement supported by C language. The general syntax of if statement is as follows: if ( condition ) statement; This flow control construct first checks the condition and if it evaluates to True then executes the statement. The condition can be any expression that … Read more

Multiple Statements within if in C

C Programming Tutorial

It may so happen that in a program we want more than one statement to be executed if the expression following if is satisfied. If such multiple statements are to be executed then they must be placed within a pair of braces as illustrated in the below example. Example: The current year and the year in which … Read more

If Statement in C

C Programming Tutorial

Like most languages, C uses the keyword if to implement the decision control instruction. The general form of if statement looks like this: if ( this condition is true )       execute this statement ; The keyword if tells the compiler that what follows is a decision control instruction. The condition following the … Read more