#include<stdio.h>
void main()
{
int a,b,c;
a=b=c=1;
c=++a || ++b && ++c;
printf("%d\t%d\t%d",a,b,c);
}
Answer Posted / geetha
logical ooperation gives output only 0 or 1 that means
true or false.in this && have higher priority so first
excutes ++b&&++c (1&&1=1)true now 2||1=1.then a value is
incremanted in the ||operation indicates any one operation
excutes only .so a value is incremented and b & c values
are 1 displayed
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Explain how can I manipulate strings of multibyte characters?
How can I check whether a file exists? I want to warn the user if a requested input file is missing.
Explain how do you generate random numbers in c?
explain what is a newline escape sequence?
What is static function in c?
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
how can I convert a string to a number?
What is the best way to comment out a section of code that contains comments?
the question is that what you have been doing all these periods (one year gap)
What is the difference between break and continue?
What is the value of h?
What is the acronym for ansi?
Explain what is wrong with this statement? Myname = ?robin?;
Explain how do you use a pointer to a function?
Why is c so powerful?