#define MAX 3
main()
{
printf("MAX = %d \n",MAX );
#undef MAX
#ifdef MAX
printf("Vector Institute”);
#endif

Answers were Sorted based on User's Feedback



#define MAX 3 main() { printf("MAX = %d \n",MAX ); #undef MAX #ifdef MAX printf(&quo..

Answer / rv

max = 3

Is This Answer Correct ?    69 Yes 8 No

#define MAX 3 main() { printf("MAX = %d \n",MAX ); #undef MAX #ifdef MAX printf(&quo..

Answer / poorna

Initially the max is defined so the first statement printf prints max=3,
#undef used to remove all the defined terms.so the max is not defined after this step.
So the if statement became false hence answer is Max=3

Is This Answer Correct ?    27 Yes 3 No

#define MAX 3 main() { printf("MAX = %d \n",MAX ); #undef MAX #ifdef MAX printf(&quo..

Answer / shaik anif

main()
{
int a[3][4] ={1,2,3,4,5,6,7,8,9,10,11,12} ;
int i, j , k=99 ;
for(i=0;i<3;i++)
for(j=0;j<4;j++)
if(a[i][j] < k) k = a[i][j];
printf("%d", k);
}

Is This Answer Correct ?    8 Yes 6 No

#define MAX 3 main() { printf("MAX = %d \n",MAX ); #undef MAX #ifdef MAX printf(&quo..

Answer / rohit

it will give a compile error..

Is This Answer Correct ?    4 Yes 8 No

Post New Answer

More C Interview Questions

What is the role of this pointer?

0 Answers  


Convert the following expression to postfix and prefix X $ Y Z - M + N + P / Q / (R + S)

2 Answers  


write a program to print calender using for loop.

1 Answers   HCL, TCS,


what are the interview question's in the language c

2 Answers   Nipuna,


Explain what are the advantages and disadvantages of a heap?

0 Answers  






What is the difference between struct and union in C?

1 Answers  


Is main() is used in the program,,see below example? void main() { int i; for(i=0;i<10;i++) main(); } Then what is the output of the program?

6 Answers  


What is the output for the below program? void main() { float me=1.1; double you=1.1; if(me==you) printf("love c"); else printf("know c"); }

7 Answers  


can we change the default calling convention in c if yes than how.........?

0 Answers   Aptech,


Given an array of length N containing integers between 1 and N, determine if it contains any duplicates.

3 Answers   SilverKey,


what are the general concepts of c and c++

2 Answers  


Who developed c language?

0 Answers  


Categories