#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 global variables?
What is c definition?
What is the use of define in c?
Why main is not a keyword in c?
Is there a way to switch on strings?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
What is struct node in c?
Explain the process of converting a Tree into a Binary Tree.
Why header files are used?
What is the use of void pointer and null pointer in c language?
Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.
What will the preprocessor do for a program?
Write a progarm to find the length of string using switch case?
Compare interpreters and compilers.
What language is c written?