Next
0 / 5
Module DEMO-32-107DEMO-C-32

Print Array Elements

DEMO-C-32 โ€ข Programming in C

Browser-only practice

Problem Statement

Write a function printArray that takes an array and its size as arguments and prints all elements separated by a single space.

Constraints

1 <= n <= 100

Input Format

Integer n, then n integers.

Output Format

Space separated integers.

Sample Testcases

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

Sample #1
Public sample
5
1 2 3 4 5
1 2 3 4 5
Sample #2
Public sample
1
99
99
Sample #3
Public sample
3
-1 -2 -3
-1 -2 -3

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