-
Guess it's a certain eggache teacher asking for a pointer or an array of pointers, right?
It's changed a lot.,The landlord looks at it.。
#include ""
#define empty 0
void find_all(char *,char**,char);
void main()
int i;
char string="oh! day after day.";
char * ptr[30];
printf("%s",string);
find_all(string, ptr, 'd');
for(i=0;ptr[i]!=empty;i++)ptr[i]='*';
printf("%s",string);
void find_all(char *s,char** ptr, char d)
int i,j;
for (i=0,j=0;*s!='\0'&&j<30;s++)if(*s==d)
ptr[j++]=s;
ptr[j] = empty;
-
void good 1(int f,int b){} can be ignored.
Your function is written incorrectly, and your function arguments are passed in a value transfer mode and no value is returned, so your function is an invalid function. No matter how you use it, it won't affect the outside variables. (At most, there is a delay of a few microseconds.)
-
int *g,*k; good_1(*g,*k);This is wrong、、When you pass the argument to the form argument, the data type must always be 、、、 to think that the address is being passed、、、
-
It's impossible to get the effect you want with value passing.
-
You have defined an array of character pointers, and each element in the array is a pointer variable of type char, so the biggest problem with this program should be.
p+i) = a;
Replace with *p[i] = a;
That's the main problem. Hope it helps.
-
p is a pointer to an array, so move 256 elements at a time, so wrong.
Declaring *p[256] is an array of pointers, and there are no syntax errors.
-
The result of the first problem is indeterminate because p is a p and the initial values k, i are not given
p[3]ababc, g3
-
14 Second, are you sure you didn't make a mistake? If it's *p+1, it's 13, 14, 13
m,kc=c+3
ababc,g3
-
14,1
m,k in the third question you didn't write the option, give a possible *p='d'+1 or c[1]='e';
ababc,g3
-
The outcome of the first question is uncertain.
The result of the second question is m,k;
The result of the third question is ababc, g, 3
-
for(n=0;n<6;n++,c++,d++)c=*d;
At the time of the above statement, the value of c has been moved backwards (C++ sentence) for a total of 6 times.
So to printf("%s",c);c, c is no longer equal to a.
Program debugging is the process of testing the compiled program by manual or compiling the program to correct syntax errors and logical errors before putting it into actual operation. This is an indispensable step to ensure the correctness of computer information systems. After the computer program is written, it must be sent to the computer for testing. >>>More
1, the woman's eight characters are 癸ugly Yichou 壬申 癸卯 Now Wuchen Universiade; The man's eight characters are Jiayin Jiaxu Yiyou Gengchen Now Bingzi is lucky, and the time is wrong upstairs. >>>More
C language does not round, if you want to round it, such as a to keep two decimal places: >>>More
Pick up tutorials online. I can't tell. `
1.Cleanser-toner-eye cream, essence-lotion, cream-sunscreen-followed steps such as applying foundation and makeup. >>>More