Académique Documents
Professionnel Documents
Culture Documents
Tutorial Sheet: 5
Course: B.Tech Sem: I
Course Code & Name: 14B11CI111/ Introduction to Computer Programming
Student Name: BATCH: DATE:
char c = c, d = d;
(i) (3 * i 2 * j ) % ( 2 * d c)
(ii) 2*((i/5)+(4*(j3))%(i+j2))
(iii) (i3*j)%(c+2*d)/(xy)
2) Trace the following code fragment, showing the value of each variable each time it
changes
int x, y, z;
x = y = z = 6;
x *= y += z -= 4;
a. #include<stdio.h.>
void main( )
b. main()
{ float x = 123.456;
float a, b, c = 2.5;
printf ( %f , c );
i. a=5,b=2
ii. a = 10 , b = 5
iii. a = 50 , b = 10
int m = 5, n = 5, x;
char p = p, q =q;
b. answer is either N or n
i. ( a < b ) || ( c < b )
iv. !( a + b > c )
i. !( x >= z)
ii. x <= z