2007年南开100题_编程题 二级C语言上机题库
阿尔伯特教研组编 禁止传阅
1
编程题
1) m个人的成绩存放在 score数组中,请编写函数
fun,它的功能是:返回低于平均分的人数,并将低于
平均分的分数放在 below所指的数组中。
例如,当 score数组中的数据为 10、20、30、40、50、
60、70、80、90时,函数返回的人数应该是 4,below
中的数据应为 10、20、30、40。
请勿改动主函数main和其他函数中的任何内容, 仅在
函数 fun 的花括号中填入所编写的若干语句。
#include
#includ...
阿尔伯特教研组编 禁止传阅
1
编程题
1) m个人的成绩存放在 score数组中,请编写函数
fun,它的功能是:返回低于平均分的人数,并将低于
平均分的分数放在 below所指的数组中。
例如,当 score数组中的数据为 10、20、30、40、50、
60、70、80、90时,函数返回的人数应该是 4,below
中的数据应为 10、20、30、40。
请勿改动主函数main和其他函数中的任何内容, 仅在
函数 fun 的花括号中填入所编写的若干语句。
#include
#include
#include
int fun(int score[],int m, int below[])
{
}
main()
{
int i,n,below[9];
int score[9]={10,20,30,40,50,60,70,80,90};
FILE *out;
n=fun(score,9,below);
printf("\nBelow the average score are :");
out=fopen("out.dat", "w");
for(i=0;i
#include
void fun(int *a,int *n)
{
}
main()
{
int aa[1000],n,k;
FILE *out;
fun(aa,&n);
out=fopen("out.dat", "w");
for(k=0;k
#include
void fun(int x, int pp[], int *n)
{
}
main()
{
int x, aa[1000], n, i;
FILE *out;
printf("\nPlease enter an integer number:\n");
scanf("%d",&x);
fun(x,aa,&n);
for(i=0;i
# include
void fun(char *tt, int pp[])
{
}
main()
{
char aa[1000];
int bb[26], k;
FILE *out;
printf("\nPlease enter a char string:");
scanf("%s",aa);
fun(aa,bb);
for(k=0;k<26 ; k++)
printf("%d",bb[k]);
printf("\n");
fun("a bosom friend afar brings a distant land near",
bb);
out = fopen("out.dat", "w");
for (k = 0; k < 26; k++)
fprintf(out, "%d\n", bb[k]);
fclose(out);
}
5) 请编写一个函数 void fun(int m,int k,int xx[]),该
函数的功能是:将大于整数 m且紧靠 m的 k个素数
存入 xx所指的数组中。
例如,若输入:17,5,则应输出:19,23,29,31,
37。
请勿改动主函数main和其他函数中的任何内容, 仅在
函数 fun 的花括号中填入所编写的若干语句。
#include
#include
void fun(int m, int k, int xx[])
{
阿尔伯特教研组编 禁止传阅
2
}
main()
{
int m,n,zz[1000];
FILE *out;
printf("\nPlease enter two integers:");
scanf("%d,%d",&m,&n);
fun( m,n,zz);
for(m=0; m
# include
# define LEN 20
void fun(char a[], char b[], int n)
{
}
main()
{
char str1[LEN],str2[LEN];
int n;
FILE *out;
printf("Enter the string:\n");
gets(str1);
printf("Enter the position of the string deleted:");
scanf("%d",&n);
fun(str1, str2, n);
printf("The new string is:%s\n",str2);
fun("Hello World!", str2, 9);
out = fopen("out.dat", "w");
fprintf(out, "%s", str2);
fclose(out);
}
7) 请编写一个函数 int fun(int *s, int t, int*k),用来求
出数组的最大元素在数组中的下标并存放在 k所指的
存储单元中。
例如,输入如下整数:
876 675 896 101 301 401 980 431 451 777
则输出结果为:6,980。
请勿改动主函数main和其他函数中的任何内容, 仅在
函数 fun 的花括号中填入所编写的若干语句。
# include
# include
void fun(int *s, int t , int *k)
{
}
main( )
{
int a[10]={876,675,896,101,301,401
,980,431,451,777}, k ;
FILE *out;
fun(a,10,&k);
printf("%d, %d\n", k, a[k]);
out = fopen("out.dat", "w");
fprintf(out, "%d\n%d", k, a[k]);
fclose(out);
}
8) 编写函数 fun,函数的功能是:根据以下公式计算
s,计算结果作为函数值返回;n 通过形参传入。
例如:若 n 的值为 11时,函数的值为 1.833333。
请勿改动主函数main和其他函数中的任何内容, 仅在
函数 fun 的花括号中填入所编写的若干语句。
#include
#include
#include
float fun (int n)
{
}
main()
{
int n;
float s;
FILE *out;
printf("\nPlease enter N:");
scanf("%d",&n);
s=fun(n);
printf("The result is: %f\n",s);
s = fun(28);
out = fopen("out.dat", "w");
fprintf(out, "%f", s);
fclose(out);
}
9) 编写函数 fun,它的功能是:根据以下公式求 P
的值,结果由函数值带回。m与 n 为两个正整数且要
求 m > n。
例如:m=12,n=8时,运行结果为 495.000000。
请勿改动主函数main和其他函数中的任何内容, 仅在
函数 fun 的花括号中填入所编写的若干语句。
10编写函数 fun,它的功能是:利用以下所示的简单
迭代方法求方程 cos(x)x=0的一个实根。
迭代步骤如下:
(1)取 x1初值为 0.0;
(2)x0= x1,把 x1的值赋给 x0;
(3)x1= cos(x0),求出一个新的 x1;
(4)若 x0 x1,的绝对值小于 0.000001,则执行步
骤(5),否则执行步骤(2);
(5)所求 x1就是方程 cos(x)x=0的一个实根,作为
函数值返回。
程序将输出结果 Root=0.739085。
请勿改动主函数main和其他函数中的任何内容, 仅在
函数 fun 的花括号中填入所编写的若干语句。
#include
#include
#include
float fun()
{
}
main()
{
FILE *out;
float f = fun();
printf("Root=%f\n", f);
阿尔伯特教研组编 禁止传阅
3
out = fopen("out.dat", "w");
fprintf(out, "%f", f);
fclose(out);
}
11) 下列程序定义了 N×N的二维数组,并在主函数
中自动赋值。请编写函数 fun(int a[] [N]),该函数的功
能是:使数组左下半三角元素的值会全部置成 0。
例如:a数组中的值为
则返回主程序后 a数组中的值应为
请勿改动主函数main和其他函数中的任何内容, 仅在
函数 fun 的花括号中填入所编写的若干语句。
#include
#include
#include
#define N 5
void fun(int a[][N])
{
}
main()
{
int a[N][N],i,j;
FILE *out;
printf("***** The array *****\n");
for(i=0;i
#include
#include
#define N 5
double fun (int w[][N])
{
}
main()
{
int a[N][N]={0,1,2,7,9,1,9,7,4,5,2,3,8,3,1
,4,5,6,8,2,5,9,1,4,1};
int i,j;
FILE *out;
double s;
printf("***** The array *****\n");
for(i=0;i
#include
#define M 3
#define N 4
void fun ( int tt[M][N],int pp[N] )
{
}
main( )
{
int t [ M ][ N ]={{22,45, 56,30},
{19,33, 45,38},
{20,22, 66,40}};
int p [ N ], i, j, k;
FILE *out;
printf ( "The original data is : \n" );
for( i=0; i
#include
#define M 4
#define N 5
int fun ( int a[M][N] )
{
}
main( )
{
int aa[M][N]={{1,3,5,7,9},
{2,9,9,9,4},
{6,9,9,9,8},
{1,3,5,7,0}};
int i, j, y;
FILE *out;
printf ( "The original data is : \n" );
for ( i=0; i
#include
unsigned fun ( unsigned w )
{
}
main( )
{
unsigned x;
FILE *out;
printf ( "Enter a unsigned integer number :
" );
scanf ( "%u", &x );
printf ( "The original data is : %u\n", x );
if ( x<10 )
printf ("Data error !");
else
printf ( "The result : %u\n", fun
( x ) );
out = fopen("out.dat", "w");
fprintf(out, "%u" , fun(28));
fclose(out);
}
16请编一个函数float fun(double h),函数的功能是
对变量h中的值保留2位小数,并对第三位进行四舍五
入(规定h中的值为正数)。
例如:若h值为8.32433,则函数返回8.32;若h值为
8.32533,则函数返回8.33。
请勿改动主函数main和其他函数中的任何内容,仅在
fun函数的花括号中填入所编写的若干语句。
#include
#include
float fun ( float h )
{
}
main( )
{
float a;
FILE *out;
printf ( "Enter a: ");
scanf ( "%f", &a );
printf ( "The original data is: ");
printf ( "%f \n\n", a );
printf ( "The result : %f\n", fun ( a ) );
out = fopen("out.dat", "w");
fprintf(out, "%f" , fun(3.141593));
fclose(out);
}
17给定程序的功能是将n个人员的考试成绩进行分段
统计,考试成绩放在a数组中,各分段的人数存到b数
组中:成绩为60到69的人数存到b[0]中,成绩为70到
79的人数存到b[1],成绩为80到89的人数存到b[2],
成绩为90到99的人数存到b[3], 成绩为100的人数存到
b[4],成绩为60分以下的人数存到b[5]中。
例如,当a数组中的数据是:93、85、77、68、59、43、
94、75、98。 调用该函数后,b数组中存放的数据应是:
1、2、1、3、0、2。
请勿改动主函数main和其他函数中的任何内容,仅在
横线上填入所编写的若干达式或语句。
#include
void fun(int a[], int b[], int n)
{
int i;
for (i=0; i<6; i++)
b[i] = 0;
for (i=0; i<___1___; i++)
if (a[i]<60)
b[5]++;
___2___
b[(a[i]-60)/10]++;
}
main()
{
int i, a[100] = {93, 85, 77, 68, 59, 43, 94,
75, 98}, b[6];
fun(___3___, 9);
printf("the result is: ");
for (i=0; i<6; i++)
printf("%d ", b[i]);
printf("\n");
}
阿尔伯特教研组编 禁止传阅
5
17请编一个函数fun(char *s),该函数的功能是把字
符串中的内容逆置。
例如:字符串中原有的字符串为abcdefg,则调用该函
数后,串中的内容为gfedcba。
请勿改动主函数main和其他函数中的任何内容,仅在
函数fun的花括号中填入所编写的若干语句。
#include
#include
#include
#define N 81
void fun ( char *s)
{
}
main()
{
char a[N];
FILE *out;
printf ( "Enter a string : ");
gets ( a );
printf ( "The original string is: " );
puts( a );
fun ( a );
printf("\n");
printf ( "The string after modified : ");
puts ( a );
strcpy(a, "Hello World!");
fun(a);
out = fopen("out.dat", "w");
fprintf(out, "%s" , a);
fclose(out);
}
18) 编写程序,实现矩阵(3行列)的转置(即行列
互换)。
例如,若输入下面的矩阵:
100 200 300
400 500 600
700 800 900
则程序输出:
100 400 700
200 500 800
300 600 900
请勿改动主函数main和其他函数中的任何内容,仅在
函数fun的花括号中填入所编写的若干语句。
#include
#include
void fun(int array[3][3])
{
}
main()
{
int i,j;
int array[3][3]={{100,200,300},
{400,500,600},
{700,800,900}};
FILE *out;
for (i=0;i<3;i++)
{
for(j=0;j<3;j++)
printf("%7d",array[i][j]);
printf("\n");
}
fun(array);
printf("Converted array:\n");
out = fopen("out.dat", "w");
for (i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
printf("%7d",array[i][j]);
fprintf(out, "%7d",array[i][j]);
}
printf("\n");
fprintf(out, "\n");
}
fclose(out);
}
19) 编写函数fun,该函数的功能是:从字符串中删
除指定的字符。 同一字母的大、 小写按不同字符处理。
例如:若程序执行时输入字符串为:turbo c and
borland c++
从键盘上输入字符n,则输出后变为:turbo c ad
borlad c++
如果输入的字符在字符串中不存在,则字符串照原样
输出。
请勿改动主函数main和其他函数中的任何内容,仅在
函数fun的花括号中填入所编写的若干语句。
#include
#include
void fun(char s[],int c)
{
}
main()
{
static char str[]="turbo c and borland c++";
char ch;
FILE *out;
printf("原始字符串:%s\n",str);
printf("输入一个字符:");
scanf("%c",&ch);
fun(str,ch);
printf("str[]=%s\n",str);
strcpy(str, "turbo c and borland c++");
fun(str, 'a');
out = fopen("out.dat", "w");
fprintf(out, "%s", str);
fclose(out);
}
20) 编写函数 int fun(int lim,int aa[MAX]),该函数的
功能是求出小于或等于 lim的所有素数并放在 aa数组
中,该函数返回所求出的素数的个数。
请勿改动主函数main和其他函数中的任何内容, 仅在
函数 fun 的花括号中填入所编写的若干语句。
#include
#include
#define MAX 100
int fun( int lim, int aa[MAX])
{
}
main()
{
int limit,i,sum;
int aa[MAX] ;
FILE *out;
printf("输入一个整数");
scanf(" %d", &limit);
sum=fun(limit, aa);
for(i=0 ; i < sum; i++)
{
if(i%10 == 0 && i !=0)
printf("\n");
printf("%5d", aa[i]);
}
sum=fun(28, aa);
out = fopen("out.dat", "w");
for(i=0 ; i < sum; i++)
fprintf(out, "%d\n", aa[i]);
fclose(out);
}
阿尔伯特教研组编 禁止传阅
6
21) 请编写函数 fun,对长度为 7 个字符的字符串,
除首、尾字符外,将其余 5 个字符按 ASCII码降序
排列。
例如,原来的字符串为 CEAedca,则排序后输出为
CedcEAa。
请勿改动主函数 main和其他函数中的任何内容,
仅在函数 fun的花括号中填入所编写的若干语句。
#include
#include
#include
#include
void fun( char *s,int num)
{
}
main()
{
char s[10];
FILE *out;
printf("输入 7 个字符的字符串:");
gets(s);
fun(s,7);
printf("\n%s", s);
out=fopen("out.dat", "w");
strcpy(s, "ceaEDCA");
fprintf(out, "%s", s);
fclose(out);
}
22) N名学生的成绩已在主函数中放入一个带头
节点的链表结构中,h指向链表的头节点。请编写
函数 fun,它的功能是:找出学生的最高分,由函
数返回。
请勿改动主函数 main和其他函数中的任何内容,
仅在函数 fun的花括号中填入所编写的若干语句。
#include
#include
#define N 8
struct slist
{
double s;
struct slist *next;
};
typedef struct slist STREC;
double fun( STREC *h )
{
}
STREC *creat( double *s)
{
STREC *h,*p,*q;
int i=0;
h=p=(STREC*)malloc(sizeof(STREC));
p>s=0;
while(is=s[i];
i++;
p>next=q;
p=q;
}
p>next=0;
return h;
}
outlist(STREC *h)
{
STREC *p;
p=h>next;
printf("head");
do
{
printf(">%2.0f",p>s);
p=p>next;
}
while(p!=0);
printf("\n\n");
}
main()
{
double s[N]={85,76,69,85,91,72,64,87}, max;
STREC *h;
FILE *out;
h=creat(s);
outlist(h);
max=fun(h);
printf("max=%6.1f\n",max);
out=fopen("out.dat", "w");
fprintf(out, "max=%6.1f",max);
fclose(out);
}
23) 请编写函数 fun,该函数的功能是:判断字符
串是否为回文?若是则函数返回 1,主函数中输出
YES,否则返回 0,主函数中输出 NO。回文是指顺
读和倒读都一样的字符串。
例如,字符串 LEVEL是回文,而字符串 123312就
不是回文。
请勿改动主函数 main和其他函数中的任何内容,
仅在函数 fun的花括号中填入所编写的若干语句。
#include
#define N 80
int fun(char *str)
{
}
main()
{
char s[N] ;
FILE *out;
char *test[] = {"1234321", "123421", "123321",
"abcdCBA"};
int i;
printf("Enter a string: ") ;
gets(s) ;
printf("\n\n") ;
puts(s) ;
if(fun(s))
printf(" YES\n") ;
else
printf(" NO\n") ;
out=fopen("out.dat", "w");
for (i = 0; i < 4; i++)
if (fun(test[i]))
fprintf(out, "YES\n");
else
fprintf(out, "NO\n");
fclose(out);
}
24) 请编写一个函数 fun,它的功能是:将一个数
字字符串转换为一个整数(不得调用 C语言提供的
将字符串转换为整数的函数)。
例如,若输入字符串“1234” ,则函数把它转换为
整数值1234。
请勿改动主函数 main和其他函数中的任何内容,
仅在函数 fun的花括号中填入所编写的若干语句。
#include
#include
long fun ( char *p)
{
}
阿尔伯特教研组编 禁止传阅
7
main()
{
char s[6];
long n;
FILE *out;
char *test[] = {"1234", "5689", "7102",
"4356"};
printf("Enter a string:\n");
gets(s);
n = fun(s);
printf("%ld\n",n);
out=fopen("out.dat", "w");
for(n=0;n<4;n++)
fprintf(out, "%ld\n", fun(test[n]));
fclose(out);
}
25) 请编写一个函数 fun,它的功能是:比较两个
字符串的长度,(不得调用 C 语言提供的求字符串
长度的函数),函数返回较长的字符串。若两个字
符串长度相同,则返回第一个字符串。
例如,输入:beijing shanghai (为回车
键),函数将返回 shanghai。
请勿改动主函数 main和其他函数中的任何内容,
仅在函数 fun的花括号中填入所编写的若干语句。
#include
char *fun ( char *s, char *t)
{
}
main( )
{
char a[20],b[10],*p,*q;
int i;
FILE *out;
printf("Input 1th string:");
gets(a);
printf("Input 2th string:");
gets( b);
printf("%s\n", fun(a, b ));
out=fopen("out.dat", "w");
fprintf(out, "%s", fun("hunan", "changsha"));
fclose(out);
}
26) 请编写一个函数 fun,它的功能是:根据以下
公式求π的值(要求满足精度 0.0005,即某项小于
0.0005 时停止迭代):
程序运行后,如果输入精度 0.0005,则程序输出为
3.14··· 。
请勿改动主函数 main和其他函数中的任何内容,
仅在函数 fun的花括号中填入所编写的若干语句。
#include
#include
double fun ( double eps)
{
}
main()
{
double x;
FILE *out;
printf("Input eps:");
scanf("%lf",&x);
printf("\neps=%lf, PI=%lf\n", x, fun(x));
out=fopen("out.dat", "w");
fprintf(out, "eps=%lf, PI=%lf\n", 0.00003,
fun(0.00003));
fclose(out);
}
27) 请编写一个函数 fun,它的功能是:求出 1 到
m之内(含 m)能被 7 或 11 整除的所有整数放在
数组 a 中,通过 n返回这些数的个数。
例如,若传送给 m的值为 50,则程序输出:7 11 14
21 22 28 33 35 42 44 49。
请勿改动主函数 main和其他函数中的任何内容,
仅在函数 fun的花括号中填入所编写的若干语句。
#include
#include
#define M 100
void fun ( int m, int *a, int *n )
{
}
main()
{
int aa[M], n, k;
FILE *out;
fun ( 50, aa, &n );
for ( k = 0; k < n; k++ )
if((k+1)%20==0)
printf("%4d\n", aa[k]);
else
printf("%4d", aa[k] );
printf("\n");
out=fopen("out.dat", "w");
fun ( 100, aa, &n );
for ( k = 0; k < n; k++ )
if((k+1)%10==0)
fprintf(out, "%4d\n", aa[k]);
else
fprintf(out, "%4d", aa[k] );
fclose(out);
}
28) 请编写一个函数 fun,它的功能是:找出一维
整型数组元素中最大的值和它所在的下标,最大的
值和它所在的下标通过形参传回。数组元素中的值
已在主函数中赋予。
主函数中 x是数组名,n是 x 中的数据个数,max
存放最大值,index 存放最大值所在元素的下标。
请勿改动主函数 main和其他函数中的任何内容,
仅在函数 fun的花括号中填入所编写的若干语句。
#include
#include
#include
void fun ( int a[], int n, int *max, int *d )
{
}
main()
{
int i, x[20], max, index, n=10;
FILE *out;
for (i=0; i < n; i++)
{
x[i] = rand()%50;
printf("%4d", x[i]) ;
}
printf("\n");
fun( x, n , &max, &index);
printf("Max=%5d, Index=%4d\n", max, index);
out=fopen("out.dat", "w");
memcpy(x,
"3.141592653589793238462643383279", 32);
fun( x, 8 , &max, &index);
fprintf(out, "Max=%5d, Index=%4d", max,
index);
阿尔伯特教研组编 禁止传阅
8
fclose(out);
}
29) 请编写一个函数 fun,它的功能是:将 ss 所指
字符串中所有下标为奇数位置上的字母转换为大
写(若该位置上不是字母,则不转换)。
例如,若输入 abc4EFg,则应输出 aBc4EFg。
请勿改动主函数 main和其他函数中的任何内容,
仅在函数 fun的花括号中填入所编写的若干语句。
#include
#include
#include
void fun ( char *ss)
{
}
main( )
{
char tt[81];
FILE *out;
printf("\n Please enter an string within 80
characters:\n");
gets( tt );
printf("\n\nAfter changing, the string\n %s\n",
tt );
fun( tt );
printf( "\nbecomes \n %s\n", tt );
out=fopen("out.dat", "w");
strcpy(tt, "Please enter an string within 80
characters:");
fun( tt );
fprintf(out, "%s", tt );
fclose(out);
}
30) 下列给定程序中函数 fun的功能是:计算正整
数 num的各位上的数字之积。例如,若输入 252,
则输出应该是 20。若输入 202,则输出应该是 0。
请改正程序中的错误,使它能得出正确的结果。
注意:不要改动 main函数,不得增行或删行,也
不得更改程序的结构!
#define M 4
#include
fun (int a[][M])
{
}
main()
{
int arr[2][M]={5,8,3,45,76,4,12,82} ;
FILE *out;
printf("max=%d\n", fun(arr)) ;
out=fopen("out.dat", "w");
fprintf(out, "max=%d", fun(arr)) ;
fclose(out);
}
31) 请编写函数 fun,其功能是:将 s 所指字符串
中除了下标为偶数、同时 ASCII值也为偶数的字符
外,其余的全都删除;串中剩余字符所形成的一个
新串放在 t 所指的数组中。
例如,若 s 所指字符串中的内容为
ABCDEFG123456,其中字符 A的 ASCII码值为奇
数,因此应当删除;其中字符 B的 ASCII码值为偶
数,但在数组中的下标为奇数;因此也应当删除;
而字符 2 的 ASCII码值为偶数,所在数组中的下标
也为偶数,因此不应当删除,其他依此类推。最后
t 所指的数组中的内容应是 246。
请勿改动主函数 main和其他函数中的任何内容,
仅在函数 fun的花括号中填入所编写的若干语句。
#include
#include
#include
void fun(char *s, char t[])
{
}
main()
{
char s[100], t[100];
FILE *out;
printf("\nPlease enter string S:");
scanf("%s", s);
fun(s, t);
printf("\nThe result is : %s\n", t);
out=fopen("out.dat", "w");
strcpy(s, "Please enter string S:");
fun(s, t);
fprintf(out, "%s", t);
fclose(out);
}
32) 请编写函数 fun,其功能是:将 s 所指字符串
中除了下标为奇数、同时 ASCII值也为奇数的字符
之外,其余的所有字符都删除,串中剩余字符所形
成的一个新串放在 t 所指的数组中。
例如, 若s所指字符串中的内容为ABCDEFG12345,
其中字符 A的 ASCII码值虽为奇数, 但所在元素的
下标为偶数,因此必需删除;而字符 1 的 ASCII码
值为奇数,所在数组中的下标也为奇数,因此不应
当删除,其他依此类推。最后 t所指的数组中的内
容应是 135。
请勿改动主函数 main和其他函数中的任何内容,
仅在函数 fun的花括号中填入所编写的若干语句。
#include
#include
#include
void fun(char *s, char t[])
{
}
main()
{
char s[100], t[100];
FILE *out;
printf("\nPlease enter string S:");
scanf("%s", s);
fun(s, t);
printf("\nThe result is: %s\n", t);
out=fopen("out.dat", "w");
strcpy(s, "Please enter string S:");
fun(s, t);
fprintf(out, "%s", t);
fclose(out);
}
33) 假定输入的字符串中只包含字母和*号。请编
写函数 fun,它的功能是:使字符串中尾部的*号不
得多于 n个;若多于 n个,则删除多余的*号;若
少于或等于 n个,则什么也不做,字符串中间和前
面的*号不删除。
例如,字符串中的内容为
****A*BC*DEF*G*******, 若 n的值为 4, 删除后,
字符串中的内容则应当是****A*BC*DEF*G****;
若 n的值为 7,则字符串中的内容仍为
本文档为【2007年南开100题_编程题 二级C语言上机题库】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑,
图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。