Skip to content

Latest commit

 

History

History
7 lines (7 loc) · 445 Bytes

File metadata and controls

7 lines (7 loc) · 445 Bytes

Length of string without using function in C

  • Find length without using function strlen() in C.
  1. The program gets a string from user.
  2. The counter is initially set to zero, when string is entered one by one the counter is incremented by 1.
  3. When string is entered completely and hit enter the compiler adds '\0' at the end of string.
  4. Counter keeps incrementing until '\0' is not entered.
  5. Counter is printed at the end of program.