Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

// A C++ program to show that we can use reference to

// A C++ program to show that we can use reference to
// find size of array
#include <iostream>
using namespace std;
 
void findSize(int (&arr)[10])
{
    cout << sizeof(arr) << endl;
}
 
int main()
{
    int a[10];
    cout << sizeof(a) << " ";
    findSize(a);
    return 0;
}
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #A #program #show #reference
ADD COMMENT
Topic
Name
7+8 =