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 228bf43

Browse files
add example of in C
1 parent b1be720 commit 228bf43

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

‎a.out‎

0 Bytes
Binary file not shown.

‎strings.c‎

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,30 @@
5151
// return 0;
5252
// }
5353

54-
// 🔳 🔲 => add <string.h> |🌟| strcat
54+
// // 🔳 🔲 => add <string.h> |🌟| strcat
55+
// #include <stdio.h>
56+
// #include <string.h>
57+
// int main(){
58+
// char name1[20] = "Programming ";
59+
// char name2[] = "language ";
60+
// strcat(name1 , name2);
61+
// printf(name1);
62+
// return 0;
63+
// }
64+
65+
66+
// 🔳 🔲 => add <string.h> |🌟| strcmp
67+
68+
69+
5570
#include <stdio.h>
5671
#include <string.h>
5772
int main(){
58-
char name1[20] = "Programming ";
59-
char name2[] = "language ";
60-
strcat(name1 , name2);
61-
printf(name1);
62-
return 0;
73+
char name1 [] = "Coder";
74+
char name2[] = "boy";
75+
printf("%d\n", strcmp(name2 , name1));
76+
77+
return 0;
6378
}
6479

6580

0 commit comments

Comments
(0)

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