main()
{
int i = -3,j=2,k=0,m;
m= ++i || ++j && ++k;
printf("%d%d%d",i,j,k,m);
}
Answer Posted / nidhi yadav
here logical && has higher priority than ||. so the block
(++j&&++k)will execute first and ans of this will be (3&&1=0)
since value increment first due to preincrement operator. now
the block(++i||0)will execute as (-2||0=1) since || opertor always gives true value except(0||0=0).
thus ans will be i=-2,j=3,k=1,m=1
| Is This Answer Correct ? | 2 Yes | 7 No |
Post New Answer View All Answers
Explain how can I write functions that take a variable number of arguments?
What are header files in c programming?
What are the different types of pointers used in c language?
How is a pointer variable declared?
Why is c fast?
What type of function is main ()?
What is optimization in c?
What does 4d mean in c?
Describe newline escape sequence with a sample program?
What is a pointer value and address in c?
design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.
Write a program for finding factorial of a number.
is it possible to create your own header files?
what do you mean by inline function in C?
What is const volatile variable in c?