#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);
}
Answers were Sorted based on User's Feedback
Answer / 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 |
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
#include<stdio.h> { printf("Hello"); } how compile time affects when we add additional header file <conio.h>.
I have an array of 100 elements, each of which is a random integer. I want to know which of the elements: a) are multiples of 2 b) are multiples of 2 AND 5 c) have a remainder of 3 when divided by 7
Write a factorial program using C.
What does static mean in c?
How can I remove the trailing spaces from a string?
What will be the outcome of the following conditional statement if the value of variable s is 10?
What is the importance of c in your views?
how to determine the complexity of an algorithm as log(n)
What do mean by network ?
Explain how can I make sure that my program is the only one accessing a file?
declare afunction pointer to int printf(char *)?