What will be output if you will compile and execute the following c code?
void main(){
int array[3]={5};
int i;
for(i=0;i<=2;i++)
printf("%d ",array[i]);
}
What will be output if you will compile and execute the following c code?
void main(){
char *str;
scanf("%[^\n]",str);
printf("%s",str);
}
What will be output if you will compile and execute the following c code?
void main(){
int a=5;
float b;
printf("%d",sizeof(++a+b));
printf(" %d",a);
}
What will be output if you will execute following c code?
#include<stdio.h>
int main(){
int x=5, y=10;
if(!(!x) && x)
printf("%d",x);
else
printf("%d",y);
return 0 ;
}
What will be output if you will execute following c code?
#include<stdio.h>
int main(){
float a=0.5, b=0.9;
if(a&&b>0.9)
printf("Sachin");
else
printf("Rahul");
return 0;
}
What will be output if you will execute following c code?
#include<stdio.h>
int main(){
int x=25;
if(!!x)
printf("%d",!x);
else
printf("%d",x);
return 0;
}
What will be output if you will execute following c code?
#include<stdio.h>
int main(){
for(;NULL;)
printf("cquestionbank");
return 0;
}
What will the output of following code?
#include<stdio.h>
int main(){
int a=0;
#if (a==0)
printf("Equal");
#else if
printf("Not equal");
#endif
return 0;
}
Predict the output or error(s) for the following:
void main()
{
int const * p=5;
printf("%d",++(*p));
}
Predict the output or error(s) for the following:
main()
{
char s[ ]="man";
int i;
for(i=0;s[ i ];i++)
printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]);
}