Tagged: if statement in c programming

if statement in C 23

if statement in C

In the if statement, if is the keyword in C. Syntax: if (condition is true){ /*block of statements to be executed*/ } The keyword if tells the compiler that what follows is decision control statement. The block of statements to be executed must be enclosed in opening and closing braces. If only one statement needs to be executed then braces need not be used. Let us understand if statement using an example. Example of if statement in C: int a = 10; if (a == 10){ printf(“You are in if block\n”); printf(“The value of a is %d\n”, a); } printf(“You...

FREE C Programming Cheatsheet

FREE C Programming Cheatsheet


Cheatsheet for a quick glance at C programming concepts and syntax

Thank you! Check you inbox and access your cheat-sheet