[高等教育]C语言 4输入输出操作.pptVIP

  • 3
  • 0
  • 约9.21千字
  • 约 39页
  • 2018-03-04 发布于浙江
  • 举报
[高等教育]C语言 4输入输出操作

Introduction to Computer (C Programming) 4.1 introduction 字符输入函数:getchar() 字符输出函数:putchar() 格式输入函数:scanf() 格式输出函数:printf() C语言本身不提供输入输出语句,输入和输出操作是由函数来实现的。 在C的标准函数库中提供了一些输入输出函数。 例如:printf函数、scanf函数.(包括在stdio.h)中。 printf和scanf不是C语言的关键字。 4.2 Reading a character Reading a single character can be done by using the function getchar. variable_name = getchar(); Example 4_1 The program shows the use of getchar function in an interactive environment. Warning Example 4_2 The program requests the user to enter a character and displays a message on the screen telling the user whether the charact

文档评论(0)

1亿VIP精品文档

相关文档