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 |
is assignment operator is arithmatic or not
Which is better between malloc and calloc?
Write a program to produce the following output in c language? 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
what different between c and c++
In the below code, how do you modify the value 'a' and print in the function. You'll be allowed to add code only inside the called function. main() { int a=5; function(); // no parameters should be passed } function() { /* add code here to modify the value of and print here */ }
How can you access memory located at a certain address?
Why c is called free form language?
2. What does static variable mean?
Why use int main instead of void main?
Differentiate between a for loop and a while loop? What are it uses?
pick out the odd one out of the following a.malloc() b.calloc() c.free() d.realloc()
what is the similarities between. system call and library function?