int main() { NSString *str=@"hello"; char *str2="hello";
NSLog(@"OC语言字符串:%@",str); NSLog(@"C语言字符串:%s",str2); int age=15; int no=5; NSString *name=@"jack"; int size=[name length]; NSString *newStr=[NSString stringWithFormat:@"My age is %d and no is %d and name=%@",age,no,name]; NSLog(@"%@",newStr); NSLog(@"name的长度是%d",size); return 0; }