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
What are types of structure?
Sir i need notes for structure,functions,pointers in c language can you help me please
What are the different data types in C?
Tell me the use of bit field in c language?
Why we use break in c?
Ow can I insert or delete a line (or record) in the middle of a file?
What is the purpose of realloc()?
Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.
Multiply an Integer Number by 2 Without Using Multiplication Operator
What is clrscr ()?
Explain what header files do I need in order to define the standard library functions I use?
Explain built-in function?
Explain how do you view the path?
What is difference between stdio h and conio h?
In which header file is the null macro defined?