What is the value of y in the following code?
x=7;y=0;
if(x=6)
y=7;
else
y=1;

Answer Posted / mahendra giri

y will be 7 because in the if condition we have assigned
value 6 on x not ==,so ans of
y =7

Is This Answer Correct ?    40 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is double pointer in c?

584


What are multidimensional arrays?

656


What are the main characteristics of c language describe the structure of ac program?

606


Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

599


Differentiate Source Codes from Object Codes

818






Suggesting that there can be 62 seconds in a minute?

594


exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above

657


Explain what is meant by high-order and low-order bytes?

631


How can I ensure that integer arithmetic doesnt overflow?

604


What is merge sort in c?

640


What is local and global variable in c?

614


what is the significance of static storage class specifier?

1660


What are the restrictions of a modulus operator?

630


Why flag is used in c?

651


Explain function?

663