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 is the scope of static variables in c language?
Explain spaghetti programming?
What is the use of gets and puts?
What are the different types of C instructions?
what type of questions arrive in interview over c programming?
Why is python slower than c?
What is %d called in c?
What does char * * argv mean in c?
What are the functions to open and close file in c language?
Tell us something about keyword 'auto'.
Explain what is the difference between functions getch() and getche()?
Explain setjmp()?
What is the difference between ++a and a++?
i want to know the procedure of qualcomm for getting a job through offcampus
Why can't I perform arithmetic on a void* pointer?