摘要: 数组名同时也是该数组首元素的地址。#define SIZE 4short dates [SIZE]; dates[0] = 1; dates[1] = 2; dates[2] = 3; dates[3] = 4; short *pti; double bills[SIZE]; bills[0] = 1.1; bills[1] = 2.2; bills[2] = 3.3; bills[3] = 4.4; double *ptf; short index; pti = dates; ptf = bills; printf("%23s %10s\n","sho... 阅读全文
posted @ 2012-12-27 15:44 diablo大王 阅读(139) 评论(0) 推荐(0) 编辑
摘要: int main(int argc, const char * argv[]){ int numbers[3]; numbers[0] = 1; numbers[1] = 2; numbers[2] = 3; printf("sizeof(numbers) is = %lu\n",sizeof(numbers)); printf("sizeof(numbers[0])is = %lu\n",sizeof(numbers[0])); for (int i= 0; i<sizeof(numbers)/sizeof(numbers[0]); i++) { 阅读全文
posted @ 2012-12-27 15:26 diablo大王 阅读(142) 评论(0) 推荐(0) 编辑
摘要: iPhone 4S 屏幕信息// [[UIApplicationsharedApplication] setStatusBarHidden:YES]; 状态栏占20高度UIScreen *currentScreen = [UIScreenmainScreen];NSLog(@"applicationFrame.size.height = %f",currentScreen.applicationFrame.size.height);NSLog(@"applicationFrame.size.width = %f",currentScreen.applic 阅读全文
posted @ 2012-12-27 14:11 diablo大王 阅读(5085) 评论(0) 推荐(0) 编辑
摘要: UIDevice *currentDevice = [UIDevicecurrentDevice]; NSLog(@"Device's name = %@",currentDevice.name); NSLog(@"Device's identifierForVendor = %@",currentDevice.identifierForVendor); NSLog(@"Device's uniqueIdentifier = %@",currentDevice.uniqueIdentifier); NSLog( 阅读全文
posted @ 2012-12-27 13:55 diablo大王 阅读(165) 评论(0) 推荐(0) 编辑