Basic C Language MCQ โ€” 28 Questions with Answers
  • Twitter
  • Facebook
  • Snapchat
  • Instagram

Basic MCQ in C Language for Practice

๐Ÿ“‘ On this page:
  • History & Origin of C
  • Language Level & Type
  • Standardization & Versions
  • Data Types & Variables
  • Keywords & Identifiers
  • Input/Output & Headers
  • Frequently Asked Questions
Basic C language introduction multiple choice questions with answers, asked in interviews and exams
Basic C language MCQ โ€” practice set with answers and simple explanations.
๐Ÿ“š In this quiz, you will revise:
  • 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?

  • a) Dennis Ritchie
  • b) James Gosling
  • c) Steve Jobs
  • d) Rasmus Lerdorf

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 _________?

  • a) AT & T's Bell Laboratories of USA in 1972
  • b) Sun Microsystems in 1973
  • c) Cambridge University in 1972
  • d) AT & T's Bell Laboratories of USA in 1970

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?

  • a) FORTRAN
  • b) D Language
  • c) BASIC
  • d) B 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?

  • a) C Language
  • b) B Language
  • c) D Language
  • d) None of these

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 ________

  • a) K&R C
  • b) ANSI C
  • c) C99
  • d) R&K C

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?

  • a) Ken Thompson
  • b) Thomas E. Kurtz
  • c) John W. Backus
  • d) Brian Kernighan

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 _________?

  • a) British
  • b) Canadian
  • c) American
  • d) Russian

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?

  • a) Dennis Drew Ritchie
  • b) Dennis George Ritchie
  • c) Dennis MacAlistair Ritchie
  • d) Dennis Bill 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.

  • a) Android
  • b) Linux
  • c) Windows
  • d) Unix

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.

  • a) 1972
  • b) 1973
  • c) 1975
  • d) 1990

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?

  • a) Learn C Step By Step
  • b) C Programming and Techniques
  • c) The C Programming Language
  • d) Thinking in C

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?

  • a) Low Level
  • b) High Level
  • c) Both a & b
  • d) None of these

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

  • a) System programming language
  • b) General purpose language
  • c) Data processing language
  • d) None of these

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?

  • a) Human readable like language
  • b) Language with big program size
  • c) Language with small program size
  • d) Difficult to understand and readability is questionable

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?

  • a) Human readable like language
  • b) Language with big program size
  • c) Language with small program size
  • d) Language which is difficult to understand and not human readable

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.

  • a) Object Oriented language
  • b) Procedural language
  • c) Bit level language
  • d) Functional programming

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?

  • a) ANSI
  • b) ISO
  • c) W3C
  • d) TRAI

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?

  • a) -32768 to 32767
  • b) 3.4e38 to 3.4e38
  • c) -32767 to 32768
  • d) -32668 to 32667

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

  • a) A number
  • b) A special symbol other than underscore
  • c) Both a & b
  • d) An alphabet

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?

  • a) There is no difference between them
  • b) Both can occur multiple times, but a definition must occur first
  • c) Both can occur multiple times, but a declaration must occur first
  • d) A declaration occurs once, but a definition may occur many times
  • e) A definition occurs once, but a declaration may occur many times

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?

  • a) Identifier is the name of a Function or Variable
  • b) Macros Names
  • c) Name of Structure or Union
  • d) All the above

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?

  • a) 32
  • b) 34
  • c) 66
  • d) 60

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________

  • a) Colon :
  • b) Semicolon ;
  • c) Period . (dot symbol)
  • d) None of these

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?

  • a) char *
  • b) struct
  • c) void
  • d) None of the mentioned

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?

  • a) 1
  • b) -1
  • c) 0
  • d) 2

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?

  • a) Functions
  • b) Variables
  • c) Statements
  • d) All of the above

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?

  • a) Any Electronic device
  • b) Washing machine
  • c) Operating System
  • d) Fridge, Microwave Ovens
  • e) All the above

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?

  • a) <stdio.h>
  • b) <stdlib.h>
  • c) <math.h>
  • d) <stdarg.h>

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.

๐Ÿ“– Related MCQ Pages

  • Operators MCQ
  • Conditional Statements MCQ
  • Loops MCQ
  • Arrays MCQ
  • Functions MCQ
  • Structures MCQ
  • Pointers MCQ
  • Files MCQ
  • Storage Classes MCQ
  • Dynamic Memory MCQ

Previous Topic: -->> Case Study   ||   Next topic: -->> Operators MCQ in C


C Language

  • Home
  • Why C Language
  • History of C Language
  • Applications of C Language
  • Introduction To C
    • What is Program?
    • Structure of C Program
    • Working Of C Program
    • CHARACTER SET
    • VARIABLES AND IDENTIFIERS
    • BUILT-IN DATA TYPES
    • OPERATORS AND EXPRESSIONS
    • CONSTANTS AND LITERALS
    • SIMPLE ASSIGNMENT STATEMENT
    • BASIC INPUT/OUTPUT STATEMENT
    • SIMPLE 'C' PROGRAMS
    • Assignments
  • Operators in C Programming
    • Arithmetic Operators
    • Assignment Operators
    • Increment and Decrement Operators
    • Relational Operators
    • Logical Operators
    • Bitwise Operators
    • Other Operators
    • Assignments
  • Conditional Statements
    • DECISION MAKING WITHIN A PROGRAM
    • CONDITIONS
    • IF STATEMENT
    • IF-ELSE STATEMENT
    • IF-ELSE LADDER
    • NESTED IF-ELSE
    • SWITCH CASE
    • Assignments
  • Loops Statements
    • Introduction to Loops
    • GO TO Statement
    • Do while Loop
    • While Loop
    • Nested While Loop
    • Difference Between While and Do while
    • Difference Between Goto and loop
    • while loop assignments
    • C FOR Loop
    • C For loop examples
    • Nested for loop
    • Nested for loop examples
    • Infinite while Loops
    • Infinite for Loops
    • Continue in Loops
    • break in Loops
    • difference while do..while & for
    • Assignments
  • Arrays
    • One Dimensional Array
    • Declaring 1D Arrays
    • Initilization of 1D arrays
    • Accessing element of one 1D Array
    • Read and Display 1D Arrays
    • Two Dimensional Arrays
    • Declare 2D Arrays
    • Read and Display 2D Arrays
    • Assignments/Examples
  • Functions
    • Introduction
    • Need For User-Defined Function
    • Multiple Function Program
    • Modular Programming
    • Elements Of User Defined Function
    • Function Definition
    • Function Declaration
    • Types of functions
    • Nesting of Function
    • Recursion
    • Passing Array To Functions
    • Scope,Visibility and Lifetime of Variables
    • Assignments
  • Structure
    • Introduction
    • Array vs Structure
    • Defining Structure
    • Declaring Structure Variables
    • Type Defined Structure
    • Accessing Structure Members
    • Structure Initilization
    • Copying & Comparing Structure Variables
    • Array of Structure
    • Arrays Within Structure
    • Structures Within Structures
    • Structures and Functions
    • Structure Examples/Assignments
  • Union
    • Define Union
    • Create and use Union
    • Difference Between Structure and Union
    • Union Examples
    • Union FAQ
  • Pointers
    • What Are Pointers In C?
    • How Do We Use Pointers In C?
    • Declaration Of A Pointer
    • The Initialization Of A Pointer
    • Syntax Of Pointer Initialization
    • Use Of Pointers In C
    • The Pointer To An Array
    • The Pointer To A Function
    • The Pointer To A Structure
    • Types Of Pointers
    • The Null Pointer
    • The Void Pointer
    • The Wild Pointer
    • The Near Pointer
    • The Huge Pointer
    • The far Pointer
    • dangling pointer
    • Accessing Pointers- Indirectly And Directly
    • Pros Of Using Pointers In C
    • Cons Of Pointers In C
    • Applications Of Pointers In C
    • The & Address Of Operator In C
    • How To Read The Complex Pointers In C?
    • Practice Problems On Pointers
  • File Processing
    • File Handling In C
    • Types Of Files In C
    • Operations Done In File Handling
    • File Examples
    • Binary Files
    • count words,lines in a file
    • Copy files
    • Update File
    • count vowels in a file
  • Preprocessor
    • Macro substitution division
    • File Inclusion
    • Conditional Compilation
    • Other directives
    • Examples
  • Dynamic Memory Allocation
    • malloc
    • calloc
    • free
    • realloc
    • Examples
  • Storage Classes
  • Graphics
  • Frequently Asked Interview Questions (FAQ)
    • Introduction To C FAQ
    • Operators FAQ
    • Conditional Statements FAQ
    • Loops FAQ
    • Arrays FAQ
    • Function FAQ
    • Structure FAQ
    • Pointers FAQ
    • Files FAQ
    • Storage classes FAQ
    • Dynamic Memory FAQ
  • Programs/Assignments
    • Introduction To C
    • Operators
    • Conditional Statements
    • Loops
    • Arrays
    • Function
    • Structure
    • Pointers
    • Files
    • Storage classes
    • Dynamic Memory
  • Case Studies
  • Multiple Choice Questions
    • Introduction To C MCQ
    • Operators MCQ
    • Conditional Statements MCQ
    • Loops MCQ
    • Arrays MCQ
    • Function MCQ
    • Structure MCQ
    • Pointers MCQ
    • Files MCQ
    • Storage classes MCQ
    • Dynamic Memory MCQ
    • More MCQ

Get in touch

  • tech2dsm@gmail.com

© Sankalan Data Tech. All rights reserved.