If Statement in C

If block contains the condition, if condition is true, then the statement will execute and if the condition is not true then the statement will not execute.

Syntax :

/*statements will execute if the boolean expression is true */

Block Diagram :



int main(){
// local variable declaration:
  int a = 10; 
  // check the  condition
  if( a < 20 ) {
/* if condition is true then print 
   the following */

    printf("a is less than 20");
  printf("\nvalue of a is : %d",a);
  return 0;
a is less than 20
value of a is : 10

Next topic is if-else statement


Training For College Campus

We offers college campus training for all streams like CS, IT, ECE, Mechanical, Civil etc. on different technologies like
C, C++, Data Structure, Core Java, Advance Java, Struts Framework, Hibernate, Python, Android, Big-Data, Ebedded & Robotics etc.

Please mail your requirement at info@prowessapps.in

Projects For Students

Students can contact us for their projects on different technologies Core Java, Advance Java, Android etc.

Students can mail requirement at info@prowessapps.in


(8AM to 10PM):

+91-8527238801 , +91-9451396824

© 2017, prowessapps.in, All rights reserved