正在加载图片...
(11)以下程序的功能是根据输入的“y”("Y”)与“n”("N”),在屏幕上分别显示出“ This is YES.”与“ This is NO.。空白处需要填入的内容是 #include stdio. h> void YesNo( char ch) I switch( ch) case'Y: printf("\n This is YES. \n"): case n caseN: printf("\nThis is NO \n"):I I char ch printf("\nEnter a chary. Y'or'n, N: ") ch=(12: (12)以下程序调用函数 swap_p将指针s和t所指单元(a和b)中的内容交换,请填空 main() inta=10,b=20,·s,*t; a:t=出 wapp(I3】); printf("%d%d, a, b"): I swap_p( int+.ss, int..t) ss曰 tt= term: F (13)下面的程序实现的是指针p所指向的地址的n个数中,求出最大的和最小的数据,请填空。 fun( int p, int n Int Int max, mi max =min=* p for(q=p: I f(q>max)m else if( +q<min )min=.q: I (14)当运行以下程序时,从键盘输入 abcdabedef<CR> (<CR>表示回车),则下面程序的运行结果是【5 #include stdio. h> int a; char s[ 80, t[80 nt(a=%d\n”,a); nar.pl =p char·ql for(i=0;*p!="O';p++,i++) I p=pl +i if(·p!=*q) continue for(q1=q+1,p=p+1;*p!="0&·q!="Vo°;q1++,p++) f·p!*ql) break. if(.qI ==\0)return 15)下面程序的输出结果是6】。 #include stdio. h> I static char a[]=” language”,b]=" program”;
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有