size of array
#include <stdio.h>
#include <stdlib.h>
void printSizeOf(int intArray[]);
void printLength(int intArray[]);
int main(int argc, char* argv[])
{
int array[] = { 0, 1, 2, 3, 4, 5, 6 };
printf("sizeof of array: %dn", (int) sizeof(array));
printSizeOf(array);
printf("Length of array: %dn", (int)( sizeof(array) / sizeof(array[0]) ));
printLength(array);
}
void printSizeOf(int intArray[])
{
printf("sizeof of parameter: %dn", (int) sizeof(intArray));
}
void printLength(int intArray[])
{
printf("Length of parameter: %dn", (int)( sizeof(intArray) / sizeof(intArray[0]) ));
}