Next
0 / 23
Module DEMO-32-108DEMO-C-32

String Length

DEMO-C-32 โ€ข Programming in C

Browser-only practice

Problem Statement

Write a program that takes a single string as input and counts the number of characters in it using a loop.

Constraints

Max string length: 100

Input Format

Input:

String S

Output Format

Output:

Length

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
Object?3
8
The string Object?3 has 8 characters.
Sample #2
Public sample
Design!2
8
The string Design!2 has 8 characters.
Sample #3
Public sample
Binary!9
8
The string Binary!9 has 8 characters.
Sample #4
Public sample
Algorithm?3
11
The string Algorithm?3 has 11 characters.

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings