Question 1: What will be the output of the following code?
int main()
{
int i = 5;
int a = --i + --i;
printf("%d", a);
return 0;
}
Question 2: What will be the output of the following code?
int main()
{
int i = 5;
int a = --i + --i + --i;
printf("%d", a);
return 0;
}
Question 3: What will be the output of the following code?
#include
int main()
{
int num = 8;
printf("%d %d", num << 1, num >> 1);
return 0;
}
Question 4: What will be the output of the following code?
#include
int main()
{
int i = 5;
int a = ++i + ++i;
printf("%d", a);
return 0;
}
Question 5: What will be the output of the following code?
#include
int main()
{
int i = 16;
i =! i > 15;
printf("i = %d", i);
return 0;
}
Question 6: What will be the output of the following code?
#include
int main()
{
unsigned int num = -4;
printf("%d", ~num);
return 0;
}
Question 7: What will be the output of the following code?
#include
int main()
{
int x = 2;
(x & 1) ? printf("true") : printf("false");
return 0;
}
Question 8: What will be the output of the following code?
int main()
{
int a = 1, b = 3, c;
c = b << a;
b = c * (b * (++a)--);
a = a >> b;
printf("%d",b);
return 0;
}
Question 9: What will be the output of the following code?
#INCLUDE
VOID MAIN()
{
INT A=10;
SWITCH(A){
CASE 5+5:
PRINTF("HELLO\n");
DEFAULT:
PRINTF("OK\n");
}
}
Question 10: What will be the output of the following code?
void main()
{
int a=2;
switch(a)
{
printf("Message\n");
default:
printf("Default\n");
case 2:
printf("Case-2\n");
case 3:
printf("Case-3\n");
}
printf("Exit from switch\n");
}
Question 11: What will be the output of the following code?
void main()
{
int a=2;
switch(a/2*1.5)
{
case 1:
printf("One...");
break;
case 2:
printf("Two...");
break;
default:
printf("Other...");
break;
}
}
Question 12: What will be the output of the following code?
#include <stdio.h>
void main()
{
unsigned char var=0;
for(var=0;var<=255;var++)
{
printf("%d ",var);
}
}
Question 13: C IS _______ TYPE OF PROGRAMMING LANGUAGE.?
Question 14: What will be the output of the following code?
#include <stdio.h>
void main()
{
char cnt=0;
for(;cnt++;printf("%d",cnt)) ;
printf("%d",cnt);
}
Question 15: What will be the output of the following code?
#include <stdio.h>
void main()
{
int cnt=1;
do
{
printf("%d,",cnt);
cnt+=1;
} while(cnt>=10);
printf("\nAfter loop cnt=%d",cnt);
printf("\n");
}
Question 16: What will be the output of the following code?
#include <stdio.h>
#define TRUE 1
int main()
{
int loop=10;
while(printf("Hello ") && loop--);
}
Question 17: What will be the output of the following code?
#include <stdio.h>
int main()
{
int i=1;
while(i<=10 && 1++)
printf("Hello");
}
Question 18: INT MAIN() HOW MANY TIMES THIS LOOP WILL EXECUTE?
{
INT I;
FOR(I=0;I<10 0="" code="" i="++I;" n="" printf="" return="">10>
Question 19: WHICH OF THE FOLLOWING SENTENCES ARE CORRECT ABOUT A FOR LOOP IN A C PROGRAM?
Question 20: A CHAR VARIABLE CAN STORE EITHER AN ASCII CHARACTER OR A UNICODE CHARACTER.
Question 21: HIGHT LEVEL LANGUAGE IS A?
Question 22: C IS _______ TYPE OF PROGRAMMING LANGUAGE.?
Question 23: CHOOSE CORRECT STATEMENTS
Question 24: FIND A CORRECT C KEYWORD BELOW.
Question 25: FIND A CORRECT C KEYWORD BELOW.