C Language Fundamentals: 16 MCQs

All 16 multiple-choice questions from this kit, free and with no sign-up.

Warm-up · 6 questions

Q1. Who created the C programming language?

Beginner
A James Gosling
B Bjarne Stroustrup
C Guido van Rossum
D Dennis Ritchie

Answers and explanations are in the Veda app.

Q2. Which of the following best describes C?

Beginner
A An interpreted, object-oriented, dynamically typed language
B A compiled, procedural, statically typed language
C An interpreted, procedural, statically typed language
D A compiled, object-oriented, dynamically typed language

Answers and explanations are in the Veda app.

Q3. What is the correct order of the four stages of building a C program?

Beginner
A Compilation → Preprocessing → Linking → Loading
B Preprocessing → Linking → Compilation → Loading
C Linking → Preprocessing → Compilation → Loading
D Preprocessing → Compilation → Linking → Loading

Answers and explanations are in the Veda app.

Q4. Which line is a preprocessor directive rather than a C statement?

Beginner
A `int main(void) {`
B `#include <stdio.h>`
C `printf("%d\n", a);`
D `return 0;`

Answers and explanations are in the Veda app.

Q5. What is the entry point of every C program?

Beginner
A `main()`
B `begin()`
C `start()`
D `init()`

Answers and explanations are in the Veda app.

Q6. C was developed by Dennis Ritchie at Bell Labs in the early 1970s, primarily to implement the UNIX operating system.

Beginner
A True
B False

Answers and explanations are in the Veda app.

Building up · 5 questions

Q7. A program calls `printf` but does not include `stdio.h`. At which stage does the failure most likely appear?

Intermediate
A Loading
B Preprocessing
C Runtime
D Linking

Answers and explanations are in the Veda app.

Q8. A learner writes `int *p;` and thinks `*` means multiplication. What is the correct interpretation?

Intermediate
A `p` is declared as a pointer to `int`
B `p` is a constant integer
C `p` is multiplied by an integer
D `p` is an array of integers

Answers and explanations are in the Veda app.

Q9. Which statement about C memory management is correct?

Intermediate
A Memory is allocated with `new` and released with `delete`
B Memory is allocated with `malloc` and released with `free`
C A garbage collector automatically reclaims unused memory
D Memory is never released once allocated

Answers and explanations are in the Veda app.

Q10. How is a C string represented?

Intermediate
A A linked list of characters
B A built-in `string` type
C An array of `char` terminated by `\0`
D An integer encoding the text

Answers and explanations are in the Veda app.

Q11. Which of these is a real-world use of C?

Intermediate
A Querying relational databases with SQL
B Styling web pages with CSS
C Defining HTML document structure
D Writing operating system kernels such as Linux

Answers and explanations are in the Veda app.

Topper level · 5 questions

Q12. A programmer allocates memory with `malloc` but never calls `free`. What is the consequence?

Advanced
A The memory is returned to the OS immediately
B The compiler rejects the program
C A memory leak occurs
D The program automatically frees it at exit

Answers and explanations are in the Veda app.

Q13. A program frees a pointer and then dereferences it. What is the result?

Advanced
A A guaranteed linker error
B The value is safely returned as zero
C Undefined behavior
D A guaranteed compile-time error

Answers and explanations are in the Veda app.

Q14. Why is C often preferred over Python for writing a device driver?

Advanced
A C gives deterministic performance and fine-grained hardware control
B C has automatic garbage collection
C C is interpreted, so it starts faster
D C has dynamic typing for flexibility

Answers and explanations are in the Veda app.

Q15. Which statement about the compilation pipeline is correct?

Advanced
A The preprocessor produces the final executable
B Linking happens before compilation
C Each `.c` file compiles into its own object file before linking
D All `.c` files are merged into one source file before compiling

Answers and explanations are in the Veda app.

Q16. Given the following C code snippet, what will be the output when executed? ```c #include <stdio.h> int main(void) { int a = 5, b = 7; int *p = &a; *p += b; printf("%d\n", a); return 0; } ```

Advanced
A 7
B 12
C 5
D 0

Answers and explanations are in the Veda app.

Make your own

Your notes can be a kit like these

Every kit here was made from real study material. Point Veda at a chapter, a PDF, a photo or a link and get notes, flashcards, practice MCQs, games and a scored test — free to start, in more than 40 languages.

  • Chapter notes
  • Flashcards
  • Practice MCQs
  • Scored tests
  • Paper Solver

Get Veda free See what students get

Free to start · Android app and web · More than 40 languages