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
How are variables declared in c?
What is boolean in c?
What is the meaning of ?
Find MAXIMUM of three distinct integers using a single C statement
Tell me is null always defined as 0(zero)?
i have a written test for microland please give me test pattern
What is data structure in c programming?
How to define structures? ·
Is it possible to initialize a variable at the time it was declared?
This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory
Are negative numbers true in c?
PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE
string reverse using recursion
What functions are used in dynamic memory allocation in c?
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?