Answer to Question #323222 in C++ for zainb

Question #323222

getsize return the size of collection


1
Expert's answer
2022-04-06T05:07:10-0400
#include <iostream>
#include <vector>
#include <deque>
 
using namespace std;
 
int main() {
    int arr[10], Size;
    Size = sizeof(arr)/sizeof(arr[0]);
    
    cout<<"array[10]. Size:  "<<Size<<endl;
    
    vector<int> g1;
     for (int i = 1; i <= 5; i++)
        g1.push_back(i);
        
   cout << "vector<int>. Size: " << g1.size()<<endl;
   
   deque<int> gquiz;
   cout << "gquiz. Size() : " << gquiz.size();
      
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS