Question No : 1
What would be the output of the following program?
int x=40;
main(){
int x=20;
printf("
%d",x);
}
Question No : 2
What will be output if you will compile and execute the following c code?
#include
int main(){
int i=320;
char *ptr=(char *)&i;
printf("%d",*ptr);
return 0;
}
Question No : 3
What will be output if you will compile and execute the following c code?
#include
#define x 5+2
int main(){
int i;
i=x*x*x;
printf("%d",i);
return 0;
}
Question No : 4
What will be output if you will compile and execute the following c code?
#include
int main(){
char c=125;
c=c+10;
printf("%d",c);
return 0;
}
Question No : 5
What will be output if you will compile and execute the following c code?
#include
int main()
{
float a=5.2;
if(a==5.2)
printf("Equal");
else if(a<5.2)
printf("Less than");
else
printf("Greater than");
return 0;
}
Greater than
Question No : 6
For 16bit compiler allowable range for integer constants is ______ ?
Question No : 7
C programs are converted into machine language with the help of