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 / karan

it will display the garbage value bcoz there is semicolon
at end of the for loop which will be
-128

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are header files? What are their uses?

642


What is the process to create increment and decrement stamen in c?

590


Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings

2253


What is ## preprocessor operator in c?

618


What is the use of pointers in C?

626






What is the difference between int main and void main in c?

595


Can you write a programmer for FACTORIAL using recursion?

618


write a program to create a sparse matrix using dynamic memory allocation.

4375


What is a function in c?

577


write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);

1850


How can you tell whether a program was compiled using c versus c++?

622


Should I learn data structures in c or python?

587


What is union and structure in c?

622


Define recursion in c.

704


What is the use of a ‘’ character?

589