Previous Next
0 / 8
Module DEMO-32-55DEMO-C-32

Character Echo

DEMO-C-32 โ€ข Programming in C

Browser-only practice

Problem Statement

Write a program that reads a single character from the user and prints it back to the screen.

This is your first step in learning input/output operations in C programming. You'll use scanf to read the character and printf to display it.

Example: If the user enters 'A', your program should output 'A'.

Constraints

The input will be a printable ASCII character (ASCII values 32-126).

Input Format

A single character on a line by itself.

Output Format

The same character that was input, followed by a newline character.

Sample Testcases

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

Sample #1
Public sample
A
A
Basic test case with an uppercase letter.

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