#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

Write a program to write a given string in maximum possibilities? i.e str[5]="reddy"; i.e we can write this string in 120 ways for that write a program

3 Answers   Subex,


what is the meaning of 'c' language

3 Answers  


main() { printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3)); }

6 Answers  


What does volatile do?

0 Answers  


How can I invoke another program or command and trap its output?

0 Answers  






Is c easy to learn?

0 Answers  


What is bss in c?

0 Answers  


What is a union?

0 Answers  


ratio,age,persentage

0 Answers  


What is the mean of this statement:: if(int i=0 * i=9)

2 Answers   HCL,


I didn't count the ducks that I saw in line, but I do remember that one duck was in front of two ducks, another duck behind two ducks. How many ducks did I see?

2 Answers  


int a=2,b=3,c=4; printf("a=%d,b=%d\n",a,b,c); what is the o/p?

6 Answers   Verifone,


Categories