Program to implement 1-D Array - TechnoHindi.Org

Latest

Saturday, August 8, 2020

Program to implement 1-D Array



#include <stdio.h>
#include <conio.h>
void main()

int arr[5], a; 
clrscr(); 

printf ("Enter 5 numbers for Array."); 

for (a=0;a<5;a++) 
scanf ("%d", &array[a]); 
printf ("The elements stored in Array are: "); 

for (a=0;a<=5;a++) 
printf ("The elements which is stored at position %d is %d", a, arr[a]); 

getch(); 
  1. Output :-

No comments:

Post a Comment