Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- //example of array size determination: sizeof(list) will NOT work by itself
- int main()
- {
- int i=0;
- char name[] = "cool";
- int list[] = {1,2,3,4,5,6,7,8};
- printf("The size of the array is %d \n", sizeof(list)/sizeof(int) );
- printf("The size of the array is %d", sizeof(name)/sizeof(char) );
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement