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 |
why we need function pointers?
c program to input values in a table(using 2D array) and print odd numbers from them
Differentiate between static and dynamic modeling.
how does the for loop work actually..suppose for the following program how it ll work plz explain to me for(i=5;i>=0;i--) prinf(i--);
What is the newline escape sequence?
main() { char x; while(x=0;x<=255;x++) printf("\nAscii value %d Charater %c",x,x); }
Do pointers need to be initialized?
What is equivalent to ++i+++j?
explain about storage of union elements.
number of times a digit is present in a number
Print all the palindrome numbers.If a number is not palindrome make it one by attaching the reverse to it. eg:123 output:123321 (or) 12321
How we can set and clear bit in a byte using macro function?