单项选择题

若要求从键盘读入含有空格字符的字符串,应使用函数

A.getc()
B.gets()
C.getchar()
D.scanf()
<上一题 目录 下一题>
热门 试题

单项选择题
下面程序的输出结果是 #include<stdio.h> #include<string.h> main() { char *pl= abc ,*p2= ABC ,str[50]= xyz ; strcpy(str+2,strcat(p1,p2)); printf( %s n ,str);}
A.xyzabcABC
B.zabcABC
C.xyabcABC
D.yzabcABC
单项选择题
有以下程序 #include <stdio.h> main() { int a[]={1,2,3,4},y,*p=&a[3]; --p; y=*p;printf( y=%d n ,y); } 程序的运行结果是
A.y=0
B.y=1
C.y=2
D.y=3
相关试题
  • 以下程序的运行结果是______。#incl...
  • 设有定义“stmct{int a;float b;char...
  • 下面程序的运行结果是______。#incl...
  • 以下程序的输出结果是______。#incl...
  • 以下程序的输出结果是______。#incl...