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
What is the difference between pure virtual function and virtual function?
What are the properties of union in c?
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
In C programming, how do you insert quote characters (‘ and “) into the output screen?
What is the difference between declaring a variable by constant keyword and #define ing that variable?
List the variables are used for writing doubly linked list program.
How can a program be made to print the name of a source file where an error occurs?
Differentiate between full, complete & perfect binary trees.
Explain about C function prototype?
using for loop sum 2 number of any 4 digit number in c language
Explain what is #line used for?
Can a void pointer point to a function?
What functions are used in dynamic memory allocation in c?
How can you tell whether a program was compiled using c versus c++?
In C programming, what command or code can be used to determine if a number of odd or even?