{CODE } Instructions & Operators (Chapter 2)
1. Type Declaration Instructions #include<stdio.h> int main() { int age = 22; int oldAge = age; int newAge = oldAge + 2; printf("new age is : %d", newAge); int rupee = 1, dollar; dollar = 74; /* order of declaration is important - Wrong Declaration Order float pi = 3.14; float area = pi * rad * rad; float rad = 3; */ // valid declaration int age1, age2, age3; age1 = age2 = age3 = 22; //invalid //int a1 = a2 = a3 = 22; return 0; } 2. Arithmetic Instructions #include<stdio.h> int main() { int a = 1, b = 2, c = 3; //valid a = b + c; //invalid // b + c = a; printf("%d \n", 3 % 2); printf("%d \n", -3 % 2); return 0; } > Type Conversion #include<stdio.h> int main() { printf("sum of 2 & 3 : %d", 2 + 3); printf("sum of 2.0 & 3 : %f", 2.0 + 3); printf("sum of 2.0 & 3.0 : %f", 2.0 + 3.0); return 0; } > Associativity #include<stdio.h> int main() { printf(" Output : %d", 5+2/2*3); retur...