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

Answer Posted / manjunath a s

it will be in infinite loop because x=6 is an assignment
statement and it will be always true.

Is This Answer Correct ?    1 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is that possible to add pointers to each other?

902


One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.

2160


What is double pointer in c?

588


What is a null string in c?

589


Why do we use null pointer?

607






write an algorithm to display a square matrix.

2223


What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?

941


Why shouldn’t I start variable names with underscores?

625


Is malloc memset faster than calloc?

616


What is sorting in c plus plus?

565


What is pass by reference in functions?

325


Tell me is null always defined as 0(zero)?

674


What is indirection? How many levels of pointers can you have?

659


Apart from dennis ritchie who the other person who contributed in design of c language.

813


Can a file other than a .h file be included with #include?

686