Declares a one-dimensional array of five integers.

0

OR Download for turbo c++

Please Wait, Files are Loading...

Explanation of the Array Input and Output Program

This program is designed to take 5 integers as input from the user and then display all the values. It stores the numbers inside an integer array of size 5 and prints them one by one.

The program first asks the user to enter five values. Each value is intended to be stored in the array, and after the input is complete, the program displays all the elements. The screen waits for a key press at the end (Turbo C functionality).

What the Program Does

  • Prompts the user to enter 5 integers.
  • Stores the values in an array named ar[5].
  • Prints all the elements of the array one by one.
  • Uses getch() to pause the screen on Turbo C/C++.

Example Input

1 2 3 4 5

Example Output

The elements of the array ar[5]
0  0  2045357936  31280  0

Summary: The program takes five numbers from the user, stores them in an array, and prints them on the screen.

Tags

Post a Comment

0Comments

Post a Comment (0)