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
Give basis knowledge of web designing ...
What is advantage of pointer in c?
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????
How to explain the final year project as a fresher please answer with sample project
How can a program be made to print the line number where an error occurs?
Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?
What is s or c?
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
what will be the output for the following main() { printf("hi" "hello"); }
main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above
How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?
What is #include cctype?
Explain the use of 'auto' keyword
while initialization of array why we use a[][2] why not a[2][]...?
Subtract Two Number Without Using Subtraction Operator