What would be value of j after the following is executed?
k=17; j=6; if (k < 10) j=8; j=j+1; j=j+2;
8
9
7
10
What will be output after compilation and execution of the following code?
int main() { int array[3]={5}; int i; for (i=0;i<=2;i++) printf("%d ",array[i]); return 0; }
5 garbage garbage
5 0 0
0 0 0
5 5 5
it Compare the variable a and the variable b are same.
The value of b is assigned to variable a but if b changes later, it will not effect the value of variable a.
The value of b is assigned to variable a but if b changes later, it will effect the value of variable a.
The value of variable a is assigned to variable b, and the value of variable b is assigned to variable a.
for (i=1; i < 20; i++) printf (“k”);
for (i=1; i = 20; i++) printf (“k”);
for (i=0; i < 20; i++) printf (“k”);
for (i=0; i <= 20; i++) printf (“k”);
When the following piece of code is executed, what happens?
b = 3; a = b++;
a contains 3 and b contains 4
a contains 4 and b contains 4
a contains 4 and b contains 3
a contains 3 and b contains 3
What is the value of r after this code is executed?
r=2; k=8; if (r>3 || k>6 && r<5 ||k>10) r=9; else r=6
2
6
<
=
>=
<=
0
1
For the function
s=operation(A[], 6)
operation(A, 6)
k=operation(A, 6)
d=operation(int A, 6)
Id_No
ID_NO
IdNo
Id No
TRUE
FALSE
All of the following are valid expressions in C.
break
continue
exit()
while
What will be the output of the following program?
main() { int x = 5; while ( x = = 1) x = x -1; printf ( “ %d\n”, x); }
5
4
syntax error