when I try to take the element by sizeof , then I am getting different answers in array and vector
#include<iostream>
#include<vector>
using namespace std;
int main(){
vector<int> num = {1,2,5,4};
int k = sizeof(num)/sizeof(num[0]);
cout << k << endl;
int nums[] = {1,2,5,4};
int w = sizeof(nums)/sizeof(nums[0]);
cout << w << endl;
}
Expected 4 4
Output 3 4