QUESTION 41 · C fundamentals
State two practical rules for naming identifiers in C.
2 marksAnswer
Use a letter as the first character of a beginner-style name, followed by letters, digits or underscores; do not use a keyword.
- total_marks is valid; 2marks and total-marks are not valid single identifiers.
- Names are case-sensitive: total and Total are different. Avoid reserved underscore patterns.