Walk Lightly on this PLANET and yet leave such a FOOTPRINT that cannot be erased for thousands of Years..!!!
Visit Codstech for Cyber Security related Posts !

Visitors

Friday, February 11, 2011

C16 : Array Declaration

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
===============================================
Back to Home   &  C

No comments: