A.BOOK&x=&book
B.BOOK&x=book
C.BOOK&x=newBOOK
D.BOOK&x=BOOK
以下选项中正确的语句组是( )。A.char*s;8={1.BOOK!”}iB.char*s;8=”BOOK!”;C.char S[10];S=”BOOK!”;D.char S[];S=”BOOK!”;
点击查看答案
假定有“structBOOK{chartitle[40]floatprice}BOOK*book=newBOOK”,则正确的语句为( )。A.strcpy(book->title,”WangTao”)B.strcpy(book.title,”WangTao”)C.strcpy(*book.title,”WangTao”)D.strcpy((*book)->title,”WangTao”)
假定有“structBOOK{chartitle[40]floatprice}BOOK*book”,则不正确的语句为( )。A.BOOK*x=newbookB.BOOKx={"C++Programming", 27.0}C.BOOK*x=newBOOKD.BOOK*x=book
假定有“struct BOOK{char title[40]; float price;} book;”,则正确的语句为()。Astruct BOOK x= &book;Bstruct BOOK *x=&book;Cstruct BOOK x=calloc(BOOK);Dstruct BOOK *x=BOOK;
假定有语句为“int b[10]; int *pb;”,则下面不正确的赋值语句为()。Apb=b;Bpb=&b[0];Cpb=b+2;Dpb=b[5];
假定有语句为"int *p=calloc(10+20,sizeof(int)),则p所指向的动态数组中所包含的元素个数为()。A10B20C30D40
假定有“struct BOOK{char title[40]; float price;}; struct BOOK book;”,则不正确的语句为()。Astruct BOOK *x=malloc(book);Bstruct BOOK x={"C++ Programming",27.0};Cstruct BOOK *x=malloc(sizeof(struct BOOK));Dstruct BOOK *x=&book;