Program to access and print an array of 5 elements.
#include <stdio.h>
#include <conio.h>
void main()
{
int num[5], a;
clrscr();
printf ("Enter the elements: \n");
for ( a=0;a<5;a++ )
{
scanf ("%d", &num[a]);
}
printf ("The elements are: \n");
for (a=0;a<5;a++)
{
printf ("%d\t", numb[a]);
}
getch();
}
#include <stdio.h>
#include <conio.h>
void main()
{
int num[5], a;
clrscr();
printf ("Enter the elements: \n");
for ( a=0;a<5;a++ )
{
scanf ("%d", &num[a]);
}
printf ("The elements are: \n");
for (a=0;a<5;a++)
{
printf ("%d\t", numb[a]);
}
getch();
}