Đăng nhập để hỏi chi tiết


Giải bài tập C về con trỏ
Giúp em với ạ
Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
\begin{array}{c} \color{#db1616}{\texttt{#khoadang09}} \end{array}
`@`$\texttt{C: }$
#include <stdio.h>
int main(){
char a[100], b[100]; //string
char *i = a, *j = b; //pointer
//input string, data ending with a space
scanf("%s",a);scanf("%s",b);
//processing
while(*i != '\0'){
i++;
}
while(*j != '\0'){
*i = *j;
i++; j++;
}
*i = '\0';
//output
printf("%s",a);
}Hãy giúp mọi người biết câu trả lời này thế nào?
Bảng tin