Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ int num [ ] = { 1,2,3,3,4,5,6,7,8 } vector vec (num, num + 8) ; vector : : iterator iter ; iter = vec
C++
int num [ ] = { 1,2,3,3,4,5,6,7,8 }
vector vec (num, num + 8) ;
vector : : iterator iter ;
iter = vec . begin ( ) ;
Question 1. What is the result of execute the instruction num [4] ;?
a)2
b)7
c) unknown
Question 2. How many elements does the vector vec contain?
a)0
b)10
c)16
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started