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


Please Help Members By Posting Answers For Below Questions

What is static and auto variables in c?

778


What is the time and space complexities of merge sort and when is it preferred over quick sort?

866


How to delete a node from linked list w/o using collectons?

2355


Explain what is the heap?

799


Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

888


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

904


What is getche() function?

806


write a progrmm in c language take user interface generate table using for loop?

1782


What does. int *x[](); means ?

815


What is 1d array in c?

836


What would be an example of a structure analogous to structure c?

765


What are the different file extensions involved when programming in C?

997


What are predefined functions in c?

758


Why main is used in c?

812


what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?

1647