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
What is the acronym for ansi?
What is #define in c?
What are linked lists in c?
What is #include stdlib h?
Why do we use pointer to pointer in c?
an expression contains relational operators, assignment operators, and arithmatic operstors. In the absence of parentheses, they will be evaluated in which of the following order a) assignment, relational, arithematic b) arithematic, relational, assignment c) relational, arithematic, assignment d) assignment, arithematic, relational
In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.
How does placing some code lines between the comment symbol help in debugging the code?
Do you know what are the properties of union in c?
What is dangling pointer in c?
Explain how do you determine the length of a string value that was stored in a variable?
What is zero based addressing?
What functions are used for dynamic memory allocation in c language?
What are the advantages of using new operator as compared to the function malloc ()?
Is it better to bitshift a value than to multiply by 2?