when will be evaluated as true/
if(x==x==x)
a) x=1;
b) x=0;
c) x=-1;
d) none
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / singh
if block will be evaluated as true only if x=1.
because for first comparision x==x it returns 1.
then it again compares with x==x ie,x==1.
-it will return true only if x=1;
Is This Answer Correct ? | 14 Yes | 3 No |
Answer / vikram
if x=1,then x==x evaluates to 1;
again,1==x evaluates to 1 only if x=1,
if(1) means condition becomes true and the if block will be
executed,
thnx
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / vignesh1988i
all the three cases possible as for as i know.......
x=1
x=0
x=-1
Is This Answer Correct ? | 1 Yes | 10 No |
main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above
What is the difference between far and near in c?
What is the difference between typedef and #define?
How does sizeof know array size?
Explain how do you list files in a directory?
main() { int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }
5 Answers Vector, Vector Solutions,
What is #line in c?
Explain spaghetti programming?
Sir i want e-notes of C languge of BAlaguruswami book i.e scanned or pdf file of balaguruswamy book on c language.PLEASE SEND ME on my mail id ajit_kolhe@rediff.com
Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
Why is not a pointer null after calling free?
What is the use of a semicolon (;) at the end of every program statement?