Back to Home & C
//Program to declare an Array and initialize value to it
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int a[5]={20,30,10,40,60};
int i;
for(i=0;i<5;i++)
{
printf("\n%d\n",a[i]);
}
getch();
}
---------------------------------------------------------
Output
20
30
10
40
60
===============================================
//Program to declare an Array and initialize value to it
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int a[5]={20,30,10,40,60};
int i;
for(i=0;i<5;i++)
{
printf("\n%d\n",a[i]);
}
getch();
}
---------------------------------------------------------
Output
20
30
10
40
60
===============================================
No comments:
Post a Comment