Previous Next
0 / 18
Module DEMO-32-90DEMO-C-32

Max Char

DEMO-C-32 โ€ข Programming in C

Browser-only practice

Problem Statement

Write a function char maxChar(char a, char b) that returns the character with the higher ASCII value.

Constraints

ASCII.

Input Format

Two chars.

Output Format

Max char.

Sample Testcases

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

Sample #1
Public sample
a z
z
z > a.
Sample #2
Public sample
x x
x
Equal.
Sample #3
Public sample
G J
J
J > G.
Sample #4
Public sample
! ~
~
~ has high ASCII.

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