What happens when you attempt to compile and run the following code?#include <iostream>#include <algorithm>#include <vector>using namespace std;int main () {int t[] = {1,2,3,2,3,5,1,2,7,3,2,1,10, 4,4,5};vector<int> v (t,t+15);int number = count(v.begin(), v.end(), 2);cout<< number<<endl;return 0;}Program outputs:
A. 4
B. 3
C. 2
D. 0 E. compilation error
What happens when you attempt to compile and run the following code?#include <iostream>#include <algorithm>#include <vec
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
What happens when you attempt to compile and run the following code?#include <iostream>#include <algorithm>#include <vec
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!