- History and origin of the C language
- Dennis Ritchie and the creators of predecessor languages
- Whether C is a high-level or low-level language
- Standardization bodies and versions (ANSI, K&R C)
- Data types, variable rules, and integer ranges
- Keywords, identifiers, and standard header files
This page contains 28 basic multiple choice questions on the C programming language. Each question includes the correct answer and, where useful, a short explanation. These MCQs are suitable for beginners preparing for exams, interviews, or general practice. Questions are grouped by topic so you can revise one area at a time, from C history and language type to data types, keywords, and standard headers. We have added simple explanations to help you understand the "why" behind each answer, not just memorise it.
History & Origin of C Language
Q1. Who is the father of C language?
Answer: a) Dennis Ritchie
Dennis Ritchie is known as the father of C. He created C at Bell Labs in 1972. The other names here are also famous but for different things: James Gosling created Java, Steve Jobs co-founded Apple, and Rasmus Lerdorf created PHP.
Q2. C Language developed at _________?
Answer: a) AT & T's Bell Laboratories of USA in 1972
C was born at AT&T Bell Laboratories in the USA. The year 1972 is important because that's when Dennis Ritchie finished the first working version. It wasn't created at a university or at Sun Microsystemsโit came from a research lab that needed a better language for building operating systems.
Q3. C Language is a successor to which language?
Answer: d) B Language
C came directly after the B language. Ken Thompson created B, and Dennis Ritchie improved on it to make C. FORTRAN and BASIC are older languages but they didn't lead to C. The D language actually came much later as an attempt to improve C++.
Q9. BCPL Language is also called?
Answer: d) None of these
BCPL stands for Basic Combined Programming Language. It is not called C, B, or D. However, it's an important ancestor: BCPL led to B, and B led to C. Ken Thompson created B after working with BCPL, and then Ritchie created C from B.
Q11. Ritchie and Brian Kernighan jointly carried out the development of C and that version is ________
Answer: a) K&R C
K&R C is named after Kernighan and Ritchie. It refers to the version of C described in their famous book "The C Programming Language" (published in 1978). This version became the de facto standard before ANSI officially standardized C in 1989. ANSI C and C99 came later.
Q12. Who was the creator of B Language, which inspired Dennis Ritchie to create C?
Answer: a) Ken Thompson
Ken Thompson created the B language. He worked at Bell Labs alongside Dennis Ritchie. Thomas Kurtz co-created BASIC, John Backus led the FORTRAN team, and Brian Kernighan co-authored the classic C book with Ritchie. So Thompson is the right answer for B's creator.
Q13. The inventor of C language, Dennis Ritchie, was _________?
Answer: c) American
Dennis Ritchie was an American computer scientist. He was born in Bronxville, New York, and spent most of his career at Bell Labs in New Jersey. This is a straightforward fact-based question often asked in introductory C exams.
Q14. ____________ is the full name of Dennis Ritchie?
Answer: c) Dennis MacAlistair Ritchie
His full name was Dennis MacAlistair Ritchie. The middle name "MacAlistair" is often forgotten, so this question tests attention to detail. He was known simply as "dmr" in Unix circles, which was his early login name.
Q15. C language was primarily invented to develop the __________ Operating System.
Answer: d) Unix
C was created to rewrite the Unix operating system. Before C, Unix was written in assembly language, which was hard to port to different machines. C made Unix portable, and that's a big reason Unix spread so widely. Android, Linux, and Windows came much later; Linux itself was written in C, but that was after Unix.
Q16. In the year _______ C language was invented.
Answer: a) 1972
The year 1972 is generally accepted as the birth year of C. Work started a bit earlier, but the first working implementation was ready around 1972. The year 1973 is sometimes mentioned because that's when Unix was rewritten in C, but C itself was invented in 1972.
Q28. Which famous programming book was written by Dennis Ritchie?
Answer: c) The C Programming Language
Dennis Ritchie co-authored "The C Programming Language" with Brian Kernighan. The book is often called "K&R" by programmers and is considered the bible of C. It was first published in 1978 and has been influential for decades. "Thinking in C" is by Bruce Eckel, not Ritchie.
Language Level & Type
Q4. C is which level language?
Answer: b) High Level
C is generally classified as a high-level language because it uses English-like syntax and is easier to read than assembly. However, many people call it a "middle-level" language because it also gives low-level access to memory through pointers. For exam purposes, the standard answer is high-level.
Q5. C was primarily developed as
Answer: a) System programming language
C was built to write system software like operating systems and compilers. That's why it gives you direct control over hardware and memory. Later, people started using it for general-purpose programming too, but its original purpose was system programming.
Q6. Low level language is?
Answer: d) Difficult to understand and readability is questionable
Low-level languages like machine code and assembly are hard for humans to read. Machine code is just 0s and 1s, and assembly uses cryptic mnemonics. They are close to the hardware but far from human language. That's the main drawback of low-level languages.
Q7. High level language is a?
Answer: a) Human readable like language
High-level languages are designed to be easy for humans to read and write. They use words like "if", "else", "while", and "print", which makes sense to us. The computer translates them into machine code later. That's why they're called "human-readable" languages.
Q8. Choose the correct option in case of C language.
Answer: b) Procedural language
C is a procedural language, which means you write a sequence of steps (procedures or functions) to solve a problem. It is not object-oriented like C++ or Java. It is not purely functional like Haskell. "Bit level language" is not a standard category. So procedural is the correct answer.
Standardization & Versions
Q10. Which committee standardizes the C Programming Language?
Answer: a) ANSI
ANSI (American National Standards Institute) first standardized C in 1989. This version is often called ANSI C or C89. Later, ISO also adopted the standard. W3C is for web standards, and TRAI is an Indian telecom regulator, so they are unrelated to C.
Data Types & Variables
Q17. What is the range for integer for 16-bit?
Answer: a) -32768 to 32767
In a 16-bit system, an integer takes 2 bytes (16 bits). The range for a signed integer is -32768 to 32767. For unsigned integers, it is 0 to 65535. Option b (3.4e38) is the range for float, not int. The other options are close but incorrect.
Q18. A C variable cannot start with
Answer: c) Both a & b
In C, a variable name can start with a letter or an underscore, but not with a number or any other special symbol like @, #, $, etc. For example, "2var" is invalid, and "$var" is also invalid. "var2" or "_var" are valid. So both a and b are correct restrictions.
Q20. What is true for declaration and definition of a variable in C?
Answer: e) A definition occurs once, but a declaration may occur many times
A definition allocates memory and can only happen once per variable. A declaration just tells the compiler the variable exists and can appear in many files. Think of it like this: definition creates the actual box, declaration says "there is a box somewhere." You can have many declarations but only one definition.
Keywords & Identifiers
Q22. What is an Identifier in C Language?
Answer: d) All the above
An identifier is simply a name you give to things in your program. That includes variables, functions, macros, structures, unions, and more. So all the options listed are correct examples of identifiers. The only rule is that identifiers must follow C's naming rules (no starting with a digit, no keywords, etc.).
Q24. How many total numbers of Keywords are present in C Language?
Answer: a) 32
Standard C (C89/C90) has exactly 32 keywords. Later standards like C99 added a few more (such as inline, restrict, and _Bool), bringing the count to 37, but the classic exam answer is 32. The other numbers (34, 66, 60) are not correct for standard C keywords.
Q25. Every statement in C ends with________
Answer: b) Semicolon ;
In C, every statement must end with a semicolon. It's like the period at the end of a sentence. If you forget the semicolon, the compiler will give you an error. This is one of the most common mistakes beginners make, so it's worth remembering.
Q26. Which one of the following is an invalid return type in C?
Answer: d) None of the mentioned
All the listed options are valid return types in C. char * is a pointer to char, struct (a struct type) can be returned, and void means the function returns nothing. So none of them are invalid, making d the correct choice.
Input/Output & Headers
Q19. What value will be returned to the operating system upon the successful completion of a C program?
Answer: c) 0
A return value of 0 from main() indicates success. The operating system treats 0 as "everything went fine." Any non-zero value (like 1, -1, or 2) usually signals an error. That's why you often see return 0; at the end of main.
Q21. Which of the following is part of a C program?
Answer: d) All of the above
A C program is made up of functions, variables, and statements. Functions contain the logic, variables store data, and statements are the instructions that do the work. All three are essential parts of any C program, so all of the above is correct.
Q23. C Programs are used in?
Answer: e) All the above
C is used almost everywhere. Operating systems like Unix and Linux are written in C. Embedded devices like washing machines, fridges, and microwave ovens also run code written in C because it's fast and efficient. So all the options are correct examples of where C programs are used.
Q27. What standard header file is used for output and input in C?
Answer: a) <stdio.h>
stdio.h stands for "standard input/output." It gives you functions like printf() for printing to the screen and scanf() for reading input. stdlib.h is for general utilities, math.h is for math functions, and stdarg.h is for variable arguments. For basic I/O, stdio.h is the one you need.
Frequently Asked Questions
Are these C language MCQs suitable for beginners?
Yes, absolutely. These 28 questions cover the basics of C: its history, what kind of language it is, data types, variables, keywords, and standard headers. If you're preparing for a college exam, a job interview, or just starting to learn C, these MCQs are a good place to test yourself.
How many C language MCQ questions are on this page?
There are 28 multiple-choice questions on this page. Each one comes with the correct answer and a short explanation. Some questions also have extra notes to help you understand the concept better.
Are the answers to these C MCQs explained?
Yes. After every answer, you'll find a simple explanation. For example, we explain why the 16-bit integer range is -32768 to 32767, and why C was created to build Unix. These explanations aim to make the "why" clear, not just the "what."
Where can I find more C language MCQs?
Check out the Related MCQ section just below. We've linked to topic-wise pages on operators, conditional statements, loops, arrays, functions, structures, pointers, files, storage classes, and dynamic memory. You can practice each topic separately.
๐ก Tip: Try answering all the questions first before looking at the answers. This way, you'll find out which topics you're weak in, and you can focus your study there before the exam or interview.