How to initialize array in C

#include<stdio.h>
#include<conio.h>
void main()
{
int array[10]; //an array of 10 same data type elements
printf("Enter 10 elements : ");
for(int i=0;i<10;i++)
{
scanf("%d",&array[i]);
}
printf("10 elements you enterd are: ");
for(int i=0;i<10;i++)
{
printf("%d   ",array[i]);
}
getch();
}


Popular posts from this blog

Shutdown Pc

Ellipse using OpenGl

String Comparisons