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
Explain what does it mean when a pointer is used in an if statement?
What is the difference between Printf(..) and sprint(...) ?
What are the 4 types of programming language?
What is file in c preprocessor?
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
Write a program on swapping (100, 50)
what is the difference between class and unio?
What are the different categories of functions in c?
What is an array in c?
What is hash table in c?
What is difference between scanf and gets?
Dont ansi function prototypes render lint obsolete?
How can you restore a redirected standard stream?
Which of these functions is safer to use : fgets(), gets()? Why?
What are qualifiers?