int main() { printf("nice "); goto again; printf("t0 "); again: printf("meet youn"); return 0; } int main() { again: printf("寸心n"); goto again; return 0; }
for (.,.) { for (...) { for (...) if (disaster) goto error; } } error: if(disaster) ....//处理错误情况memset
int main() { char a1[] = "hello world!"; memset(a1,'*',5); printf("%s", a1); return 0; }printf
int main() { printf("%d", printf("%d", printf("%d", 43))); return 0; }
结果:4321
printf返回值是打印在屏幕上的字符个数
int main() { char a1[]="##########"; // nice#### // ''为字符串结束标志,后面的#..#就不打印了 char a2[] = "nice"; strcpy(a1, a2);//拷贝'' printf("a1=%s", a1); return 0; }数组
int main() { int a[] = { 0,1,2,3,4,5 }; printf("%pn", a); printf("%pn", a+1); printf("%pn", &a); printf("%pn", &a+1); printf("%pn", &a[0]); printf("%pn", &a[0]+1); return 0; }
@TOC
@TOC
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)