main()
{
int i = -3,j=2,k=0,m;
m= ++i || ++j && ++k;
printf("%d%d%d",i,j,k,m);
}
Answer Posted / harend
results :
i=-2
j=2
k=0
m=1
First, the '&&' part is to be considered over '||'.
AS follow: m = ++i||++j&&++k (is given)
what ever be the result of (++j&&++k),the value of m =1
,since the new value i= -2 (i.e a non zero value so taken as
true or 1)
so,
1||(++j&&++k) will always be true, that is 1 . compiler
ignores ++j ,++k and only consider ++i.
thank you !
| Is This Answer Correct ? | 25 Yes | 6 No |
Post New Answer View All Answers
Why c language is called c?
How can you invoke another program from within a C program?
What is break in c?
Why is extern used in c?
What are register variables? What are the advantage of using register variables?
What is pointer to pointer in c?
Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?
How to delete a node from linked list w/o using collectons?
There seem to be a few missing operators ..
What’s the special use of UNIONS?
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
code for find determinent of amatrix
Why is void main used?
Define Array of pointers.
What is union and structure in c?