void main() {
char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof(farthest));
}
2..4
syntax error
compiler error
4..2
main() {
int i=10;
i=!i>14;
Printf ("i=%d",i);
}
i=1
i=0
compiler error
syntax error
main() {
int i=5;
printf(“%d” , i=++i ==6);
}
5
1
6
Compiler Error
main() {
int c[ ]={2.8,3.4,4,6.7,5};
int j,*p=c,*q=c; for(j=0;j<5;j++)
{
printf(" %d ",*c);
++q;
} for(j=0;j<5;j++)
{
printf(" %d ",*p);
++p; }
}
syntax error
compiler error
2 2 2 2 2 2 3 4 6 5
5 6 4 5 2 2 2 2
#include main()
{ struct xx
{ int x=3;
Char name[]="hello";
};
struct xx *s;
printf("%d",s->x);
printf("%s",s->name);
}
syntax error
no output
Compiler Error
Hello
void main() {
printf(“sizeof (void *) = %d \n”, sizeof(void*));
printf(“sizeof (int *) = %d \n”, sizeof(int*)); printf(“sizeof (double *) = %d \n”, sizeof(double*));
printf(“sizeof(struct unknown *) = %d \n”, sizeof(struct unknown *));
}
no out put
Compiler Error
sizeof (void *) = 2 sizeof (int *) = 2 sizeof (double *) = 2 sizeof(struct unknown *) = 2
syntax error
main() {
char *p; p="Hello";
printf("%c\n",*&*p);
}
H
syntax error
compiler error
E
enum colors {BLACK,BLUE,GREEN}
main()
{ printf("%d..%d..%d", BLACK,BLUE,GREEN);
}
no output
syntax error
0..1..2
compiler error
#include
char *someFun1()
{ char temp[ ] = "string";
return temp;
}
char *someFun2()
{
char temp[ ] = {'s','t','r','i','n','g'};
return temp; }
int main()
{
puts(someFun1());
puts(someFun2());
}
syntax error
some garbage value
Compiler Error
no out put
main() {
int i;
printf("%d",scanf("%d",&i));
// value 10 is given as input here
}
1
Compiler Error
syntax error
2
int DIM(int array[])
{
return sizeof(array)/sizeof(int );
}
main() {
int arr[10];
printf(“The dimension of the array is %d”, DIM(arr));
}
Compiler Error
syntax error
10
1
main() {
int a=10,*j;
void *k;
j=k=&a;
j++; k++; printf("\n %u %u ",j,k);
}
Compiler error: Cannot increment a void pointer
syntax error
memory address
no out put
Recursive functions are executed in a
Last in First out order
First in First out order
Are maintained in a stack
None of the above
#if something == 0 int some=0; #endif
main() {
int thing = 0;
printf("%d %d\n", some ,thing);
}
Compiler Error
0
1
2
main()
{
int i = 3;
for ( ; i++=0 ;)
printf(“%d”,i);
}
Compiler error: Lvalue required in function main
syntax error
some garbage value
no out put