#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

list the no of files created when c source file is compiled

9 Answers   TCS,


what is the output for this question: main() { int i=1; printf("%d%d%d",i,i++,++i); }

9 Answers  


What is the size of enum in bytes?

0 Answers  


How does free() know how many bytes to free?

8 Answers  


How can I find the modification date and time of a file?

0 Answers  






Describe the order of precedence with regards to operators in C.

0 Answers  


Write a C program that reads a series of strings and prints only those ending in "ed"

2 Answers   Accenture,


What is #define?

0 Answers  


What is your favorite subject?

1 Answers   Ericsson, Invendis, Tech Mahindra,


To find whether a number is even or odd without using any conditional operator??

12 Answers   College School Exams Tests, IBM,


What is conio h in c?

0 Answers  


What is file in c language?

0 Answers  


Categories