笔果题库
计算机二级C语言程序设计
VIP题库
搜题找答案,就上笔果题库
有以下程序#include main(){ int m=1,n=2,*p=&m,*q=&n,*r;r=p;p=q;q=r;printf("%d,%d,%d,%d\n",m,n,*p,*q);}程序运行后的输出结果是______。
搜题找答案,就上笔果题库
有以下程序#include void fun( int *s, int n1, int n2 ){ int i,j,t;i=n1; j=n2;while( i
搜题找答案,就上笔果题库
有以下程序#include main(){int a = 2, *ptr;ptr = &a;*ptr = 8;a = (*ptr) ++;printf("%d,%d\n", a, *ptr);}程序运行后的输出结果是______。
搜题找答案,就上笔果题库
若有定义:int *p[3];,则以下叙述中正确的是______。
搜题找答案,就上笔果题库
有下列程序#include int *add(int s[]){ s+=1;*s+=10;*--s+=20;return s;} main(){ int a[10]={1,2,3,4,5,6,7,8,9,10},*p;p=add(a);printf("%d,%d,%d,%d",a[0],a[1],*p,p[1]);}执行后的输出结果是______。
搜题找答案,就上笔果题库
有以下程序(其中库函数strstr()首部格式为:char *strstr(char *p1, char *p2) 其功能是确定p2字符串是否在p1中出现,并返回p2第一次出现的字符串首地址)#include #include char *a="you";char *b="Welcome you to Beijing!";main(){ char *p;p = strstr(b, a);printf("%s\n", p);}程序的运行结果是______。
搜题找答案,就上笔果题库
若有以下程序#include #include main(){ char str[][10]={ "One" , "Three" , "Five"}, *p = str[0];printf( "%s," , p+10 );printf( "%d\n" ,strlen(p+=10) );}执行后的输出结果是______。
搜题找答案,就上笔果题库
若程序中已包含头文件stdio.h,以下选项中,正确运用指针变量的程序段是______。
搜题找答案,就上笔果题库
有以下程序#include main(){int a[]={1,2,3,4,5,6,7,8,9,10,11,12,},*p=a+5,*q=NULL;*q=*(p+5);printf("%d %d\n",*p,*q);}程序运行后的输出结果是______。
搜题找答案,就上笔果题库
若有以下程序 #include int k=7,m=5; void f(int **s) { int *t=&k; s=&t; *s=&m; printf("%d,%d,%d,", k, *t, **s); } main() { int i=3,*p=&i, **r = &p; f(r); printf("%d,%d,%d\n", i, *p, **r); }则程序的输出结果是______。