MCPcopy Create free account
hub / github.com/CodeWithHarry/The-Ultimate-C-Programming-Course / main

Function main

Chapter 8/05_string_functions.c:4–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include <string.h>
3
4int main()
5{
6 char st[] = "Harry";
7 char s1[56] = "Harry";
8 char s2[56] = " bhai";
9
10 // printf("%d", strlen(st));
11 char target[30];
12 strcpy(target, st); // target now contains "Harry"
13 // printf("%s %s", st, target);
14
15 strcat(s1, s2); // s1 now contains "helloharry" <no space in between>
16 // printf("%s", s1);
17
18 int a = strcmp("deep", "joke"); // DJ is negative
19 printf("%d", a);
20
21 return 0;
22}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected