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


Please Help Members By Posting Answers For Below Questions

what are the facialities provided by you after the selection of the student.

1660


Explain bitwise shift operators?

632


Explain what is wrong with this program statement? Void = 10;

766


What does node * mean?

714


What are terms in math?

594






How many types of operator or there in c?

605


Explain what header files do I need in order to define the standard library functions I use?

649


When do we get logical errors?

639


What does void main () mean?

736


Is sizeof a keyword in c?

584


Define the scope of static variables.

606


What is a pointer and how it is initialized?

609


How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same

649


Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays

1893


Are the variables argc and argv are always local to main?

574