Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sz = (sizeof foo) / (sizeof foo[0]);
- main()
- {
- int a[]={1,2,3,4,5,6,7}
- int i;
- clrscr();
- for (i=0;i<=((sizeof(a)/sizeof(int));i++)
- {
- puts(a[i]);
- }
- getch();
- }
- int main(int argc, char *argv[]) {
- NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
- int retVal = UIApplicationMain(argc, argv, nil, nil);
- [pool release];
- return retVal;
- }
- float ptArray[] = {97.8, 92.3, 89.4, 85.7, 81.0, 73.4, 53.0, 42.3, 29.4, 14.1};
- int x = sizeof(ptArray)/sizeof(ptArray[0]);
- NSLog(@"array count = %d", x);
- // result: array count = 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement