C 语言字符 和字符串输出

int main(void)
{
char ch;
char str[80];

 


printf("Input a string: ");    //先输入字符串

gets(str);//get()   put()   这两个函数并列使用,前者就是从案件获取按键值,  后者是显示输出
puts(str);

printf("Input a character: ");
scanf("%c",&ch);

return 0;
}

posted @ 2016-03-15 09:42  ocean2015  阅读(212)  评论(0编辑  收藏  举报