以下程序的运行结果是char*s,*p,*w;inta=0,b=0;s=(char*)malloc(sizeof(char)*10);strcpy(s,ThinkPad);p=s,w=s+strlen(s);while(p
相似题目
-
有以下程序#include struct ball{char color[10];int dim;};int main( ){struct ball list[2] = {{white, 2}, {yellow, 3}};printf(%s:%d , (list+1)->color, list->dim);return 0;}程序运行后的输出结果是( )
-
有以下程序: #include struct S { int a,b; } data[2]={10,100,20,200}; void main() {struct S p; p=data[1]; printf(%d\n,++(p.a)); } 程序的运行结果是( )
-
以下程序的运行结果是( )。 #include stdio.h void abc( char *p) { int i,j; for (i=j=0;*(p+i)!='\0';i++) if (*(p+i) < 'n') { *(p+j)=*(p+i); j++; } *(p+j)='\0'; } int main() { char str[]=moring
-
以下程序的输出结果为( )。int main(){char s[]=123,*p;p=s;printf(%c%c%c\n,*p,*++p,*++p);}
-
有以下程序#include #include main(){ char str[ ][20]={“One*World”, “One*Dream!”},*p=str[1];printf(“%d,”,strlen(p));printf(“%s ”,p);}程序运行后的输出结果是( )
-
以下程序的输出结果是( )。#include char cchar(char ch){if(ch>='A' && ch<='Z')ch=ch-'A'+'a';return ch;}int main( ){char s[ ]=\ABC+abc=defDEF\,*p=s;while(*p){*p=cchar(*p);p++;}printf(\%s\\n\,s);return 0;}
-
有以下程序,运行结果是______。#includevoid main(){ char a[10]={'6','1','*','4','*','9','*','0','*'}, *s=a;int n=0;while(*s<='9'&&*s>='0'){ n=10*n+*s-'0'; s++;}printf('%d ',n);}
-
有以下程序struct STU{char num[10];float score[3];}main(){struct STU s[3]={{\20021\,90,95,85},{\20022\,95,80,75},{\20023\,100,95,90}},*p=s;int i; float sum=0;for(i=0;i<3;i++)sum=sum+p->score[i];printf(\%6.2f\\n\,sum);}程序运行后的输出结果是()
-
有以下程序void fun(int n,int *p){ int f1,f2;if(n==1||n==2) *p=1;else{ fun(n-1,&f1);fun(n-2,&f2);*p=f1+f2;}}main( ){ int s;fun(3,&s);printf(\%d\\n\,s);}程序的运行结果是( ).
-
以下程序运行后的输出结果是________#include main(){ char *p; int i;p=(char *)malloc(sizeof(char)*20);strcpy(p,\welcome\);for(i=6;i>=0;i--) putchar(*(p+i));printf(\ -\); free(p);}
-
有以下程序#include struct ball{char color[10];int dim;};int main( ){struct ball list[2] = {{\white\, 2}, {\yellow\, 3}};printf(\%s:%d\, (list+1)->color, list->dim);return 0;}程序运行后的输出结果是( )
-
有以下程序include <stdio.h>int fun(char s[]){ int n=0;while(*s<=′9′&&*s>=′0′) {n=10*n+*s-′0′;s++;}return(n);}main(){ char s[10]={′6′,′1′,′*′,′4′,′*′,′9′,′*′,′0′,′*′};printf("%d\n",fun(s));}程序的运行结果是
-
有以下程序 main() { char str[][10]={"China","Beijing"},*p=str; printf("%s\n",p+10); } 程序运行后的输出结果是
-
有以下程序 include <stdio.h> void fun(char **p) { ++p; printf("%s\n",*p); } main() { char *a[]={"Moming","Afternoon","Evening","Night"}; fun(a); } 程序的运行结果是
-
有以下程序 struct STU {char num[10];float score[3];}; main() {stmct STU s[3]={{“20021”,90,95,85}, {“20022”,95,80,75}, {“20023”,100,95,90}},*p=s; int i;float sum=0; for(i=0;i<3;i++) sum=sum+p->score[i]; printf(“%6.2f\n”,sum); } 程序运行后的输出结果是
-
下面程序的运行结果是()。inelude<stdio.h>void del(char*s){ int i,j;char*a;a=s:for(i=
-
有以下程序: include<stdio.h> include<string.h> main() {char str[][20][{"One*World","One*Dream!"},*p=str[1]; prinft("%d,",strlen(p));printf("%s\n",p); } 程序运行后的输出结果是()。
-
下面程序的运行结果是()。 inelude<stdio.h> void del(char*s) { int i,j; char*a; a=s:
-
以下程序运行后的输出结果是______。 ss(char*s) { char*p=s; while(*p)p++; return(p-s); } main
-
有以下程序 include int fun(char s[]) {int n=0; while(*s<=9&&*s>=0){n=10*n+*s-o;s++;) return(n); } main {char s[10]={6,1,*,4,*,9,*, 0,*); printf("%d",fun(s)); } 程序运行的结果是()。
-
若有以下定义语句,程序运行后的输出的结果是______。 char s[]="9876",*p; for (p=s;p<s+2;p++) cout<<p<<endl;
-
以下程序运行后的输出结果是 ______。 include <stdio.h> struct NODE { int k; char s[20
-
以下程序运行后输出的结果是______。 include <string.h> char*ss(char *s) char *p,t; p=s+1;t=*s; while(*p)*p=*(p-1);p++; *(p-1)=t; return s: main() char *p,str[10]="abcdefgh"; p=ss(str); printf("%s",p);
-
35、以下程序的运行结果是___________。 void print(char *s){ printf("%s", s); } int main(){ char *p, *q; char str[]="Hello, World\n"; q=p=str; p++; printf(q); printf(p); return 0; }
推荐题目
- 下列交易或事项产生的现金流量中,属于投资活动产生的现金流量的有()。
- 电信的特点包括:无形性、生产过程与消费过程不可分和不可存储等。
- 在前轮定位中,能保持汽车直线行驶的稳定性,并力图使转弯后的前轮起自动回正作用的叫做()。
- 外平衡式热力膨胀阀波纹管上方作用着:().
- 土的结构分为()、()和絮凝结构三种。
- 在自动控制系统中有广泛应用的是()。
- 李老师在进行教学时总是在想“台下的学生会怎样看我”“身边的同事会觉得这样做好 吗?”你觉得李老师处在教师成长与发展中的( )。
- 消费者的安全权是消费者最重要的权利,其安全权的主要内容()
- 钢笔工具组中转换点工具的快捷键是:
- 对于磨损过大的精密丝杠,常采用()的方法修复。