C Language Theory Exam Updated
C Language Theory Exam Updated
1. Introduction to C Language
Definition: C is a middle-level programming language developed by Dennis Ritchie at Bell
Labs in the 1970s. It combines the features of both high-level and low-level languages.
Key Points:
True/False:
Question-Answers:
Key Points:
True/False:
1. "char" is used to store integer values. (False)
2. "float" is used to store decimal numbers. (True)
Question-Answers:
Q1: What is the difference between signed and unsigned data types?
Q2: Describe the different data types available in C with examples.
Key Points:
- Arithmetic Operators: +, -, *, /, %.
- Relational Operators: >, <, ==, !=.
- Logical Operators: &&, ||, !
True/False:
Question-Answers:
4. Control Statements
Definition: Control statements determine the flow of program execution based on
conditions or loops.
Key Points:
- Conditional: if, if-else, switch.
- Loops: for, while, do-while.
- Jump: break, continue, goto.
True/False:
Question-Answers:
5. Functions
Definition: A function is a self-contained block of code designed to perform a specific task.
Key Points:
True/False:
Question-Answers:
Key Points:
True/False:
Question-Answers:
7. Pointers
Definition: A pointer is a variable that stores the memory address of another variable.
Key Points:
True/False:
Question-Answers: