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 / 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 |
Post New Answer View All Answers
Is it better to bitshift a value than to multiply by 2?
Write a progarm to find the length of string using switch case?
What are the different types of C instructions?
Is c still used?
What are global variables and explain how do you declare them?
When a c file is executed there are many files that are automatically opened what are they files?
In which header file is the null macro defined?
How does #define work?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
What do you know about the use of bit field?
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor
What does printf does?
What is the purpose of macro in C language?
What is the time and space complexities of merge sort and when is it preferred over quick sort?
How do shell structures work?