From 20c4a33fb807c1440e0cf739733d1c5ebef14936 Mon Sep 17 00:00:00 2001 From: Aswin Prasad <72518466+retr0-h0rse@users.noreply.github.com> Date: Sun, 11 Oct 2020 23:04:34 +0530 Subject: [PATCH] Update length of a string --- 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..2c20b62 100644 --- a/length of a string +++ b/length of a string @@ -3,9 +3,9 @@ int main() { char s[1000]; int i; - print("Enter a string: ") + print("Enter your string: ") scan("%s", s) - for(i = 0; s[i] != '\0'; ++i) + for(i = 0; s[i] != '\0'; i++) printf("Length of string: %d", i); }