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 ?    24 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me when is a void pointer used?

644


What is the difference between char array and char pointer?

525


How can I delete a file?

626


What is the use of a static variable in c?

588


Can I initialize unions?

590






Differentiate between new and malloc(), delete and free() ?

668


What are types of preprocessor in c?

613


What does the c preprocessor do?

615


What are runtime error?

623


What is malloc return c?

597


What is a built-in function in C?

790


What is the difference between text and binary modes?

639


Explain what is the difference between text files and binary files?

612


What are the advantages of Macro over function?

1191


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

15491