Bird
0
0

Identify the error in this C program:

medium📝 Debug Q14 of 15
C - Basics and Execution Environment
Identify the error in this C program:
#include <stdio.h>
int main() {
    printf("Start\n")
    return 0;
}
AMissing #include directive
BIncorrect return type of main
CMissing semicolon after printf statement
Dmain function should return void
Step-by-Step Solution
Solution:
  1. Step 1: Check syntax of printf line

    The printf statement lacks a semicolon at the end, which is required in C.
  2. Step 2: Verify other parts

    The return type is correct, #include is present, and main returns int as expected.
  3. Final Answer:

    Missing semicolon after printf statement -> Option C
  4. Quick Check:

    Statements must end with ; = missing semicolon [OK]
Quick Trick: Every statement ends with ; in C [OK]
Common Mistakes:
  • Forgetting semicolon after function calls
  • Changing main return type incorrectly
  • Removing #include directive

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Quizzes