C Programming MCQs: 12 Solved Intro & Data Types Questions with Explanations

Attempt 12 C Programming MCQs drawn from state, teacher-recruitment and placement-style papers, then use the worked explanations to fix each concept.

KnowledgeGate Team

Exam prep & CS education

Updated 21 Jul 20267 min read

Intro & Data Types is where every C paper starts and where careless marks are lost: what C is, what counts as a valid identifier, which types exist, and how many bytes each takes. The same few ideas keep returning in state PSC and teacher-recruitment papers such as MPPSC, UPLT, DSSSB, HTET, Bihar STET, RSSB and TPSC, and in CDAC C-CAT and company tests, which is why KnowledgeGate's question bank holds more than 80 past questions on this one subtopic. Attempt each of the 12 below before reading its answer and explanation.

What kind of language is C?

C is a procedural, structured language, not an object-oriented one. Dennis Ritchie developed it at Bell Labs in the early 1970s for system software, most famously Unix. Those two facts settle the first pair.

Q1. 'C' Language is a

MPPSC 2025 | Open this question

  • A. Object-Oriented Programming Language

  • B. Procedural Language

  • C. Machine Language

  • D. Common Business-Oriented Language

Answer: B. Procedural Language. C organises a program as functions that perform steps in a procedure. It does not provide classes or inheritance, and C source is compiled rather than being machine language itself. Option D points towards COBOL, not C.

Q2. C was primarily developed as a

UPLT 2018 | Open this question

  • A. system programming language

  • B. general purpose language

  • C. data processing language

  • D. None of the above

Answer: A. system programming language. C is widely used as a general-purpose language today, but the stem asks why it was primarily developed. Its original job was writing Unix and other system software, which explains its close control over memory.

Identifiers and keywords, the free marks

An identifier may contain letters, digits and underscores, but it cannot begin with a digit or match a reserved keyword. The 32 classic C keywords are lowercase. Apply those rules directly instead of judging a name by how technical it sounds.

Q3. Which of the following is NOT a valid C identifier?

CDAC C-CAT 2025

  • A. _value

  • B. total1

  • C. 2name

  • D. rate_of_pay

Answer: C. 2name. An identifier cannot start with a digit. A leading underscore is legal, a digit may appear after the first character, and underscores may join words, so the other three forms pass the stated rules.

Q4. Which of the following is the valid identifier in C?

Bihar STET 2025 | Open this question

  • A. global

  • B. break

  • C. while

  • D. int

Answer: A. global. break, while and int are reserved C keywords, so they cannot name variables. global sounds special, but it is not a C keyword, which is the trick in this question.

The C data type family

C's basic types include int, char, float and double, along with void. There is no built-in string type, only arrays of char, while the floating-point family contains float, double and long double.

Q5. Which of the following is NOT a valid data type in C ?

TPSC Senior Computer Assistant 2024 | Open this question

  • A. int

  • B. float

  • C. string

  • D. char

Answer: C. string. C stores text as an array of char ending with the null character \0; it has no built-in string type. This differs from languages that provide string or String as a standard type.

Q6. In C, what are the various types of real data type (floating point data type)?

RSSB 2022, Basic Computer Instructor Paper 2 | Open this question

  • A. float, long double

  • B. long double, short int

  • C. float, double, long double

  • D. short int, double long int, float

Answer: C. float, double, long double. These are the three floating-point types, listed in increasing precision. short int belongs to the integer family, and double long int is not a C type.

Sizes and ranges you must know

C leaves type sizes implementation-defined, but such questions expect conventional figures for a typical modern 64-bit platform: int is 4 bytes and short int is 2 bytes. For a signed 16-bit short, the range is from -2^15 to 2^15 - 1.

Q7. On a typical 64-bit system, the size of an int in C is:

CDAC C-CAT 2025

  • A. 1 byte

  • B. 2 bytes

  • C. 4 bytes

  • D. 8 bytes

Answer: C. 4 bytes. Pointer width commonly grows to 8 bytes on a 64-bit platform, but int remains 4 bytes in the common data models used by Linux, Windows and macOS. The phrase "64-bit" is bait for option D.

Q8. The range of short int data type in 'C' is __________.

UPLT 2026 | Open this question

  • A. – 32768 to + 32767

  • B. 00000 to + 65535

  • C. – 32768 to 0

  • D. – 65535 to + 65535

Answer: A. – 32768 to + 32767. Two bytes give 16 bits. A signed 16-bit value runs from -2^15 = -32768 through 2^15 - 1 = 32767; option B instead gives the unsigned short range, 0 to 65535.

Constants and number systems inside printf

An integer constant is a bare whole number without a decimal point or quotation marks. A leading 0 makes an integer literal octal, while 0x makes it hexadecimal. That prefix rule controls the output in Q10.

Q9. Which of the following is a valid integer constant in C?

Hexaware 2023

  • A. 123.45

  • B. "123"

  • C. 123

  • D. '123'

Answer: C. 123. 123.45 is a floating constant and "123" is a string literal. C does allow a multi-character constant such as '123', but its value is implementation-defined and not portable, so it is never the safe answer. The bare 123 is the plain integer constant.

Q10. What is the output of the following code written in C?

DSSSB TGT 2021, Shift 1 | Open this question

void main()
{
printf("%d%d%d", 62, 062, 0x62);
}
  • A. 506298

  • B. 629850

  • C. 625098

  • D. 986250

Answer: C. 625098. The literal 62 is decimal 62. The leading zero makes 062 octal, so it equals 6 × 8 + 2 = 50; 0x62 is hexadecimal, so it equals 6 × 16 + 2 = 98. The three %d conversions have no separators, so 62, 50 and 98 join to produce 625098. If the prefixes still feel slippery, revise Number Systems and Base Conversions Explained.

Figure showing 62 as decimal 62, 062 as octal 50 and 0x62 as hexadecimal 98, so printf prints 625098 with no separators.

char is a number: ASCII questions

A char is stored as a numeric character code, so printing it with %d reveals the integer underneath. Three useful ASCII anchors are 'A' = 65, 'a' = 97 and '0' = 48. Standard ASCII itself is a 7-bit code.

Q11. What will be the output of the following?

UPLT 2018 | Open this question

main ( )
{
    int a = 'A';
    printf ("%d", a);
}
  • A. A

  • B. a

  • C. 65

  • D. Compilation error

Answer: C. 65. Assigning the character constant 'A' to an int stores its ASCII code, 65. %d prints that integer; %c would print the character A. This works because every ASCII character has a defined numeric code.

Q12. Full form of ASCII is :

HTET 2023 | Open this question

  • A. American Simulation Code for Information Interchange

  • B. African Simulation Code for Information Interchange

  • C. African Standard Code for Information Interchange

  • D. American Standard Code for Information Interchange

Answer: D. American Standard Code for Information Interchange. The other three options only swap American with African and Standard with Simulation, so read the first two words carefully. Standard ASCII uses 7 bits and therefore represents 2^7 = 128 character codes.

How exams test Intro & Data Types, and your next step

Definition and classification questions here come from MPPSC, UPLT, TPSC and HTET papers. Identifier and constant checks come from CDAC C-CAT, Bihar STET and Hexaware papers, while DSSSB and UPLT also test range calculation and output prediction. None of that predicts weightage in your own paper; it shows which ideas keep coming back and are worth locking down first. The best way to prepare is to solve real past questions, for the reason explained in Why PYQs Beat Buying Another Question Bank.

For more questions on this subtopic, work through the Intro & Data Types PYQ hub.

For a complete path from these fundamentals through pointers and files, continue with the C Language Course, Concepts, MCQs & Coding. You can also browse the wider Coding & Skill Development Courses collection. If you are targeting one recruitment test first, work from that exam's own syllabus and its past papers rather than trying to cover every language at once.

The short version is simple: know the identifier rules, separate integer and floating types, calculate ranges from bits, read literal prefixes before evaluating printf, and remember the ASCII anchors. Then solve the next set without looking at the explanations until you have committed to each answer.