Basic Programming of c 




List of Experiments 


Arrays And Strings

Write a program to enter the elements in one dimensional array


-----------------------------------------------------------------------------------

#include<stdio.h>

#include<conio.h>

void main()

{

int a[5],i;

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

{

printf("Enter the value");

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

}

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

{

printf("%d \n",a[i]);

}

getch();

}


-----------------------------------------------------------------------------------


Result



Copy code from here:-