Predict the output of the following C programs
void main()
int i=3;
while(i<10)
printf("%d\n", i);
i++;
getch();
Answers
Answered by
1
Answer:
Explanation:
hope this will help you
Answered by
0
Compile Time error :
Explanation:
- The above program holds the two type of syntax error which are as follows:
- There is no header file, which holds the code of predefined function which is used in the program.
- There is no curly braced to define the scope of the main function. it is necessary because every function needs to define his scope so that the compiler can understand the execution start and endpoint.
- If the user fixes the above-defined error then the above code will execute an infinite loop because it also needs curly braces so that the increment operation comes in the scope of the for-loop.
Learn More:
- C program : https://brainly.in/question/3999878
Similar questions
Physics,
5 months ago
Biology,
10 months ago
Chemistry,
1 year ago
Environmental Sciences,
1 year ago
Accountancy,
1 year ago