Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

Can logical and relational operators be used with constants?

$
0
0

Hey! I just saw a program written in C which contained this statement.

int a;
a = 5 <= 8 && 6 != 5;
printf("%d", a);

The value of 'a' obtained was 1. How is it possible? Can somebody explain me the second line?


Viewing all articles
Browse latest Browse all 39796


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>