





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Simple notes on bitwise and storage class for all students
Typology: Schemes and Mind Maps
1 / 9
This page cannot be seen from the preview
Don't miss anything!






if (condition) instruction;
#include<stdio.h> int main() { int num1=1; int num2=2; if(num1<num2) //test-condition { printf("num1 is smaller than num2"); } return 0;
num1 is smaller than num
Relational Operators
if (test-expression) { True block of statements } Else { False block of statements } Statements;
#include<stdio.h> int main() { int num=19; if(num<10) { printf("The value is less than 10"); } else { printf("The value is greater than 10"); } return 0; }
The value is greater than 10
Conditional Expressions
#include <stdio.h> int main() { int y; int x = 2;
Nested Else-if statements
if (test - expression 1) { statement1;
} else if (test - expression 2) { Statement2; } else if (test - expression 3) { Statement3; } else if (test - expression n) { Statement n; } else { default; } Statement x;
#include<stdio.h> int main() { int marks=83; if(marks>75){ printf("First class"); } else if(marks>65){ printf("Second class"); } else if(marks>55){ printf("Third class"); } else{ printf("Fourth class"); } return 0; }
First class