[试题]

执行以下程序的输出结果是 _[18]_______ .

#include <stido.h>

main()

{ int i,n[4]={1};

for(i=1;i<=3;i++)

{ n[i]=n[i-1]*2+1; printf("%d",n[i]); }

}

参考答案与解析:

相关试题

执行以下程序的输出结果是_[18]_______ #include<stido.

[主观题]执行以下程序的输出结果是_[18]_______#include <stido.h>main(){ int i,n[4]={1};for(i=1;i<=3;i++){ n[i]=n[i-1]*2+1; printf("%d",n[i]); }}

  • 查看答案
  • 以下程序执行后输出的结果是()。 include include using n

    [主观题]以下程序执行后输出的结果是()。 include include using namespace std; int以下程序执行后输出的结果是[ ]。include<iostream>include<fstream>using namespace std;int main(){ofstream ofile("D://temp.txt");if(!ofile){cout<<"temp.txt cannot open"<<endl;return 0;}ofile<<"This is a bo

  • 查看答案
  • 有以下程序 , 程序执行后 , 输出结果是( 1 1 )#include <st

    [试题]有以下程序 , 程序执行后 , 输出结果是( 1 1 )#include <stdio.h>void fun(int *a){ a[0]=a[1];}main(){ int a[10]={10,9,8,7,6,5,4,3,2,1},i;for(i=2;i>=0;i--) fun(&a[i]);for(i=0;i<10;i++) printf("%d",a[i]);printf("/n");}

  • 查看答案
  • 以下程序的输出结果是 ( 18 ) 。# include <stdlib.h>m

    [试题]以下程序的输出结果是 ( 18 ) 。# include <stdlib.h>main( ){ char *s1,*s2,m;s1=s2=(char*)malloc(sizeof(char));*s1=15; *s2=20; m=*s1+*s2;printf("%d/n",m);}

  • 查看答案
  • 有以下程序,程序执行后,输出结果是(11) #include <stdio.h>

    [主观题]有以下程序,程序执行后,输出结果是(11)#include <stdio.h>void fun (int *a){a[0=a[1];]}main(){int a[10]={10,9,8,7,6,5,4,3,2,1},i;for(i=2;i>=0;i--) fun{&a};for(i=0;i<10;i++) printf(“&d”,a);printf(“/n”);}

  • 查看答案
  • 以下程序的输出结果是 _[12]_______ .#include <stdio

    [试题]以下程序的输出结果是 _[12]_______ .#include <stdio.h>main(){ int i;for(i='a';i<'f';i++,i++) printf("%c",i-'a'+'A');printf("/n");}

  • 查看答案
  • 以下程序的输出结果是 _[13]_______ .#include <stdio

    [试题]以下程序的输出结果是 _[13]_______ .#include <stdio.h>#include <string.h>char *fun(char *t){ char *p=t;return(p+strlen(t)/2);}main(){ char *str="abcdefgh";str=fun(str);puts(str);}

  • 查看答案
  • 以下程序的输出结果是 _[19]_______ .#include <stdio

    [试题]以下程序的输出结果是 _[19]_______ .#include <stdio.h>#define M 5#define N M+Mmain(){ int k;k=N*N*5; printf("%d/n",k);}

  • 查看答案
  • 以下程序执行后的输出结果是 ( )。#include class Basel{p

    [单选题]以下程序执行后的输出结果是 ( )。include class Basel{public: void fun(){ cout<<以下程序执行后的输出结果是 ( )。 #include <iostream.h> class Basel { public: void fun(){ cout<<"Basel"<<end1; } }; class Base2 { public: void fun() { cout<<"Base2"<<end1; } } class Derived : publi

  • 查看答案
  • 以下程序执行后的输出结果是#include using namespace st

    [单选题]以下程序执行后的输出结果是include using namespace std;void try(int,int,int,int)以下程序执行后的输出结果是 #include <iostream> using namespace std; void try(int,int,int,int); int main () { int x,y,z,r; x =1 ; y = 2; try(x,y,z,r); cout<<r<<endl; return 0; } void try(int x,int y

  • 查看答案
  • 执行以下程序的输出结果是 _[18]_______ .#include <sti