#define FALSE -1
#define TRUE 1
#define NULL 0
main()
{
if(NULL)
puts("NULL");
else if(FALSE)
puts("TRUE");
else
puts("FALSE");
}
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 ? | 27 Yes | 5 No |
What is the data segment that is followed by c?
What will be the result of the following program? main() { char p[]="String"; int x=0; if(p=="String") { printf("Pass 1"); if(p[sizeof(p)-2]=='g') printf("Pass 2"); else printf("Fail 2"); } else { printf("Fail 1"); if(p[sizeof(p)-2]=='g') printf("Pass 2"); else printf("Fail 2"); } } a) Pass 1, Pass 2 b) Fail 1, Fail 2 c) Pass 1, Fail 2 d) Fail 1, Pass 2 e) syntax error during compilation
what is the difference between normal variables and pointer variables..............
15 Answers HP, Infosys, Satyam, Vivekanand Education Society,
What is a program flowchart and explain how does it help in writing a program?
Find the highest of three numbers and print them using ascending orders?
Why is c so powerful?
Why is C language being considered a middle level language?
Explain the concept of "dangling pointers" in C.
What is output redirection?
how can i print "hello".please consider inverted commas as well.i want to print on console: "hello"
What is main () in c language?
write program on arrays