#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

Explain what is the difference between functions abs() and fabs()?

622


Do you know what are bitwise shift operators in c programming?

588


What is void pointers in c?

591


develop algorithms to add polynomials (i) in one variable

1746


which is conditional construct a) if statement b) switch statement c) while/for d) goto

740






In C language, a variable name cannot contain?

746


Why do we use null pointer?

608


What is the use of printf() and scanf() functions?

636


What is calloc()?

630


What is function prototype in c language?

617


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.

4843


How many bytes are occupied by near, far and huge pointers (dos)?

675


how to create duplicate link list using C???

2076


Can we change the value of constant variable in c?

579


How many loops are there in c?

583