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

Replace First Vowel

DEMO-C-32 โ€ข Programming in C

Browser-only practice

Problem Statement

Write a program that identifies the first vowel in a string and replaces it with a hyphen ('-'). If no vowels are found, make no changes.

Constraints

Max string length: 100

Input Format

Input:

String S

Output Format

Output:

Modified

Sample Testcases

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

Sample #1
Public sample
Router?3
R-uter?3
Performing the replacement on Router?3 results in R-uter?3.
Sample #2
Public sample
Orange!2
-range!2
Performing the replacement on Orange!2 results in -range!2.
Sample #3
Public sample
Record?5
R-cord?5
Performing the replacement on Record?5 results in R-cord?5.
Sample #4
Public sample
Buffer#1
B-ffer#1
Performing the replacement on Buffer#1 results in B-ffer#1.

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