What is the output of the program given below
#include<stdio.h>
main()
{
char i=0;
for(;i>=0;i++) ;
printf("%d\n",i);
}
Answers were Sorted based on User's Feedback
Answer / 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 |
What is the right type to use for boolean values in c? Is there a standard type?
Can stdout be forced to print somewhere other than the screen?
What is the 'named constructor idiom'?
Write the following function in C. stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return - 1. The function should not make use of any C library function calls.
3 Answers Google, Infosys, JTL, OpenFeel,
How do I use strcmp?
Diff: between this 2 classes in terms of memory class A { int i; char c; double d; }; class A { double d; int i; char c; }; How it is calculating?
if function is declared as static in one source file, if I would like to use the same function in some other source file...is it possible....how ?
What are 'near' and 'far' pointers?
What is the general form of #line preprocessor?
#include <stdio.h> int main() { int i; for (i=0;i<3;++i) { fork();fork(); } } How many processes are created when running this program (including the initial one)? Explain ؟؟؟
what will be the output of this program? void main() { int a[]={5,10,15}; int i=0,num; num=a[++i] + ++i +(++i); printf("%d",num); }
What is the meaning When we write "#include" what is # and what does include does there???