Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b1be720

Browse files
add example of in C
1 parent f6851da commit b1be720

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

‎a.out‎

0 Bytes
Binary file not shown.

‎strings.c‎

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
// puts(change);
2929
// return 0;
3030
// }
31-
// 🔳 🔲 => add <string.h> || strlen
31+
// 🔳 🔲 => add <string.h> |🌟| strlen
3232
// #include <stdio.h>
3333
// #include <string.h>
3434
// int main(){
@@ -38,19 +38,32 @@
3838
// return 0;
3939
// }
4040

41-
// 🔳 🔲 => add <string.h> || strlen
4241

42+
43+
// 🔳 🔲 => add <string.h> |🌟| strcpy
44+
// #include <stdio.h>
45+
// #include <string.h>
46+
// int main(){
47+
// char oldStr[] = "Oldstr";
48+
// char newStr[] = "NewStr";
49+
// strcpy(newStr , oldStr);
50+
// printf(newStr);
51+
// return 0;
52+
// }
53+
54+
// 🔳 🔲 => add <string.h> |🌟| strcat
4355
#include <stdio.h>
4456
#include <string.h>
4557
int main(){
46-
char oldStr[] = "Oldstr";
47-
char newStr[] = "NewStr";
48-
strcpy(newStr , oldStr);
49-
printf(newStr);
50-
return 0;
58+
char name1[20] = "Programming ";
59+
char name2[] = "language ";
60+
strcat(name1 , name2);
61+
printf(name1);
62+
return 0;
5163
}
5264

5365

66+
5467
// #include <stdio.h>
5568
// int main(){
5669
// return 0;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /