for(i=1;i>0;i++);
printf("i=%d",i);
what will be the answer????
Answer Posted / guest
The value of i starts at 1 and increments from there. The
loop terminates when i <= 0.
For an unsigned value, this is only possible when i == 0.
For a signed value, incrementing a positive value by 1 will
eventually overflow within the binary word to become the
most negative value an integer can hold. The sequence is
thus (..., INT_MAX-1, INT_MAX, INT_MIN) and the loop
terminates, where INT_MAX and INT_MIN are the "most
positive" and "most negative" values for the word size used
on your machine.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above
Differentiate between the = symbol and == symbol?
How can I find out if there are characters available for reading?
What is the difference between printf and scanf )?
What standard functions are available to manipulate strings?
Why are all header files not declared in every c program?
What are qualifiers in c?
What would happen to X in this expression: X += 15; (assuming the value of X is 5)
in any language the sound structure of that language depends on its a) character set, input/output function, its control structures b) character set, library functions, input/output functions its control structures c) character set, library functions, control sturctures d) character set, operators, its control structures
Explain which function in c can be used to append a string to another string?
How many types of sorting are there in c?
What is c value paradox explain?
What are void pointers in c?
What are variables and it what way is it different from constants?
Explain how can a program be made to print the name of a source file where an error occurs?