#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

What is an expression?

0 Answers  


what are brk, sbrk?

1 Answers   Oracle,


What is static and auto variables in c?

0 Answers  


Write any data structure program (stack implementation)

1 Answers   HTC,


A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles

0 Answers  






What do you mean by c?

0 Answers  


what is the different bitween abap and abap-hr?

0 Answers   TCS,


how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12

0 Answers  


application attempts to perform an operation?

0 Answers  


Can we declare variables anywhere in c?

0 Answers  


Write a program to exchange two variaables without temp

9 Answers   Geometric Software,


write a program to sum of its digit with using control structure or with out using loop. for ex: let the number is 25634 then answer will be=2+5+6+3+4=20

4 Answers  


Categories