#ifdef TRUE
int I=0;
#endif

main()
{
int j=0;
printf("%d %d\n",i,j);
}

Answers were Sorted based on User's Feedback



#ifdef TRUE int I=0; #endif main() { int j=0; printf("%d %d\n",i,j); } ..

Answer / jai

Compilation error since 1) TRUE definition is not visible
in above program, 2) i variable is not declared.

Is This Answer Correct ?    4 Yes 0 No

#ifdef TRUE int I=0; #endif main() { int j=0; printf("%d %d\n",i,j); } ..

Answer / vignesh1988i

compailer error

Is This Answer Correct ?    2 Yes 0 No

#ifdef TRUE int I=0; #endif main() { int j=0; printf("%d %d\n",i,j); } ..

Answer / rohit

Compilation error due to 'i' is not declared only.
Not cause by visibility of TRUE macro.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Interview Questions

plz answer....A program that takes 3 variables e.g a,b,c in as seperate parameters and rotates the values stored so that value goes a to b, b to c and c to a .

3 Answers  


What are c identifiers?

0 Answers  


write a c/c++ program that takes a 5 digit number and calculates 2 power that number and prints it?

4 Answers  


What is the 'named constructor idiom'?

0 Answers  


Is the below things valid & where it will be stored in memory layout ? static const volatile int i; register struct { } ; static register;

2 Answers   Bosch,






What is #line?

0 Answers  


What is string length in c?

0 Answers  


What are the modifiers available in c programming language?

0 Answers  


What is difference between && and & in c?

0 Answers  


An array name contains base address of the array. Can we change the base address of the array?

4 Answers   NMIMS, Wipro,


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

0 Answers  


which type of aspect you want from the student.

0 Answers   IBM, TCS,


Categories