早教吧作业答案频道 -->其他-->
redefinition;differentbasictypes以下程序在Vc6.0编译时出了问题#include"stdio.h"#include"string.h"main(){charstr[]="cdalb";abc(str);puts(str);}voidabc(char*p){inti,j;for(i=j=0;*(p+i)!='\0';i++)\x05if(*(p+i)>='d')\x05{*(p+j)=*(p+i)
题目详情
redefinition; different basic types
以下程序在Vc6.0编译时出了问题
#include"stdio.h"
#include"string.h"
main()
{
char str[]="cdalb";
abc(str);
puts(str);
}
void abc(char *p)
{
int i,j;
for(i=j=0;*(p+i)!='\0';i++)
\x05 if(*(p+i)>='d')
\x05 {*(p+j)=*(p+i);j++;}
*(p+j)='\0';
}
请问代码哪里出现了问题?
以下程序在Vc6.0编译时出了问题
#include"stdio.h"
#include"string.h"
main()
{
char str[]="cdalb";
abc(str);
puts(str);
}
void abc(char *p)
{
int i,j;
for(i=j=0;*(p+i)!='\0';i++)
\x05 if(*(p+i)>='d')
\x05 {*(p+j)=*(p+i);j++;}
*(p+j)='\0';
}
请问代码哪里出现了问题?
▼优质解答
答案和解析
重新定义;不同的基本类型
看了redefinition;di...的网友还看了以下:
可以参考的公式是:s[1]=a[1];s[n]=s[n-1]>=0?s[n-1]+a[n]:a[n 2020-05-14 …
在等差数列an中,有下述结论:若a1+a2+……+a50=s,a(n-49)+a(n-48)+…… 2020-05-14 …
已知字母组合成英语单词1、e e t t i n h r 2、e e r a t w h 3、o 2020-05-14 …
PI的 初始值为什么是pi=1#includemain(){int s;float n,t,pi; 2020-05-16 …
求纠错!输入整数 m 和正整数 n ,按下列公式计算 s输入整数 m 和正整数 n ,按下列公式计 2020-05-17 …
求用以下类似程序编一个可以计算括号的计算器#include#definesmax10#define 2020-05-20 …
c++语句四边形的面积周长#include"stdio.h"main(){chars,l,a,b; 2020-06-04 …
写单词,这些单词打乱顺序了!:1.d,f,e,n,i,f,e,r,t,()2.g,h,o,e,t, 2020-07-26 …
这是两个大数相加请帮忙改成两个大数相减#include#includeusingnamespaces 2020-11-23 …
rsa算法问题26个字母对应1—26,s对应的就是19,t对应的就是20,对其进行加密,设n=33p 2021-02-04 …