Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

C | Operators | Question 26

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Output of following C code will be?

C




#include <stdio.h>
 
int main() {
   int y = 0;
   int x = (y != 0);
   printf("%d", x);
   return 0;
}

(A)

0

(B)

1

(C)

A bog negative Number

(D)

Compiler Error



Answer: (A)

Explanation:

0 is the output of the following C code.


Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Last Updated : 28 Jun, 2021
Like Article
Save Article
Similar Reads