when will be evaluated as true/
if(x==x==x)
a) x=1;
b) x=0;
c) x=-1;
d) none

Answer Posted / naveen

o/p is x=0;
as x==x it will give 1 as result;
then again x==1;
so it will be false if x!=1i.e it will be true for only if
x value is 1.
i.e x=1 only if xis 1 other wise it is 0

Is This Answer Correct ?    21 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When should you use a type cast?

583


What is gets() function?

662


How do you declare a variable that will hold string values?

661


Explain what is the difference between a free-standing and a hosted environment?

630


How many loops are there in c?

571






What is string concatenation in c?

562


Difference between constant pointer and pointer to a constant.

605


a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list

619


Explain what is the benefit of using an enum rather than a #define constant?

712


What is the use of pragma in embedded c?

585


Difference between pass by reference and pass by value?

649


Which is more efficient, a switch statement or an if else chain?

571


Is c high or low level?

572


What are conditional operators in C?

618


Write a program in c to replace any vowel in a string with z?

680