C is a middle-level programming language that bridges the gap between machine-level and high-level programming, making it foundational in computer science. Its major advantages include portability, low-level memory access, and efficiency, especially in system and embedded programming. C follows a procedural programming paradigm and is popular due to its fast performance and simple syntax.
C is a middle-level programming language that bridges the gap between machine-level and high-level programming, making it foundational in computer science. Its major advantages include portability, low-level memory access, and efficiency, especially in system and embedded programming. C follows a procedural programming paradigm and is popular due to its fast performance and simple syntax.
1. Which of the following best describes C language?
a) High-level scripting language b) Purely object-oriented c) Middle-level language d) Machine language Answer: c) Middle-level language
2. Why is C considered a foundational programming language?
a) It has garbage collection b) It supports graphical user interface c) It bridges the gap between machine-level and high-level programming d) It is used for game development only Answer: c) It bridges the gap between machine-level and high-level programming
3. Which of these is a major advantage of C?
a) Slow execution b) Portability c) No support for functions d) Only works on Unix Answer: b) Portability
4. C is widely used in: a) Web development
b) System programming c) Spreadsheet design d) Game scripting Answer: b) System programming
5. Which of the following is true about C?
a) It doesn’t support pointers b) It can’t be compiled c) It provides low-level memory access d) It only works on Linux Answer: c) It provides low-level memory access 6. Why is C used in embedded systems? a) High memory usage b) Slow execution c) Fast and efficient d) GUI features Answer: c) Fast and efficient
7. C language is popular for which feature?
a) Extensive libraries b) Platform independence c) Rich set of operators d) Object-oriented features Answer: c) Rich set of operators
8. Which programming paradigm does C follow?
a) Functional b) Object-oriented c) Procedural d) Logic Answer: c) Procedural
9. What does the term "portability" in C mean?
a) Code can run only on Windows b) Code can run on different platforms c) Code runs without compiler d) Code doesn't require memory Answer: b) Code can run on different platforms
10. Which is NOT a reason for C's popularity?
a) Fast performance b) Direct hardware access c) Built-in graphics library d) Simple syntax Answer: c) Built-in graphics library