#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
Explain what is the difference between functions abs() and fabs()?
Do you know what are bitwise shift operators in c programming?
What is void pointers in c?
develop algorithms to add polynomials (i) in one variable
which is conditional construct a) if statement b) switch statement c) while/for d) goto
In C language, a variable name cannot contain?
Why do we use null pointer?
What is the use of printf() and scanf() functions?
What is calloc()?
What is function prototype in c language?
Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.
How many bytes are occupied by near, far and huge pointers (dos)?
how to create duplicate link list using C???
Can we change the value of constant variable in c?
How many loops are there in c?