In a C program that manipulates a large dataset, you observe that the performance is significantly reduced when passing data between functions. How could pointers be used to improve the performance?
- Pointers can be used to create additional datasets.
- Pointers can be used to pass data by reference.
- Pointers can be used to pass data by value.
- Pointers can't improve performance in this scenario.
Pointers can be used to pass data by reference, which avoids the overhead of copying large datasets, improving performance in data manipulation tasks.
Loading...
Related Quiz
- What is the purpose of the 'sizeof' operator in C?
- In the context of searching algorithms, why might a binary search be preferred over a linear search?
- What does the fseek function do in a C program?
- When reading a text file in C, which function can be used to read data from the file?
- In C++, what happens when two overloaded functions have the same number and types of parameters but differ in return type?