What is the primary function of pointers in C?
- To manipulate strings
- To perform mathematical operations
- To provide dynamic memory allocation
- To store variables
Pointers in C are primarily used for dynamic memory allocation. They allow you to allocate and deallocate memory at runtime, which is essential for efficient memory usage and data structure implementation.
Loading...
Related Quiz
- The ______ function in C can be used to change the position of the file pointer in a stream.
- What is a potential risk of using the gets() function for reading strings in C?
- In a two-dimensional array declared as int arr[5][10];, the expression arr[i][j] refers to the ________ element in memory.
- In C++, if two overloaded functions have the same signature but differ in const qualification, it leads to ________.
- When a string is declared as a character array, the string must be terminated with a ________.