DSA
LANGUAGE OPTED - C++
DAY-3 PASS BY REFERNCE AND VALUE
CLICK HERE for the pdf
#include <iostream>
#include <vector>
using namespace std;
#include <vector>
using namespace std;
int main() {
vector<int> vec = {1, 2, 3, 4, 5,9};
int size = vec.size();
cout << "The size of the vector is: " << size << endl;
return 0;
}
#include <iostream>
int main() {
int arr[] = {1, 2, 3, 4, 5};
size = sizeof(arr) / sizeof(arr[0]);
cout << "The size of the array is: " << size << endl;
return 0;
}

Comments
Post a Comment
Feel Free to say
Confession !!!!