丹尼斯·里奇(Dennis MacAlistair Ritchie)
//单行注释
/*多行注释*/
字母数字下划线,不能以数字开头,不能使用单个下划线
类型 | 空间 |
---|---|
char | 1 byte |
unsigned char | 1 byte |
short | 2 bytes |
unsigned short | 2 bytes |
int | 4 bytes |
unsigned int | 4 bytes |
long | 8 bytes |
unsigned long | 8 bytes |
float | 8 bytes |
double | 8 bytes |
long double | 10 bytes |
#define PI 3.14159
const float PI = 3.14159;
#include <stdio.h>
int main() {
int count, i;
count = scanf("%d", &i);
printf("you input %d number, the number is %d\n", count, i);
return 0;
}
1
you input 1 number, the number is 1
#include <stdio.h>
int main() {
char str[20];
fgets(str, 20, stdin);
printf("%s", str);
return 0;
}
1
1
#include <stdio.h>
int main() {
printf("welcome to our lessons!\n");
return 0;
}
welcome to our lessons!
#include <stdio.h>
int main() {
puts("welcome to our lessons!");
return 0;
}
welcome to our lessons!
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。