Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Arrays.cpp : This file contains the 'main' function. Program execution begins and ends there.
- //
- #include "pch.h"
- #include <iostream>
- using namespace std;
- void MyFunction(int intArray[])
- {
- int arraySize = sizeof(intArray);
- int sizeOfOne = sizeof(int);
- int arrayLength = arraySize / sizeof(int);
- cout << "Array Size is = " << arrayLength << endl;
- }
- int main()
- {
- int tmp[5] = {0,1,2,3,4};
- MyFunction(tmp);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement