include stdio h preprocessor void main int a

  • Slides: 39
Download presentation

������� ����������� #include <stdio. h> preprocessor � void main() { int a, b, c;

������� ����������� #include <stdio. h> preprocessor � void main() { int a, b, c; declaration int a, b, c; a = 10; input b = 20; c = a + b; process printf(“c = %dn”, c); output printf(“c = %dn”, c); }

������� ����������� #include <stdio. h> preprocessor � void main() { int a, b, c;

������� ����������� #include <stdio. h> preprocessor � void main() { int a, b, c; declaration scanf(“%d”, &a); input scanf(“%d”, &b); c = a + b; process printf(“c = %dn”, c); output }

�������� x ��� y ���������� preprocessor #include <stdio. h> void main() { declaration int

�������� x ��� y ���������� preprocessor #include <stdio. h> void main() { declaration int x, y, va; x = 5; input y = 3; process va = x * 400 + 3 * 100; printf(“area in square va = %dn”, va); output }

�������� x ��� y ���������� preprocessor #include <stdio. h> void main() { declaration int

�������� x ��� y ���������� preprocessor #include <stdio. h> void main() { declaration int x, y, va; scanf(“%d”, &x); input scanf(“%d”, &y); process va = x * 400 + 3 * 100; printf(“area in square va = %dn”, va); output }

���� #include <stdio. h> Value of a is 0 void main() { Value of

���� #include <stdio. h> Value of a is 0 void main() { Value of a is 1 int a=0 ; printf(“ Value of a is %dn”, a); a++; printf(“ Value of a is %dn”, a); }

���� #include <stdio. h> Value of a is 0 void main() { Value of

���� #include <stdio. h> Value of a is 0 void main() { Value of a is 1 int a=0 ; printf(“ Value of a is %dn”, a); ++a; printf(“ Value of a is %dn”, a); }

���� #include <stdio. h> Value of a is 10 void main() { Value of

���� #include <stdio. h> Value of a is 10 void main() { Value of a is 9 int a=10 ; printf(“ Value of a is %dn”, a); a--; printf(“ Value of a is %dn”, a); }

���� #include <stdio. h> Value of a is 10 void main() { Value of

���� #include <stdio. h> Value of a is 10 void main() { Value of a is 9 int a=10 ; printf(“ Value of a is %dn”, a); --a; printf(“ Value of a is %dn”, a); }

���� int a = 10; int b = ++a; int c = ++a; int

���� int a = 10; int b = ++a; int c = ++a; int d = ++a; int a = 10; int b = a++; int c = a++; int d = a++; a = 11, b = 11 a = 12, c = 12 a = 13, d = 13 b = 10, a = 11 c = 11, a = 12 d = 12, a = 13

���� int a = 10, b = 20; int x = ++a + b++;

���� int a = 10, b = 20; int x = ++a + b++; x = 31, a = 11, b = 21

���� int a = 10, b = 20, c = 30; int y =

���� int a = 10, b = 20, c = 30; int y = ++c + ++a + b--; y = 62, a = 11, b = 19, c = 31

��������� (compound operator) int x = 10; x += 5; x -= 5; x

��������� (compound operator) int x = 10; x += 5; x -= 5; x *= 2; x /= 10; x %= 2; x = x + 5 x = 15 x = x - 5 x = 10 x = x * 2 x = 20 x = x / 10 x = 2 x = x % 2 x = 0

���� #include <stdio. h> Value a is 1 void main() { Value sum is

���� #include <stdio. h> Value a is 1 void main() { Value sum is 1 int a=0 , sum=0 ; a++ ; printf (“Value a is %dn”, a); sum+=1; printf(“Value sum is %dn”, sum); }

���� #include <stdio. h> void main() { int x=10, y=20; printf(“n%d %d”, x, y);

���� #include <stdio. h> void main() { int x=10, y=20; printf(“n%d %d”, x, y); x+=10 ; --y ; printf(“n%d %d”, x, y); y = --x ; printf(“n%d %d”, x, y); y = x-- + y ; printf(“n%d %d”, x, y) ; y = x-- ; printf(“n%d %d”, x, y); } 10 20 19 18 17 20 19 19 38 18

Go to Laboratory Room now !

Go to Laboratory Room now !