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

Answer Posted / vijay r15

In c non zero values
in if statement r
considered to be true

here if(i=6)
so it makes if(6)
hence its true

op is 7

if 1ly execute false
for if(0)

got it
r
mail to
raj.Vijay55@gmail.Com

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate fundamental data types and derived data types in C.

604


What is pointer to pointer in c language?

585


What is spaghetti programming?

662


What is a pointer on a pointer in c programming language?

611


If the size of int data type is two bytes, what is the range of signed int data type?

581






Explain what will be the outcome of the following conditional statement if the value of variable s is 10?

736


How do you initialize pointer variables?

600


What does %2f mean in c?

670


Is exit(status) truly equivalent to returning the same status from main?

576


Where is c used?

641


which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;

2382


What is || operator and how does it function in a program?

620


What is meant by initialization and how we initialize a variable?

579


If null and 0 are equivalent as null pointer constants, which should I use?

571


What are preprocessor directives?

664