Computer Science, asked by sahilss0410, 9 months ago

Write a program to get and print the array elements
Sample Input:
5
4 6 7 8 9
Sample Output:
4 6 7 8 9​

Answers

Answered by ymadhavachary
0

Answer:

#include <stdio.h>  

 

void  main()  

{  

   int arr[10];  

   int i;  

      printf("\n\nRead and Print elements of an array:\n");

      printf("-----------------------------------------\n");  

 

   printf("Input 10 elements in the array :\n");  

   for(i=0; i<10; i++)  

   {  

    printf("element - %d : ",i);

       scanf("%d", &arr[i]);  

   }  

 

   printf("\nElements in array are: ");  

   for(i=0; i<10; i++)  

   {  

       printf("%d  ", arr[i]);  

   }  

   printf("\n");

Explanation:

Similar questions