#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 ?    3 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 ?    1 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 ?    0 Yes 0 No



Post New Answer



More C Interview Questions

Reverse the bit order in a single macro. eg. i/p = 10010101 --> o/p = 10101001

2 Answers  


Why Modern OS are interrupt driven?Give an example

3 Answers  


WHAT IS ABSTRACT DATA TYPE

4 Answers   Wipro,


FILE PROGRAMMING

0 Answers   Wipro,


what is the Output? int a=4 b=3; printf("%d%d%d%d%d%d",a++,++a,a++,a++,++a,a++); printf("%d%d%d%d%d%d",b--,b--,--b,b--,--b,--b);

10 Answers   IBM,






WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.

0 Answers   Infosys, Google,


What is true about the following C Functions (a) Need not return any value (b) Should always return an integer (c) Should always return a float (d) Should always return more than one value

2 Answers   TCS, DynPro,


SRUCTURE PROGRAMMING

3 Answers   CTS, Wipro,


How to add two numbers with using function?

2 Answers   Miracle Solutions,


Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ... } c.x=0; do{ /*x unaltered within theloop*/ ... }while(x==0); d.# define TRUE 0 ... while(TRUE){ .... }

7 Answers   TCS,


what is the output of following question? void main() { int i=0,a[3]; a[i]=i++; printf("%d",a[i] }

3 Answers  


if p is a string contained in a string?

0 Answers  






Categories