以下程序的运行结果为______。 char *c []={ "ENTER", "NEW", "POINT", "FIRST" }; char **cp []={ c+3, c+2, c+1, c}; char ***cpp=cp; main () {printf ("%s\n",**++cpp); }
A.ENTER
B.NEW
C.POINT
D.FIRST
有以下程序#include <stdio.h>void fun(char *a,char *b){ while(*a=='*') a++;while(*b=*a) {b++;a++;}}main( ){ char *s="****a*b****",t[80];fun(s,t); puts(t);}程序的运行结果是A)*****a*bB) a*bC) a*b****D) ab
点击查看答案
有以下程序:point(char*p) { *p=’d’; }main(){ char b[4]={’a’,’b’,’c’,’d’},*p=b; Point(p); printf("%c\n",*p);}程序运行后的输出结果是( )。A.a B.b C.c D.d
有以下程序:includevoid fun(char**p){++P;printf("%s\n",*p);}main()char*a[]={"Morn有以下程序: #include<stdio.h> void fun(char**p) { ++P;printf("%s\n",*p);} main() char*a[]={"Morning","Afternoon","Evening","Night"}; fun(A); } 程序的运行结果是( )。A.AfternoonB.fternoonC.MorningD.oring
有以下程序:includeincludeusingnameSpacestd;classperson{ intage; Char*nam有以下程序:include <iostream>include <string>using nameSpace std;class person{int age;Char * name;public:person ( int i, Char * str ){int j;j = strlen( str ) + 1;name = new char[ j ];strcpy( name, str );age = i;}~person(){delete name;cout<<"D";}void display(){cout<<name<<":"<<age;}};int main(){person demo( 30,"Smith" );demo.display();return 0;}则该程序的输出结果为:【 】。
有以下程序: include point ( char * p) {p + = 3; }main( ) char b[4] = {'a','b','c有以下程序: #include <stdio.h>point ( char * p) { p + = 3; }main( ) char b[4] = {'a','b','c','d'} , *p=b; point(p); printf( "% c \n" , * p);A.aB.bC.cD.d
有如下程序: #inClude<iostream> using namespaCe std; Class Book{ publiC: Book(Char*t=””){strCpy(title,t);} private: Char titlel40]; }; Class Novel:publiC Book{ publiC: Novel(Char*t=””):Book(t){} Char*Category( )Const{return”文学”;} }; int main( ){ Book * pb; pb=new Novel( ); Cout<<pb→Category( ); delete pb; return 0; } 若程序运行时输出结果是“文学”,则横线处缺失的语句是( )。A.Char*Category( );B.Char*Category( )Const;C.virtual Char*Category( )Const;D.virtual Char*Category( )Const=0;
有以下程序: include using namespace std; char *x[]={"First", "Second", "Third"有以下程序: #include <iostream> using namespace std; char *x[]={"First", "Second", "Third" }; void f(char *z[ ]) { cout<<*z++<<end1; } int main ( ) { char **y; y=x; f(y); return 0; }A.产生语法错误B.FirstC.SecpndD.Third