#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 convert a string to a number?
Explain zero based addressing.
How do I get a null pointer in my programs?
What are the general description for loop statement and available loop types in c?
Why is void main used?
How pointers are declared?
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
How can I make it pause before closing the program output window?
Explain what is the difference between #include and #include 'file' ?
What are logical errors and how does it differ from syntax errors?
What is oops c?
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters
What is indirection in c?
What is the difference between single charater constant and string constant?