Quiz 1
Quiz 1
Quiz 1
#include<stdio.h>
int main()
{
int a = 10, b = 2, c=0;
a = !( c = b == c) && ++b;
c += ~( a + b--);
printf( " %d %d %d", b, c, a);
return 0;
}
Answers :1
Answers: 1
1. 97.000000 128
2. 97.00 0
3. 97.000000 -128
4. Compile Time Error
Answers: 3
1. 11
2. 10
3. 5
4. 0
Answers:3
1. Garbage
2. 0
3. 100
4. 1
Answers:4
7. Which of the following statement is correct about the code snippet given below?
num = 5;
printf( �%d�, ++num++ );
Answers: 3
8. What will be the output of the following code?
#include<stdio.h>
int main()
{
int a=2, b = 7,res;
int y=10;
res=(y++>9 && y++!=11 && y++>11) && (a=b<4? b<<1 : ++b>4 ? 7>>1 : a);
printf("\n%d %d %d %d",y,a,b,res);
return 0;
}
1. 13 3 6 1
2. 15 2 9 1
3. 12 2 7 0
4. 12 3 8 0
Answers:3
printf("%d %d",a,i);
printf(" %d %d %d %d %d %d %d",i++,i--,++i,--i,i,i+++j,j--);
return ;
}
1. 12 4 5 5 4 5 4 9 5
2. Compile Time Error
3. 13 4 4 5 5 5 5 9 6
4. 13 4 3 6 5 6 5 8 6
Answers: 3
Answers:2