What will be output of the c code? #include
int main()
{
char x=0;
for(x=0;x<=127;x++)
{
printf("%d",x);
}
return 0;
}
a)compilation error
b)0,1,2,....,127
c)0,1,2,....,127,-128,-127,.....,-2,-1,0,1,....infinite loop
d)1,2,3,....,127
Answers
Answered by
0
Duh!! Compilation error
It's I
Missing #include ....
Answered by
0
Option a:compilation error:
Explanation:
- The above code is in c language, which has not the complete syntax which adds the header file.
- So the compile-time error occurs on the place of "#include". It can be written as "#include<stdio.h>".
- If the user fixes the above error, then the above program runs the infinite loop. Because the character data type range varies from -128 to 127.
Learn More:
- C-program : https://brainly.in/question/610076
Similar questions