x=2,y=6,z=6
x=y==z;
printf(%d",x)
Answers were Sorted based on User's Feedback
Answer / guest
y==z checks if both are equal and returns TRUE or FLASE
(1 / 0). In this case y = z = 6, so it returns TRUE / 1. x
= 1.
| Is This Answer Correct ? | 27 Yes | 0 No |
Answer / amit
since "=" has a low precedence over "==" .. thus "y==z" will
be evaluated first and the returned value will be stored in
x which will be printed subsequently...
In this case since y equals z, x = 1 will be printed
cheers
AD
| Is This Answer Correct ? | 15 Yes | 0 No |
Answer / anand n
Ans:1
x=2,y=6,z=6//here x value is:2
x=y==z;//x=6 and y=6 so x is equal to y means its true,now
//x value is 1
printf(%d",x)
| Is This Answer Correct ? | 8 Yes | 1 No |
Answer / vijoeyz
My apologies for the silly mistake. The value of x is 1 as
everyone has said.
Thanks,
Vijay Zanvar
http://faq.zanvar.in
| Is This Answer Correct ? | 7 Yes | 2 No |
Answer / mahadevan
in C language this statement(x=y==z;)is declaration syntax Error
| Is This Answer Correct ? | 5 Yes | 2 No |
Answer / suchita
here we can not use and conditional statement thats why we can
not say "this is a boolean eq" and thats why x print either 2 or
garbage value
| Is This Answer Correct ? | 7 Yes | 5 No |
Answer / wasim
First of all the given syntax for printf statement is
wrong.it will not show any output but the syntax error
| Is This Answer Correct ? | 1 Yes | 1 No |
in memory first location hold value of x as 2....ofter
assigning x=y..x(6)<-y..value of x is overwritten because
memory location holds only one value at a time means now x
holds value as 6......
| Is This Answer Correct ? | 0 Yes | 1 No |
how to execute a program using if else condition and the output should enter number and the number is odd only...
Write the following function in C. stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return - 1. The function should not make use of any C library function calls.
3 Answers Google, Infosys, JTL, OpenFeel,
nic scientist exam
What is the use of extern in c?
What is null pointer constant?
code for selection sort?
Why structure is used in c?
what is the difference between entry control and exit control statement?
12 Answers Darbari Lal DAV Model School,
a=5 a=a++/++a
control 50 devices which has 2 states on and off.using bitwise operator.plz answer it its urgent
How do you use a pointer to a function?
Given a single Linked list with lakhs of nodes and length unknown how do you optimally delete the nth element from the list?