已有定义int k=2;int*ptr1,*ptr2;且ptr1、ptr2均已指向变量k,下面不能正确执行的赋值语句是()A、k=*ptr1+*ptr2B、prt2=k;C、ptr1=ptr2D、k=*ptr1*(*ptr2)
已有定义int k=2;int*ptr1,*ptr2;且ptr1、ptr2均已指向变量k,下面不能正确执行的赋值语句是()
- A、k=*ptr1+*ptr2
- B、prt2=k;
- C、ptr1=ptr2
- D、k=*ptr1*(*ptr2)
相关考题:
( 20 )语句 int *p=k; 定义了指针 p ,与这个语句等效的语句序列是A ) int *p;p=k;B ) int *p;p=k;C ) int *p;*p=k;D ) int *p;*p=k
若类A和类B的定义如下:includeclass A{int i,j;public:int geti(){return i;}};class 若类A和类B的定义如下: #include<malloc.h> class A { int i,j; public: int geti() { return i; } }; class B:public A { int k; public: void make() { k=i*j; } }; 则上述定义中非法的表达式是( )。A.k=i*jB.int k;C.return i;D.void make();
已有定义“int k=2;int*ptr1, *ptr2;”,且ptr1和ptr2均已指向变量k,下面不能正确执行的语句是______。A.k=*ptr1+*ptr2;B.ptr2=k;C.ptr1=ptr2;D.K=*ptr1*(*ptr2);
下面程序的输出结果是______。main(){ static char a[]="language",b[]="program";char *ptrl=a,*ptr2=b;int kfor(k=0;k<7;k++)if(*(ptrl+k)==*(ptr2+k))printf("%c",*(ptr1+k));}
下面函数的功能是______。 exchange(int*ptr1,*ptr2) { int*ptr; ptr=-ptr1; ptr1=ptr2; ptr2=ptr; }A.交换*ptr1和*ptr2的值B.无法改变*ptr1和*ptr2的值C.可能造成系统故障,因为使用了空指针D.交换*ptr1和*pb2的地址
若类A和类B的定义如下: class A { int i,j; public: int geti() { return i; } }; class B: public A { int k; public: void make() { k=i*j } }; 则上述定义中A.k=i*j;B.int k;C.return i;D.void make()
已有定义“int k=2;int*ptr1,*ptr2;”,且ptr1和ptr2均已指向变量k,下面不能正确执行的语句是______。A.k=*ptr1+*ptr2;B.ptr2=k;C.ptrl=ptr2;D.K=*ptr1*(*ptr2);
下面程序的输出结果是( )。 include main(){static chara[]="zhao",b[]="juan"; char*pt 下面程序的输出结果是( )。 include<stdio.h> main() {static chara[]="zhao",b[]="juan"; char*ptr1=a,*ptr2=b; int k; for(k=0;k<4;k++) if(*(ptr1+k)==*(ptr2+k)) printf("%c",*(ptr1+k));}
设有如下定义: int arr[]={6,7,8,9,10); int*ptr: ptr=arr; *(ptr2)=2; printf("%d,%d\n",*ptr,*(ptr2)): 则下列程序段的输出结果为( )。A.8,10B.6,8C.7,9D.6,2
以下程序段的输出为( ) static char a[]="language",b[]="progratne"; char *ptr1,*ptr2; int k; ptr1=a;ptr2=b; for(k=0;k<7;k++) if(*(ptr1+k)==*(ptr2+k)) printf("%c",*(ptr1+k));A.gaeB.gaC.languageD.有语法错误
在整型指针变量ptr1、ptr12的定义中,错误的是 ______。A.int x, *ptr1, ptr2;B.int*ptrl, x, *ptr2;C.int x,*ptrl=x,*ptr2;D.int*ptr1, x,*ptr2=x;
已有定义int k=2; int *ptrl, *ptr2,且ptr1和ptr2 均已指向变量k,下面不能正确执行的赋值语句是()A、k =*ptr1+*ptr2;B、ptr2 = k;C、ptr1=ptr2;D、k = *ptr1*(*ptr2);
public interface Foo { int k = 4; 3. } Which three are equivalent to line 2?()A、 final int k = 4;B、 public int k = 4;C、 static int k = 4;D、 abstract int k = 4;E、 volatile int k = 4;F、 protected int k = 4;
已有定义intk=2,*ptr1,*ptr2;且ptrl和Ptr2均已指向变量k,下面能正确执行的赋值语句是()A、k=*ptrl+*ptr2;B、ptr2=kC、*ptrl=ptr2;D、ptrl=*ptr2;
Given: 1. public interface Foo { 2. int k = 4: 3. } Which three are equivalent to line 2?()A、 final int k = 4:B、 public int k = 4:C、 static int k = 4:D、 private int k = 4:E、 abstract int k = 4:F、 volatile int k = 4:G、 transient int k = 4:H、 protected int k = 4:
public interface Foo{ int k = 4; } Which three are equivalent to line 2? ()A、 Final int k = 4;B、 Public int k = 4;C、 Static int k = 4;D、 Private int k = 4;E、 Abstract int k = 4;F、 Volatile int k = 4;G、 Transient int k = 4;H、 Protected int k = 4;
多选题public interface Foo { int k = 4; 3. } Which three are equivalent to line 2?()Afinal int k = 4;Bpublic int k = 4;Cstatic int k = 4;Dabstract int k = 4;Evolatile int k = 4;Fprotected int k = 4;
多选题public interface Foo{ int k = 4; } Which three are equivalent to line 2? ()AFinal int k = 4;BPublic int k = 4;CStatic int k = 4;DPrivate int k = 4;EAbstract int k = 4;FVolatile int k = 4;GTransient int k = 4;HProtected int k = 4;
多选题public interface Foo{ int k = 4; } Which three are equivalent to line 2?()AFinal int k = 4;BPublic int k = 4;CStatic int k = 4;DPrivate int k = 4;EAbstract int k = 4;FVolatile int k = 4;
单选题已有定义int k=2; int *ptrl, *ptr2,且ptr1和ptr2 均已指向变量k,下面不能正确执行的赋值语句是()Ak =*ptr1+*ptr2;Bptr2 = k;Cptr1=ptr2;Dk = *ptr1*(*ptr2);
多选题Given: 1. public interface Foo { 2. int k = 4: 3. } Which three are equivalent to line 2?()Afinal int k = 4:Bpublic int k = 4:Cstatic int k = 4:Dprivate int k = 4:Eabstract int k = 4:Fvolatile int k = 4:Gtransient int k = 4:Hprotected int k = 4:
多选题下列选项中可以替换所给代码中第2行的有()。Afinal int k = 4;Bpublic int k = 4;Ctransient int k = 4;Dprivate int k = 4;Eabstract int k = 4;Fvolatile int k=4;Gstatic int k= 4;Hprotected int k = 4;