Write a program to find the location of largest no in an array using goto statement.

#include<stdio.h>

#include<conio.h>

int main()

{

int K = 0 , max , loc = 0 ;

int data[ 5 ] = { 8 , 15 , 50 , 37 , 21 } ;

max = data[ 0 ] ;

S :

K = K + 1 ;

if( K > 5 )

{

printf( “loc=%d\tmax=%d” , loc , max ) ;

goto h ;

}

if( max < data[ K ] )

{

loc = K ;

max = data[ K ] ;

}

goto S ;

h :

getch() ;

return 0 ;

}