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

Answer Posted / priya

Logically it is wrong ,because relational operator(==) is
used to check the condition/expression
if(x==6) then the result of y is 1

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does the file stdio.h contain?

597


Without Computer networks, Computers will be half the use. Comment.

1861


What is meant by errors and debugging?

639


When should I declare a function?

614


Explain what is the benefit of using enum to declare a constant?

579






Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)

681


Is calloc better than malloc?

565


Describe how arrays can be passed to a user defined function

774


What happens if a header file is included twice?

580


What is the size of structure pointer in c?

605


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

3132


What are c identifiers?

621


How can I run c program?

677


Should a function contain a return statement if it does not return a value?

588


write a program to print largest number of each row of a 2D array

1862