Sunday, 17 April 2016

Print array without using loop in c language

Q . Write a program to print an array value without using loop.

#include<stdio.h>
#include<conio.h>
/*  Girfa : student Help
    for more question visit: http://girfahelp.blogspot.in/2012/09/some-program-of-c-language.html
*/
void main()
{ int ar[5],i=0;
clrscr();
goinput:
if(i<5)
{
printf("Enter %d 'st number>> ",i+1);
scanf("%d",&ar[i]);
i++;
goto goinput;
}


i=0;
goif:
if(i<5)
{
printf("\t%d",ar[i]);
i++;
goto goif;
}

getch();
}

More Question

No comments:

Post a Comment