Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
