易搜题 > 资格证大类 > 计算机等级 > 问题详情
问题详情

有以下程序

#include

main()

{ char *a[]={"abcd","ef","gh","ijk"};int i;

for(i=0;i<4;i++) printf("%c",*a[i]);

}

程序运行后的输出结果是

A)aegi

B)dfhk

C) abc d

D)abcdefghijk

未找到的试题在搜索页框底部可快速提交,在会员中心"提交的题"查看可解决状态。 收藏该题
查看答案

相关问题推荐

  • 设有s(学号,姓名,性别)和sc(学号,课程号,成绩)两个表,下面SQL的SELECT语句检索选修的每门课程的成绩都高于或等于85分的学生的学号、姓名和性别。SELECT 学号,姓名,性别 FROM sWHERE ___ (SELECT * FROM sc WHERE sc.学号=s.学号 AND 成绩<85)

  • SELECT CEILING( -14.7 ), CEILING( 14.7 )的结果是( )

    A. -15,15

    B. -14,15

    C. -14,14

    D. -15,14

  • 设已有定义: float x; 则以下对指针变量 p 进行定义且赋初值的语句中正确的是

    A)float *p=1024;

    B)int *p=(float)x;

    C)float p=&x;

    D)float *P=&x;

  • ( 29 )在 VBA 中,实现窗体打开操作的命令是( )

    A ) DoCmd.OpenForm

    B ) OpenForm

    C ) Do.OpenForm

    D ) DoOpcn.Form

  • 使用VC6打开考生文件夹下的工程RevProj8。此工程包含一个源程序文件 RevMain8.cpp。在该文件中,函数resort的功能是:能在一个数列中,对从指定位置开始的几位数,按相反顺序重新排列,并在主函数中输出新的序列。

    请改正程序中的错误,使它能得到正确结果。

    注意,不要改动main函数,不得删行或增行,也不得更改程序的结构。

    源程序文件RevMain8.cpp中的程序清单如下:

    //RevMain8.cpp

    include <instream>

    using namespace std;

    void resort(int arr[],int where,int amount);

    int main ()

    {

    int number [20] ,where, arrount, i;

    cout<<"Input 20 numbers\n";

    for (i=0; i<20; i++)

    cin>>number [i];

    cout<<"How many do you want to sort: ";

    cin>>arrount;

    cout<<"\n where do you want to start: ";

    cin>>where;

    cout<<"old array as follow:\n";

    for (i=0; i<20; i++)

    cout<<nmuber [i] <<" ";

    resort (number,where, arrount);

    cout<<"\n resorted array as follow:\n";

    for (i=0; i<20; i++)

    cout<<number [i] <<" ";

    cout<<end1;

    return 0;

    }

    void resort(int array[],int where, int amount)

    {

    int *pi, *p2, temp;

    p1=&array [where-1];

    p2=&array [where-2+amount];

    /* * * * *FOUND * * * * */

    for (;p1<&array [where-1+amount/2]; )

    {

    /* * * * *FOUND * * * * */

    *p1=*p2;

    *p2=*p1;

    }

    return;

    }

联系客服 会员中心
TOP