From 64bea6c3d6b058762d670876fced511c8ca80f2d Mon Sep 17 00:00:00 2001 From: m4shhood <71730445+m4shhood@users.noreply.github.com> Date: Mon, 5 Oct 2020 20:02:23 +0530 Subject: [PATCH 1/5] Update Hello world --- Hello world | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Hello world b/Hello world index 3b7617c..9decf40 100644 --- a/Hello world +++ b/Hello world @@ -1,4 +1,4 @@ -#include +#include int main() { printf("Hello, World!"); From ae0e05d369970aac6868bdf9435ac5cfc3065093 Mon Sep 17 00:00:00 2001 From: m4shhood <71730445+m4shhood@users.noreply.github.com> Date: Mon, 5 Oct 2020 20:06:25 +0530 Subject: [PATCH 2/5] update --- frequency of a character | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frequency of a character b/frequency of a character index b5334ac..96a55a9 100644 --- a/frequency of a character +++ b/frequency of a character @@ -1,7 +1,8 @@ +#include int main() { char str[1000], ch - int i, frequency = 0 + int i, frequency = 0; print("Enter a string: "); gets(str); printf("Enter a character to find the frequency: "); From 0199ecd0a8e0f32852359dfdd654d61f0376e22f Mon Sep 17 00:00:00 2001 From: m4shhood <71730445+m4shhood@users.noreply.github.com> Date: Mon, 5 Oct 2020 20:08:23 +0530 Subject: [PATCH 3/5] update --- Hello world | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Hello world b/Hello world index 9decf40..87489ab 100644 --- a/Hello world +++ b/Hello world @@ -1,4 +1,4 @@ -#include +#include int main() { printf("Hello, World!"); From e12b3473d6e516ebdaa0e3905fab6f1dfad0c936 Mon Sep 17 00:00:00 2001 From: m4shhood <71730445+m4shhood@users.noreply.github.com> Date: Mon, 5 Oct 2020 20:10:08 +0530 Subject: [PATCH 4/5] updated --- length of a string | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/length of a string b/length of a string index 33cd513..810e5cd 100644 --- a/length of a string +++ b/length of a string @@ -3,8 +3,8 @@ int main() { char s[1000]; int i; - print("Enter a string: ") - scan("%s", s) + printf("Enter a string: "); + scanf("%s", s) for(i = 0; s[i] != '\0'; ++i) printf("Length of string: %d", i); From dc93694904acdedfae46585ef528b31c6ecf24ab Mon Sep 17 00:00:00 2001 From: m4shhood <71730445+m4shhood@users.noreply.github.com> Date: Mon, 5 Oct 2020 20:11:49 +0530 Subject: [PATCH 5/5] updated --- pgm to read a line | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pgm to read a line b/pgm to read a line index 174d15b..e59935a 100644 --- a/pgm to read a line +++ b/pgm to read a line @@ -2,12 +2,12 @@ #include int main() { - char c[1000] + char c[1000]; FILE *fptr; if ((fptr = fopen("program.txt", "r")) == NULL) { - print("Error! opening file") - exit(1) + print("Error! opening file"); + exit(1); } scanf(fptr,"%[^\n]", c);