#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



#include<stdio.h> void main() { int a,b,c; a=b=c=1; c=++a || ++b && ++c; pri..

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

#include<stdio.h> void main() { int a,b,c; a=b=c=1; c=++a || ++b && ++c; pri..

Answer / gopinath.j

2 1 1

Is This Answer Correct ?    4 Yes 1 No

#include<stdio.h> void main() { int a,b,c; a=b=c=1; c=++a || ++b && ++c; pri..

Answer / biren

a=2 b=1 c=1
why plz tell me

Is This Answer Correct ?    4 Yes 2 No

Post New Answer

More C Interview Questions

Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

0 Answers  


#include<stdio.h> { printf("Hello"); } how compile time affects when we add additional header file <conio.h>.

0 Answers  


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

1 Answers  


Write a factorial program using C.

0 Answers   iNautix,


What does static mean in c?

1 Answers  


How can I remove the trailing spaces from a string?

0 Answers   Aspire,


What will be the outcome of the following conditional statement if the value of variable s is 10?

0 Answers  


What is the importance of c in your views?

0 Answers  


how to determine the complexity of an algorithm as log(n)

1 Answers   Google,


What do mean by network ?

0 Answers  


Explain how can I make sure that my program is the only one accessing a file?

0 Answers  


declare afunction pointer to int printf(char *)?

1 Answers   HCL,


Categories