
Topic: Structure of a C Program + Keywords & Identifiers
Welcome to Day 1 of your APECET & TSECET 2026 CSE preparation!
We’re starting with the foundation of C programming — the structure of every C program, and the essential building blocks: keywords and identifiers.
This blog includes:
✅ Easy concept notes
✅ 10 most expected MCQs
✅ Detailed answer key and explanations
✅ SEO-optimized layout + Telegram PDF prompt
Concept Notes: Structure of a C Program + Keywords & Identifiers
🔹 1. Structure of a C Program
A basic C program is written using the following parts:
#include <stdio.h> // Preprocessor Directive
int main() { // Main Function
printf("Hello"); // Statements go here
return 0; // Exit status
}
Explanation of Each Part:
#include <stdio.h>
– Adds standard input/output functions likeprintf()
,scanf()
to your program.int main()
– Every C program starts executing from this main function.{ ... }
– Group the body of the function.return 0;
– Indicates that the program completed successfully.
🔹 2. Keywords in C
- Keywords are reserved words that have special meaning in C.
- You cannot use them for variable or function names.
Examples:
int, float, return, if, else, for, while, void, break
These are fixed and predefined. You cannot use:
int int = 5; // ❌ Invalid – 'int' is a keyword
3. Identifiers in C
- Identifiers are custom names given to variables, functions, arrays, etc.
- They must follow specific rules:
✅ Rules for Identifiers:
Rule | Example |
---|---|
Must start with letter or _ | value , _temp |
Can contain digits | num1 , score_99 |
Cannot be a keyword | ❌ while , int |
No spaces or symbols allowed | ❌ total value |
🧠 10 MCQs – Day 1 Practice Set
❗ Attempt these before checking answers below.
1️⃣ Which part of the C program is executed first?
A) #include
B) main()
C) return 0
D) printf()
2️⃣ Which of the following is a valid C identifier?
A) int
B) 2value
C) my_value
D) return
3️⃣ What is the purpose of #include <stdio.h>
in C?
A) To begin the program
B) To allow printing & input functions
C) To create variables
D) To define main()
4️⃣ How many keywords are there in C (C89 standard)?
A) 16
B) 32
C) 64
D) 128
5️⃣ Which one is not a keyword in C?
A) return
B) void
C) class
D) for
6️⃣ What symbol is used to end a statement in C?
A) .
B) :
C) ;
D) ,
7️⃣ What will happen if main()
is missing in a C program?
A) Error: No output
B) Code runs normally
C) It creates a warning
D) It automatically adds it
8️⃣ Which of these is an invalid identifier?
A) _temp
B) while
C) data2
D) sum
9️⃣ What does return 0;
mean in C?
A) Print 0
B) Exit program with success
C) Loop ends
D) Nothing happens
🔟 Why can’t we use keywords as variable names?
A) Compiler crashes
B) They are reserved for specific meanings
C) They’re not supported by compilers
D) They’re too short
✅ Answer Key
Q.No | Answer |
---|---|
1 | B |
2 | C |
3 | B |
4 | B |
5 | C |
6 | C |
7 | A |
8 | B |
9 | B |
10 | B |
🧠 Explanations for MCQs
- Q1:
main()
is the entry point where execution starts. - Q2:
my_value
is a valid name;int
andreturn
are keywords;2value
starts with digit — invalid. - Q3:
#include <stdio.h>
allows use of functions likeprintf()
andscanf()
. - Q4: C has 32 keywords in C89 standard.
- Q5:
class
is a C++ keyword, not part of C. - Q6: In C, every statement must end with a semicolon (;).
- Q7: Missing
main()
= compile error. The program won’t run. - Q8:
while
is a keyword and cannot be used as an identifier. - Q9:
return 0;
tells OS that program ran without errors. - Q10: Keywords are reserved by compiler, so cannot be re-used for naming.
📥 Download Today’s Notes + MCQ PDF
👉 Available at 9:00 AM in our Telegram Group
Join here: @LearnNewThingsHub
💬 Comment Task for Learners
🗣️ Which part of today’s topic was confusing –
return 0
,main()
, or identifier rules?
Drop your doubt in comments. We’ll pick it for explanation in our next YouTube Shorts!
srikar
September 21, 2025identifiers are some confusing
LearnNewThings
September 21, 2025Don’t warry you will get it all in group on Monday