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 / madhu
127.As i is a char the last digit would be 127,so the loop
stops at that point.
I crosschecked it writing a program.
| Is This Answer Correct ? | 1 Yes | 9 No |
Post New Answer View All Answers
What are the differences between new and malloc in C?
Is c dynamically typed?
What is the usage of the pointer in c?
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
How can you increase the allowable number of simultaneously open files?
Difference between Function to pointer and pointer to function
how to write a c program to print list of fruits in alpabetical order?
What is the difference between abs() and fabs() functions?
How the c program is executed?
c program to compute AREA under integral
How can I check whether a file exists? I want to warn the user if a requested input file is missing.
What is s or c?
Why n++ execute faster than n+1 ?
You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.
What are the types of c language?