Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Create a program to count the number of words in a hardcoded string.

Easy

Problem Statement

Create a program to count the number of words in a hardcoded string.

Sample Input

String: "Hello World, welcome to C#"

Sample Output

Word Count: 5

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
using System; class WordCount { static void Main() { // Count the number of words in the string } }
Log in or sign up to run or submit your code.Log inSign up
Input
String: "Hello World, welcome to C#"
Expected Output
Word Count: 5