#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


Please Help Members By Posting Answers For Below Questions

What are the two types of functions in c?

562


What does do in c?

601


What are run-time errors?

594


Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.

2643


Why #include is used in c language?

590






Is there a way to jump out of a function or functions?

629


What are the different types of errors?

635


Explain what is the best way to comment out a section of code that contains comments?

710


What is the difference between procedural and declarative language?

642


What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers

670


how to make a scientific calculater ?

1558


What is getche() function?

603


Why does not c have an exponentiation operator?

624


What does *p++ do?

579


What does static variable mean in c?

646