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 |
f=(x>y)?x:y a) f points to max of x and y b) f points to min of x and y c)error
what is meant by the "equivalence of pointers and arrays" in C?
how to use enum datatype?Please explain me?
Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?
What is the difference between class and object in c?
How to convert a binary number to Hexa decimal number?? (Note:Do not convert it into binary and to Hexadecimal)
What does calloc stand for?
what does ‘segmentation violation’ mean?
Write a c program using for loop to print typical pattern if number of rows is entered by keyboard. ABCBA AB BA A A
WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.
Identify the operators that is not used with pointer a. && b. # c. * d. >>
if a person is buying coconuts of Rs10,and then sell that coconuts of Rs9,with the loss of one rupee.After that the person became a millaniore.how?