题目内容

若有定义:int a[5];则数组中首元素的地址可以表示为( )

A. &a
B. a+1
C. a
D. &a[1]

查看答案
更多问题

若有定义int x[4][3]={1,2,3,4,5,6,7,8,9,10,11,12}; int (*p)[3]=x;则能够正确表示数组元素x[1][2]的表达式是( )

A. *((*p+1)[2])
B. (*p+1)+2
C. *(*(p+5))
D. *(*(p+1)+2)

执行以下程序后,a的值为____,b的值为____main____{ int a,b,k=4,m=6,*p1=&k,*p2=&m;a=p1==&m;b=(-*p1)/(*p2)+7;printf(“a=%dn”,a);printf(“b=%d”,b);}

下面程序的功能是将八进制正整数字符串转换为十进制整数。请填空。#include “stdio.h”#include “string.h”main(){ char *p,s[6];int n;p=s;gets(p);n= ① ;while( ② !=’\0’) n=n*8+*p-‘0’;printf(“%d\n”,n);}

下面程序的功能是删除字符串s中的所有空格。请填空。#include “stdio.h”#include “string.h”#include “ctype.h”main(){ char c,s[80];int i=0;c=getchar();while(c!='\n') { s[i]=c; i++; c=getchar(); }s[i]=’\0‘;delspace(s);puts(s);}delspace( char *p){ int i,t;char c[80];for(i=0,t=0; ① ; i++)if( !isspace( ② )) c[t++]=p[i];c[t]=’\0’;strcpy(p,c);}

答案查题题库