MCQsSpecialized MCQsC++ Optimization TechniquesC++ Optimization Techniques 1).What is the purpose of optimization in C++?1) To make the code run faster2) To make the code more readable3) To reduce the size of the program4) All of the above 2).Which of the following techniques can be used to optimize the performance of a C++ program?1) Loop unrolling2) Inlining functions3) Memory alignment4) All of the above 3).What is the impact of compiler optimizations on C++ code?1) Improved execution speed2) Increased memory usage3) Reduced debugging accuracy4) None of the above 4).What is loop unrolling?1) A technique to reduce loop overhead by manually expanding the loop2) A technique to make loops run in parallel3) A technique to remove unnecessary loops4) None of the above 5).Which of the following is a method for optimizing memory usage in C++?1) Using memory pools2) Avoiding dynamic memory allocation3) Using smart pointers4) All of the above 6).What is the benefit of using the `inline` keyword in C++?1) Reduces function call overhead2) Improves memory usage3) Decreases code size4) None of the above 7).Which C++ feature is essential for optimizing code in multi-threaded applications?1) Thread-local storage2) Function pointers3) Virtual functions4) None of the above 8).What does compiler optimization `-O3` do?1) Maximizes the performance optimizations2) Decreases memory usage3) Improves debugging4) None of the above 9).How can caching be used to optimize C++ programs?1) By storing frequently used data in memory2) By using cache-friendly data structures3) By reducing unnecessary memory accesses4) All of the above 10).Which of the following is a common technique to optimize I/O operations in C++?1) Buffered I/O2) Using memory-mapped files3) Direct I/O operations4) All of the above