SCRIPTING-AND-PROGRAMMING-FOUNDATIONS practice question 19 of 25

A programmer is writing code using C. Which paradigm could the programmer be using?

Full set: 137 questions
Answer options
A: A procedural paradigm using dynamic types
B: A procedural paradigm using sialic types Correct answer
C: A functional paradigm using dynamic types
D: An event-driven paradigm using static types
Correct Answer:
B. A procedural paradigm using sialic types
Explanation

The C programming language is fundamentally a procedural programming language. This paradigm focuses on procedures or functions that perform operations on data. C is also a statically-typed language, meaning that the data type of every variable must be declared at compile time, and type checking is performed before the program is executed. The type of a variable is fixed and cannot change during runtime. This combination of a procedural paradigm with static typing is a defining characteristic of C.

Why Incorrect

A. C is not a dynamically-typed language; variable types are fixed at compile time.
C. C is primarily procedural, not functional. It also does not use dynamic types.
D. While C can be used to write event-driven applications, its core paradigm is procedural, not inherently event-driven.

References

1. Kernighan, B. W., & Ritchie, D. M. (1988). The C Programming Language (2nd ed.). Prentice Hall. Chapter 1, "A Tutorial Introduction," introduces C through its procedural nature with functions. Chapter 2, "Types, Operators, and Expressions," details its static type system.

2. ISO/IEC 9899:2018. (2018). Information technology — Programming languages — C. Section 6.2.5, "Types," specifies the static nature of types in the C standard.

3. Stanford University. (n.d.). CS107: Programming Paradigms. Course materials describe C as a procedural language and contrast its static type system with the dynamic types of languages like Python.

Scroll to Top