Pages
About Me
Entertainment
Technologies
Practice Programs
VB Art Gallery
Contact Me
Test2
What is the output of following program?
#include<stdio.h>
double i;
int main()
{
(int)(float)(char) i;
printf("%d", sizeof((int)(float)(char)i));
}
1
4
Compiler Error
None
What is the output of following program?
#include<stdio.h>
#define X a##b
int main()
{
int a=2,b=3,ab=5;
printf("%d", a+b+X);
}
Compiler Error
2
3
10
What is the output of following program?
#include<stdio.h>
#define square(x) x*x
int main()
{
printf("%d", square(2+3));
}
11
25
4
9
What is the output of following program?
#include<stdio.h>
static int i=5;
int main(){
int i=2,j,k;
j=i++;
k=++i;
printf("%d,%d,%d",i,j,k);
}
7 5 7
7,5,7
4,2,4
4 2 4
What is the output of following program?
#include<stdio.h>
int main()
{
int k=1;
printf("%d == 1 is" "%s\n", k, k==1?"True":"False");
}
1 == 1 is True
1 == 1 is False
Compiler Error
None
What is the output of following program?
#include<stdio.h>
int main(){
int i;
printf("%d\n", scanf("%d", &i));
}
0
1
2
4
What is the output of following program?
#include<stdio.h>
int main()
{
printf(6-2+"RISE_KRISHNA_SAI");
}
RISE_KRISHNA_SAI
_KRISHNA_SAI
Compiler Error
None
What is the output of following program?
#include<stdio.h>
#include<string.h>
int main()
{
char clg1[5]="rpra",clg2[5]="rgan";
printf("%d",strcmp(clg1,clg2));
}
-1
0
1
None
What is the output of following program?
#include<stdio.h>
int main()
{
char name=255;
printf("%d",name);
}
0
1
-1
None
What is the output of following program?
#include<stdio.h>
int main()
{
int i=1;
for(;i<10;i++);
printf("%d",--i);
}
10
9
Compiler Error
None
Submit Test
Newer Post
Older Post
Home