51. What will be the output of the following C code, if it is run on a 32 bit platform?
#include<stdio.h>
#pragma(1)
struct test
{
int i;
char j;
};
main()
{
printf("%d",sizeof(struct test));
}
#include<stdio.h>
#pragma(1)
struct test
{
int i;
char j;
};
main()
{
printf("%d",sizeof(struct test));
}
52. What will be the output of the following C code?
#include <stdio.h>
#define p( m ) printf( "t*" #m " = %s", t##m )
char tram[]="tram";
int main()
{
int x;
x=p(ram);
}
#include <stdio.h>
#define p( m ) printf( "t*" #m " = %s", t##m )
char tram[]="tram";
int main()
{
int x;
x=p(ram);
}
53. What will be the output of the following C code?
#include<stdio.h>
#define sf 10
main()
{
if(sf==100)
printf("good");
else
{
printf("bad");
sf=100;
}
printf("%d",sf);
}
#include<stdio.h>
#define sf 10
main()
{
if(sf==100)
printf("good");
else
{
printf("bad");
sf=100;
}
printf("%d",sf);
}
54. What will be the output of the following C code?
#include<stdio.h>
void main()
{
#ifndef max
printf("hello");
#endif
printf("hi");
}
#include<stdio.h>
void main()
{
#ifndef max
printf("hello");
#endif
printf("hi");
}
55. The following C code results in an error.
#include <stdio.h>
#define world( n ) printf( "t^^" #n" = %c", t##n )
int t3=1;
int main()
{
world(3);
}
#include <stdio.h>
#define world( n ) printf( "t^^" #n" = %c", t##n )
int t3=1;
int main()
{
world(3);
}
56. What will be the output of the following C code?
#define F abc
#define B def
#define FB(arg) #arg
#define FB1(arg) FB(arg)
main()
{
printf(FB(F B));
FB1(F B);
}
#define F abc
#define B def
#define FB(arg) #arg
#define FB1(arg) FB(arg)
main()
{
printf(FB(F B));
FB1(F B);
}
57. What will be the output of the following C code?
#include <stdio.h>
#define p( n,m ) printf( "%d", m##n )
int main()
{
p(3,4);
}
#include <stdio.h>
#define p( n,m ) printf( "%d", m##n )
int main()
{
p(3,4);
}
58. What will be the output of the following C code?
#define example(s,n) #s #n
main()
{
printf(example(hello,world));
}
#define example(s,n) #s #n
main()
{
printf(example(hello,world));
}
59. What will be the output of the following C code?
#include <stdio.h>
#define hello( n ) a##n
int a3;
int main()
{
int x;
x=hello(3);
if(x!=0)
printf("hi");
else
printf("good");
}
#include <stdio.h>
#define hello( n ) a##n
int a3;
int main()
{
int x;
x=hello(3);
if(x!=0)
printf("hi");
else
printf("good");
}
60. What will be the output of the following C code?
#include<stdio.h>
#define hello
main()
{
#ifdef hello
#define hi 4
#else
#define hi 5
#endif
printf("%d",hi);
}
#include<stdio.h>
#define hello
main()
{
#ifdef hello
#define hi 4
#else
#define hi 5
#endif
printf("%d",hi);
}