#define FALSE -1

#define TRUE 1

#define NULL 0

main()

{

if(NULL)

puts("NULL");

else if(FALSE)

puts("TRUE");

else

puts("FALSE");

}



#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts(&quo..

Answer / sorab aggarwal

print TRUE becoz
if condition false when it 0 and if any other value occurs it is true ..
if(0)
puts("NULL"); //false this condition

else if(-1)

puts("TRUE"); //true this condition

else

puts("FALSE");

Is This Answer Correct ?    25 Yes 5 No

Post New Answer

More C Interview Questions

What is a string?

0 Answers  


how to add two numbers without using arithmetic operators?

4 Answers  


What is the difference between near, far and huge pointers?

0 Answers  


how to find the given number is prime or not?

6 Answers   IMS, ING,


what does the following code do? fn(int n,int p,int r) { static int a=p; switch(n){ case 4:a+=a*r; case 3:a+=a*r; case 2:a+=a*r; case 1:a+=a*r; } } a.computes simple interest for one year b.computes amount on compound interest for 1 to 4 years c.computes simple interest for four year d.computes compound interst for 1 year

7 Answers   TCS,






An entire structure variable can be assigned to another structure variable if __________

3 Answers   Sasken, TCS, Tech Mahindra, Wipro,


Explain void pointer?

0 Answers  


Write a c program to sort six numbers and find the largest one by using the ladder of if-else? plz do help me

2 Answers  


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,


While compiling a c program,graphics header files are not including in my program..eg: <graphics.h>,what may be the problem...is there any environment settings exists.

2 Answers  


What is Full Form of C and Why We use C

23 Answers  


what is c++ programming?

3 Answers   TCS,


Categories