add l8.c(demo)
This commit is contained in:
parent
eb54488f64
commit
508468e0be
1 changed files with 13 additions and 0 deletions
13
c/l8.c
Normal file
13
c/l8.c
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
int main() {
|
||||
char x[100] = "hello";
|
||||
x[0] = 'H';
|
||||
x[1] = 'a';
|
||||
int index = 2;
|
||||
strcpy(&x[index], &x[index + 1]);
|
||||
printf("%s\n", x);
|
||||
int len = strlen(x);
|
||||
printf("%d\n", len);
|
||||
}
|
||||
Loading…
Reference in a new issue