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 / 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 |
Post New Answer View All Answers
What is static and auto variables in c?
What is the time and space complexities of merge sort and when is it preferred over quick sort?
How to delete a node from linked list w/o using collectons?
Explain what is the heap?
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.
An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above
What is getche() function?
write a progrmm in c language take user interface generate table using for loop?
What does. int *x[](); means ?
What is 1d array in c?
What would be an example of a structure analogous to structure c?
What are the different file extensions involved when programming in C?
What are predefined functions in c?
Why main is used in c?
what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?