//整型
int integerType = 5;
//浮点型
float floatType = 3.1415;
//双浮点型
double doubleType = 2.2033;
//短整型
short int shortType = 200;
//长整型
long long int longlongType = 7758123456767L;
//c语言字符串
char * cstring = "this is a string!";
//整型
NSLog(@"The value of integerType = %d",integerType);
//浮点型
NSLog(@"The value of floatType = %.2f",floatType);
//双浮点型
NSLog(@"The value of doubleType = %e",doubleType);
//短整型
NSLog(@"The value of shortType = %hi",shortType);
//长整型
NSLog(@"The value of longlongType = %lli",longlongType);
//c语言字符串
NSLog(@"The value of cstring = %s",cstring); |
|