From a3f3c69b447e32a8461027e2ef6c3ed139be17dd Mon Sep 17 00:00:00 2001 From: Sayan Banerjee <52275052+exit-null@users.noreply.github.com> Date: Fri, 2 Oct 2020 01:37:26 +0530 Subject: [PATCH 1/3] Update Hello world --- Hello world | 1 + 1 file changed, 1 insertion(+) diff --git a/Hello world b/Hello world index 3b7617c..0bfc88b 100644 --- a/Hello world +++ b/Hello world @@ -1,6 +1,7 @@ #include int main() { + //Print function to print hello world printf("Hello, World!"); return 0; } From 79ab0656c3858ceb9064298fd21f3e73a7ad1f90 Mon Sep 17 00:00:00 2001 From: Sayan Banerjee <52275052+exit-null@users.noreply.github.com> Date: Fri, 2 Oct 2020 01:40:01 +0530 Subject: [PATCH 2/3] Update frequency of a character --- frequency of a character | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frequency of a character b/frequency of a character index ad51eba..fabb19f 100644 --- a/frequency of a character +++ b/frequency of a character @@ -4,11 +4,15 @@ int main() char str[1000], ch; int i, frequency = 0; print("Enter a string: "); + //Main string gets(str); printf("Enter a character to find the frequency: "); + //Character whose frequency we want to get scanf("%c",&ch); for(i = 0; str[i] != '\0'; ++i) { + //Whenever we are getting the character ch in the string + //we are incrementing the frequency if(ch == str[i]) ++frequency; } From 2bcda15cbcb57c81ec966fcdbbf828b16434cf96 Mon Sep 17 00:00:00 2001 From: Sayan Banerjee <52275052+exit-null@users.noreply.github.com> Date: Fri, 2 Oct 2020 01:43:42 +0530 Subject: [PATCH 3/3] Update length of a string --- length of a string | 3 +++ 1 file changed, 3 insertions(+) diff --git a/length of a string b/length of a string index 810e5cd..c605ef5 100644 --- a/length of a string +++ b/length of a string @@ -4,7 +4,10 @@ int main() char s[1000]; int i; printf("Enter a string: "); + //Our string scanf("%s", s) + //With the help of this loop we are able to count the number of characters in the string + //untill we reach the end for(i = 0; s[i] != '\0'; ++i) printf("Length of string: %d", i);