C Programming - Bitwise Operators - Discussion

Discussion Forum : Bitwise Operators - Find Output of Program (Q.No. 8)
8.
What will be the output of the program?
#define P printf("%d\n", -1^~0);
#define M(P) int main()\
             {\
                P\
                return 0;\
             }
M(P)
1
0
-1
2
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
27 comments Page 3 of 3.

Suman said:   1 decade ago
What are those forward slashes in the program doing?

Abcd said:   1 decade ago
Please explain multiple macros how to split?

Ramesharavind said:   8 years ago
@Vinod.

Your explanation is good, Thanks.

Xyz said:   8 years ago
Please explain me why \ is used?

Vikas said:   1 decade ago
@Nitin

You are so intelligent.

Nandu said:   1 decade ago
@Nitin you are correct.

Jessie said:   1 decade ago
@Nitin is correct.


Post your comments here:

Your comments will be displayed after verification.