التالي
0 / 21
الوحدة النمطية DEMO-32-106DEMO-C-32

Print Array Elements

DEMO-C-32 • Programming in C

Browser-only practice

بيان المشكلة

Write a C program that reads an integer n followed by n integers and stores them in a 1D array. Then, the program should print all the elements of the array separated by a single space.

Example

Input:

5 10 20 30 40 50

Output:

10 20 30 40 50

قيود

1 <= n <= 100

تنسيق الإدخال

An integer n, followed by n integers.

تنسيق الإخراج

Space-separated integers.

حالات اختبار نموذجية

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

العينة رقم 1
عينة ظاهرة
5
1 2 3 4 5
1 2 3 4 5
Basic case with 5 sequential elements.
العينة رقم 2
عينة ظاهرة
1
99
99
Edge case: Array with a single element.
العينة رقم 3
عينة ظاهرة
3
-1 -2 -3
-1 -2 -3
Case with negative numbers.

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
إعدادات المحرر