#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
What are the two types of functions in c?
What does do in c?
What are run-time errors?
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 “****”.
Why #include is used in c language?
Is there a way to jump out of a function or functions?
What are the different types of errors?
Explain what is the best way to comment out a section of code that contains comments?
What is the difference between procedural and declarative language?
What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers
how to make a scientific calculater ?
What is getche() function?
Why does not c have an exponentiation operator?
What does *p++ do?
What does static variable mean in c?