-C语言专升本2阅读程序题库.docVIP

  • 26
  • 0
  • 约1.92万字
  • 约 26页
  • 2016-09-27 发布于天津
  • 举报
2 一、基本输入输出 1. #include stdio.h main() {printf(abc\td\re\t_f\n); printf(gh_\tij_\b\b__k); }注:“_”代表一个空格。 运行结果为: e_ _ _ _ _ _ _ _f gh_ _ _ _ _ _ i_ _k 3. #include stdio.h main() { int z, x=6,y=5; char w=’c’; z=x+y+w; printf(%d,%d,%d,x,y,z); } 运行结果为: 2. #include stdio.h main() { char c1=’a’,c2=’b’,c3=’c’; printf(a%cb%cc%c ,c1,c2,c3); } 运行结果为: 4. #include stdio.h main() { int i=128; float x=234.89; printf(“\n”); printf(%5d,%8.2f\n,i,x); printf(%2d,%4.1f\n,i,x); } 运行结果为: 5. #include stdio.h void main(void){ int x=15,y=5; float f=1234.567f,b=12345; printf(%f %10f %10.2f %.2f%

文档评论(0)

1亿VIP精品文档

相关文档