What is the value of y in the following code?
x=7;y=0;
if(x=6)
y=7;
else
y=1;
Answer Posted / balaji jayakumar
y=7 because if condition doesnt fail... so the immediate
statement after if will be executed and 7 gets printed. It
is quite certain only if "if" fails else will be be opted
for. so y=7... no error statements will occur.. i have tried
it in c.
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is meant by high-order and low-order bytes?
What are extern variables in c?
What is zero based addressing?
What is c++ used for today?
What is the difference between procedural and declarative language?
Explain 'far' and 'near' pointers in c.
How can you draw circles in C?
What is the difference between pure virtual function and virtual function?
Write a program to find factorial of a number using recursive function.
For what purpose null pointer used?
What is use of pointer?
What are predefined functions in c?
Is there sort function in c?
void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply
How can I pad a string to a known length?