i am not sure why the value of b is coming out as 0
according to me it should come out as 3
#include <iostream>
using namespace std;
void read(int a[],int n)
{
for (int k = 0;k < n;k++)
{
cout << "enter the " << k << "th integer";
cin >> a[k];
}
}
int main()
{
int a[] = {};
read(a,3);
int b = sizeof(a)/sizeof(int);
cout << b << endl;
return 0;
}