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
Answers were Sorted based on User's Feedback
Answer / divakar
50. irrespective of the if and else if at last ur assigning
x=50
| Is This Answer Correct ? | 24 Yes | 2 No |
Answer / 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 |
Answer / manishsoni
it will print 50 because:
if(200>100)//condition true;
then x=1
and show in memory like this
___ ____
| | | |
x | 1 | then replace x| 50 |
|___| with |____|
100 100
so print the 50 value.
| Is This Answer Correct ? | 3 Yes | 0 No |
pgm to find middle element of linklist(in efficent manner)
What is I ++ in c programming?
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
Why c is called a middle level language?
What is a nested loop?
Distinguish between actual and formal arguments.
write a c program to add two integer numbers without using arithmetic operator +
What is the process of writing the null pointer?
What is structure data type in c?
2. What is the function of ceil(X) defined in math.h do? A)It returns the value rounded down to the next lower integer B)it returns the value rounded up to the next higher integer C)the Next Higher Value D)the next lower value
what is the advantage of using SEMAPHORES to ORDINARY VARIABLES???
How many keywords (reserve words) are in c?