C Language Theory Exam Preparation Complete
C Language Theory Exam Preparation Complete
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:
Question-Answers:
Q1: What are the basic data types in C?
A: int, float, char, double.
Q2: What is the size of an integer data type?
A: Typically 4 bytes, but it may vary by system.
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:
True/False:
Question-Answers:
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:
- Declaration: `int *ptr;`
- Initialization: `ptr = &variable;`
- Pointer Arithmetic: Increment, Decrement.
- Pointers with Arrays and Strings.
- Dynamic Memory Allocation: malloc(), calloc(), realloc(), free().
True/False:
Question-Answers: