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 is the difference between pure virtual function and virtual function?

652


What are the properties of union in c?

590


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

15502


In C programming, how do you insert quote characters (‘ and “) into the output screen?

895


What is the difference between declaring a variable by constant keyword and #define ing that variable?

2699






List the variables are used for writing doubly linked list program.

1621


How can a program be made to print the name of a source file where an error occurs?

731


Differentiate between full, complete & perfect binary trees.

671


Explain about C function prototype?

609


using for loop sum 2 number of any 4 digit number in c language

1734


Explain what is #line used for?

608


Can a void pointer point to a function?

569


What functions are used in dynamic memory allocation in c?

596


How can you tell whether a program was compiled using c versus c++?

619


In C programming, what command or code can be used to determine if a number of odd or even?

622