What is the output of the program given below
#include<stdio.h>
main()
{
char i=0;
for(;i>=0;i++) ;
printf("%d\n",i);
}
Answer Posted / gajanandon
after for there is semicolon...means empty statement. So no
effect of printf.
so for runs till i (char value) increments in positive
direction and terminates once it exceeds 127 (char
limitation).
Hence finally printf will execute and then prints -128.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is the explanation for the dangling pointer in c?
please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics
How are Structure passing and returning implemented by the complier?
What are different types of operators?
What is the use of a conditional inclusion statement in C?
What are the advantages of using macro in c language?
a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion
Linked lists -- can you tell me how to check whether a linked list is circular?
In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none
Explain bit masking in c?
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
What is difference between class and structure?
How do you use a 'Local Block'?
What is c language and why we use it?
What does c mean in standard form?