Find Length of String
C++
Easy
4 views
Problem Description
Count total characters in a string without using library function.
Real Life: Like counting letters in your name.
Step-by-Step Logic:
1. Start counter from 0
2. Loop through each character
3. Stop when you reach null character ''
4. Return count
Official Solution
void string_q1_length() {
string text = "Hello World";
int length = 0;
for(int i = 0; text[i] != '