浏览代码

add l8.c(demo)

Stepan 2 月之前
父节点
当前提交
508468e0be
共有 1 个文件被更改,包括 13 次插入0 次删除
  1. 13 0
      c/l8.c

+ 13 - 0
c/l8.c

@@ -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);
+}