What is the value of y in the following code?
x=7;y=0;
if(x=6)
y=7;
else
y=1;
Answer Posted / piyush
its looks logically incorrect,but in c anc c++ if any such
incident occurs like if(x=6), this condition is always
treated as true
will give a warning ,but will execute this as considering
the if condition as true
ANSWER to this question is y=7
| Is This Answer Correct ? | 15 Yes | 0 No |
Post New Answer View All Answers
Why is sprintf unsafe?
In c programming, explain how do you insert quote characters (? And ?) Into the output screen?
What are structure members?
What are actual arguments?
main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }
How was c created?
How does #define work?
What is #line in c?
How to compare array with pointer in c?
Explain how do you view the path?
Write a program to find the biggest number of three numbers in c?
Explain what header files do I need in order to define the standard library functions I use?
What is a substring in c?
Who developed c language and when?
What are the features of c language?