标签:
stdio 英 [stdi‘???] 美 [stdio] 标准输入输出(standard input/ouput)
1、printf(字符串)
printf("Hello, World!");
2、printf(字符串,格式符参数)
printf("My age is %d\n", 26);//使用常量作参数 int age = 26;//也可以使用变量 printf("My age is %d", age); //注意:左边字符串中格式符的个数 必须跟 右边格式符参数的个数一样;格式符的类型决定了格式符参数的类型,比如使用%d,说明对应的格式符参数必须是整型。
标签:
原文地址:http://www.cnblogs.com/yaosuc/p/4516711.html