首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有以下程序 #include <stdio.h> void fun(char *t,char *s) { while(*t! =0) t+ +; while((*t+ + =*s+ +)! =0); } main( ) { char ss[10]="acc
有以下程序 #include <stdio.h> void fun(char *t,char *s) { while(*t! =0) t+ +; while((*t+ + =*s+ +)! =0); } main( ) { char ss[10]="acc
admin
2018-10-16
16
问题
有以下程序
#include <stdio.h>
void fun(char *t,char *s)
{ while(*t! =0) t+ +;
while((*t+ + =*s+ +)! =0);
}
main( )
{ char ss[10]="acc",aa[10]="bbxxyy";
fun(ss,aa); printf("%s,%s\n",ss,aa);
}
程序的运行结果是
选项
A、acc,bbxxyy
B、accxxyy,bbxxyy
C、accbbxxyy,bbxxyy
D、accxyy,bbxxyy
答案
C
解析
fun函数中,第1个while循环语句使指针t指向字符串的末尾,第2个while循环语句实现了字符串t和s的连接。主函数中语句fun(ss,aa)的功能是将字符串aa连接到字符串ss的末尾。
转载请注明原文地址:https://kaotiyun.com/show/Ruxp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
有以下程序:main(){inta=666,b=888;printf("%d\n",a,b);}程序运行后的输出结果是()。
判断char型变量cl是否为小写字母的正确表达式为()。
一棵二叉树共有47个结点,其巾有23个度为2的结点。假设根结点在第1层,则该二叉树的深度为_________。
算法的空间复杂度是指
下面rotate函数的功能是:将n行n列的矩阵A转置未AT,例如:请填空#defineN4voidrotate(inta[][]){inti,j,t;for(i=0;i<N;i++)
mysulen函数的功能是计算str所指字符串的长度,并作为函数值返回。请填空。intmystrlen(Char*str){inti;for{i=0;!=’\0’;i++);return(_
设以下变量均为int类型,表达式的值不为7的是()。
算法一般都可以用______控制结构组合而成。
最简单的交换排序方法是
二分查找一个具有n个元素的有序表,其时间复杂度为______。
随机试题
一般认为管理过程学派的创始人是()。
Abouttenmenineveryhundredsufferfromcolorblindnessinsomeway;womenareluckieronlyaboutoneintwohundredisaffec
A.向下颌方向缓慢刺入0.5~1.5寸B.针尖微向下,向鼻尖方向缓慢刺入0.8~1.2寸C.向下颌方向缓慢刺入0.5~1寸D.向眼球方向缓慢刺入0.5~1寸用毫针刺风池穴,正确的操作手法是
肝细胞凋亡可见肺硅沉着症可见
A.上斜肌B.下斜肌C.外直肌D.眼轮匝肌E.瞳孔开大肌动眼神经支配的肌肉是
患者,女性,55岁。高血压病史10年,因未规律用药,血压控制不理想,多在160/105mmHg。4小时前患者心前区持续疼痛、出冷汗来院急诊,诊断为急性心肌梗死。半小时前患者呼吸困难伴喘息,两肺布满湿哕音和哮鸣音,心率108/分,律齐。首先考虑该患者的病情变
商业发票是国际货物买卖中的核心单据,其作用表现为()。
运营环境变化对电信企业运营提出了新的要求,表现在()。
我国投入巨额资金实施退耕还林工程,这说明()。
EgyptianwinehasanextensivehistorywithinthehistoryofEgyptiancivilization.Grapeswerenot(1)_____tothelandscapeof
最新回复
(
0
)