c-canf()vs get()vs fget()
scanf()
, gets()
fgets()
#include <stdio.h>#define MAX 100int CharToInt(const char *);int main(){ char str[MAX]; printf(" Enter some numbers (no spaces): "); gets(str);// fgets(str, sizeof(str), stdin);// scanf("%s", str); printf(" Entered number is: %d\n", CharToInt(str)); return 0;}int CharToInt(const char *s){ int i, result, temp; result = 0; i = 0; while(*(s+i) != '\0') { temp = *(s+i) & 15; result = (temp + result) * 10; i++; } return result / 10;}
gets()
fgets()
fgets()
scanf()
gets()
fgets()
scanf()
偶然的你
30秒到达战场
绑定子VS的
VisualStudio 和 VS Code哪个好?装了VS Code还需要装VisualStudio吗?
VS 2010 与现在的VS 2015是不是有很大不同了?
vs如何跟sql链接
相关分类