




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This exam certifies foundational knowledge in Intel Cloud technologies. Candidates are tested on cloud computing principles, virtualization, storage solutions, cloud-based application development, and basic programming for cloud infrastructure management.
Typology: Exams
1 / 188
This page cannot be seen from the preview
Don't miss anything!





























































































Question 1. Which container allows constant-time random access to its elements? A) std::list B) std::vector C) std::deque D) std::queue Answer: B Explanation: std::vector provides constant-time random access to its elements due to contiguous storage. Question 2. What is the primary difference between std::deque and std::vector?
A) Deque elements are not stored in contiguous memory B) Vector allows insertion/removal at both ends efficiently C) Deque allows fast insertion/removal at both ends D) Vector is always faster than deque Answer: C Explanation: std::deque allows efficient insertion and removal at both the front and back. Question 3. Which method is used to add an element to the end of a std::vector? A) insert() B) push_front()
Explanation: std::list allows constant-time insertion/removal at any position due to its linked structure. Question 5. Which container adapter uses a FIFO (First-In-First-Out) approach? A) std::stack B) std::priority_queue C) std::queue D) std::vector Answer: C Explanation: std::queue implements the FIFO approach.
Question 6. Which method removes the first element of a std::deque? A) pop_back() B) erase_begin() C) pop_front() D) remove() Answer: C Explanation: pop_front() removes the first element from deque. Question 7. Which operation is not valid for std::queue? A) front() B) back()
Explanation: at() throws std::out_of_range exception on invalid index. Question 9. What is the time complexity for inserting at the beginning of a std::vector? A) O(1) B) O(n) C) O(log n) D) O(n log n) Answer: B Explanation: Inserting at the beginning requires shifting all elements, so it's O(n).
Question 10. Which sequence container is best for frequent insertions/removals in the middle? A) std::vector B) std::list C) std::array D) std::deque Answer: B Explanation: std::list provides efficient insertions/removals anywhere. Question 11. Which container adapter provides LIFO (Last-In-First-Out) functionality? A) std::queue
Answer: A Explanation: begin() returns an iterator to the first element. Question 13. Which method returns the number of elements in a container? A) get_size() B) length() C) size() D) count() Answer: C Explanation: size() provides the number of elements in STL containers.
Question 14. What does std::priority_queue guarantee about its elements? A) FIFO order B) LIFO order C) Sorted order with largest/smallest always accessible D) No order Answer: C Explanation: std::priority_queue provides access to the largest (by default) element. Question 15. Which sequence container provides bidirectional iterators but not random access?
C) tail() D) last() Answer: A Explanation: back() returns a reference to the last element. Question 17. Which operation is unique to std::priority_queue among container adapters? A) pop() B) push() C) top() D) front() Answer: C
Explanation: top() returns the highest-priority element. Question 18. Which STL container is implemented as a doubly linked list? A) std::vector B) std::list C) std::deque D) std::array Answer: B Explanation: std::list is a doubly linked list.
B) std::map C) std::list D) std::deque Answer: B Explanation: std::map is an associative container. Question 21. Which member function removes all elements from a container? A) clear() B) erase_all() C) remove() D) reset()
Answer: A Explanation: clear() deletes all elements from the container. Question 22. What is the result of calling front() on an empty std::queue? A) Returns a default value B) Throws an exception C) Causes undefined behavior D) Ignores the call Answer: C Explanation: Accessing front() on an empty queue is undefined behavior.
A) std::queue B) std::priority_queue C) std::stack D) All of the above Answer: D Explanation: Adapters don't expose iterators for traversal. Question 25. What is the default underlying container for std::stack? A) std::list B) std::deque C) std::vector
D) std::set Answer: B Explanation: std::deque is the default container for std::stack. Question 26. Which iterator type allows both reading and writing but not backward movement? A) Input iterator B) Output iterator C) Forward iterator D) Bidirectional iterator Answer: C Explanation: Forward iterators support forward movement only.