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
Explain union. What are its advantages?
What is the use of typedef in c?
FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.
What does c in a circle mean?
Is that possible to store 32768 in an int data type variable?
A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none
Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc
Why do we use header files in c?
Why is it usually a bad idea to use gets()? Suggest a workaround.
What are the applications of c language?
Write a C program to count the number of email on text
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
What is indirection? How many levels of pointers can you have?
Write a program of advanced Fibonacci series.
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above