
求救,十万火急,求高手 10
1.读程序写出程序执行结果#include<stdio.h>voidmain(){inti,j,m=0;for(i=1;i<=10;i+=3)for(j=3;j<10;j...
1.
读程序写出程序执行结果
#include <stdio.h>
void main()
{ int i,j,m=0;
for(i=1;i<=10;i+=3)
for(j=3;j<10;j+=4)
m++;
printf(“m=%d\n”,m);
}
2.
读程序写出程序执行结果
#include <stdio.h>
int fun(int x)
{ int y=1;
static int z=4;
z+=1;++y;
return(x+y+z);
}
void main()
{ int i;
for(i=1;i<=3;i++)
printf("%3d",fun(i));
}
3.
读程序写出程序执行结果
#include <stdio.h>
int d=1 ;
int fun(int p)
{ static int d=3 ;
d+=p;
printf("%3d" , d) ;
return(d) ;
}
void main( )
{ printf("%3d\n" , fun(2+fun(d))) ;
}
4.
读程序写出程序执行结果
#include <stdio.h>
void main ( )
{ char a[20]= "abcXYZ", c ;
int i, j;
j= strlen(a)-1 ;
for (i=0; j>i; i++,j--)
{ c=*(a+i); *(a+i)=*(a+j); *(a+j)=c; }
puts(a);
}
5.
读程序写出程序执行结果
#include <stdio.h>
#define N 3
void zz(int x[N][N])
{ int i,j,t;
for(i=0;i<N;i++)
for(j=0;j<i;j++)
{ t=x[i][j]; x[i][j]=x[j][i]; x[j][i]=t; }
}
void main()
{ int str[N][N]={1,2,3,4,5,6,7,8,9}, i,j;
zz(str);
for(i=0;i<N;i++)
{ for(j=0;j<N;j++) printf(“%3d”,str[i][j]) ;
printf("\n") ;
}
}
6.
读程序写出程序执行结果
#include <stdio.h>
int m=2;
int fun(int x,int y)
{ int m=3;
return(x*y-m);
}
void main()
{ int a=7, b=5;
printf("%d\n", fun(a,b)/m);
}
7.
读程序写出程序执行结果
#include <stdio.h>
void ex( )
{ static int x=3 ;
--x ;
printf(“%d”,x) ;
}
void main ( )
{ ex( );
ex( );
}
8.
读程序写出程序执行结果
#include <stdio.h>
int f(int b[], int m,int n)
{ int i,s=0;
for(i=m;i<n;i+=2) s+=b[i] ;
return s;
}
void main()
{ int x, a[]={1,2,3,4,5,6,7,8,9,10};
x=f(a,3,8);
printf("%d\n",x);
}
9.
读程序写出程序执行结果
#include <stdio.h>
char fun(char *s)
{ if( *s >= ¢a¢ && *s <= ¢z¢ )
*s=*s-32;
return *s;
}
void main()
{ char a[20]="Welcome",*p,ch;
for(p=a;*p!=¢\0¢;p++)
{ ch=fun(p);
putchar(ch);
}
}
10.
读程序写出程序执行结果
#include <stdio.h>
void main()
{ int n=2;
printf(“%d\n”, (++n , n+=2 , --n)) ;
} 展开
读程序写出程序执行结果
#include <stdio.h>
void main()
{ int i,j,m=0;
for(i=1;i<=10;i+=3)
for(j=3;j<10;j+=4)
m++;
printf(“m=%d\n”,m);
}
2.
读程序写出程序执行结果
#include <stdio.h>
int fun(int x)
{ int y=1;
static int z=4;
z+=1;++y;
return(x+y+z);
}
void main()
{ int i;
for(i=1;i<=3;i++)
printf("%3d",fun(i));
}
3.
读程序写出程序执行结果
#include <stdio.h>
int d=1 ;
int fun(int p)
{ static int d=3 ;
d+=p;
printf("%3d" , d) ;
return(d) ;
}
void main( )
{ printf("%3d\n" , fun(2+fun(d))) ;
}
4.
读程序写出程序执行结果
#include <stdio.h>
void main ( )
{ char a[20]= "abcXYZ", c ;
int i, j;
j= strlen(a)-1 ;
for (i=0; j>i; i++,j--)
{ c=*(a+i); *(a+i)=*(a+j); *(a+j)=c; }
puts(a);
}
5.
读程序写出程序执行结果
#include <stdio.h>
#define N 3
void zz(int x[N][N])
{ int i,j,t;
for(i=0;i<N;i++)
for(j=0;j<i;j++)
{ t=x[i][j]; x[i][j]=x[j][i]; x[j][i]=t; }
}
void main()
{ int str[N][N]={1,2,3,4,5,6,7,8,9}, i,j;
zz(str);
for(i=0;i<N;i++)
{ for(j=0;j<N;j++) printf(“%3d”,str[i][j]) ;
printf("\n") ;
}
}
6.
读程序写出程序执行结果
#include <stdio.h>
int m=2;
int fun(int x,int y)
{ int m=3;
return(x*y-m);
}
void main()
{ int a=7, b=5;
printf("%d\n", fun(a,b)/m);
}
7.
读程序写出程序执行结果
#include <stdio.h>
void ex( )
{ static int x=3 ;
--x ;
printf(“%d”,x) ;
}
void main ( )
{ ex( );
ex( );
}
8.
读程序写出程序执行结果
#include <stdio.h>
int f(int b[], int m,int n)
{ int i,s=0;
for(i=m;i<n;i+=2) s+=b[i] ;
return s;
}
void main()
{ int x, a[]={1,2,3,4,5,6,7,8,9,10};
x=f(a,3,8);
printf("%d\n",x);
}
9.
读程序写出程序执行结果
#include <stdio.h>
char fun(char *s)
{ if( *s >= ¢a¢ && *s <= ¢z¢ )
*s=*s-32;
return *s;
}
void main()
{ char a[20]="Welcome",*p,ch;
for(p=a;*p!=¢\0¢;p++)
{ ch=fun(p);
putchar(ch);
}
}
10.
读程序写出程序执行结果
#include <stdio.h>
void main()
{ int n=2;
printf(“%d\n”, (++n , n+=2 , --n)) ;
} 展开
2个回答
展开全部
各位作文高手们、紧急求救~~~求5篇六年级的读书笔记!!!十万火急啊、、读《命运》有感 前阵子在书城买了本书,叫《滴水藏海》,里边有300个经典
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询