read the folllowing code
# define MAX 100
# define MIN 100
....
....
if(x>MAX)
x=1;
else if(x<MIN)
x=-1;
x=50;
if the initial value of x=200,what is the vlaue after
executing this code?
a.200
b.1
c.-1
d.50

Answer Posted / nila

the right answer is x=50,why?.if condition is true
and then after checking if condition x is assigned a value
of 50.so the final answer is 50.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what does it mean when a pointer is used in an if statement?

613


What is the difference between Printf(..) and sprint(...) ?

779


What are the 4 types of programming language?

576


What is file in c preprocessor?

646


Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?

749






Write a program on swapping (100, 50)

634


what is the difference between class and unio?

1854


What are the different categories of functions in c?

639


What is an array in c?

589


What is hash table in c?

563


What is difference between scanf and gets?

606


Dont ansi function prototypes render lint obsolete?

601


How can you restore a redirected standard stream?

606


Which of these functions is safer to use : fgets(), gets()? Why?

631


What are qualifiers?

613