Create record of student details using structure

Record is collection of data items of different data types.In this program,a record is created using structure.Structure stud is created which stores student details such as roll no,name and marks.

#include < stdio.h >
#include < conio.h > 
#include < math.h>
#include < stdlib.h>

struct stud
{
	int roll;
	char name[15];
	int marks;
};

void main()
{
	struct stud a[50];
	int n,reply,sroll,option,i;	
	clrscr();
	do
	{
		printf("\n 1. Create records");
		printf("\n 2. Search record");
		printf("\n 3. exit");
		printf("\n\n Select proper option :");
		scanf("%d",&option);
		switch(option)
		{
			case 1 : // create
				printf("\nEnter n : ");
				scanf("%d",&n);
				read_data(a,n);
				break;			
			case 2 : // search
				printf("\nEnter sroll : ");
				scanf("%d",&sroll);
				reply = bin_search(a,n,sroll);
				if( reply == -1)
					printf("\n Not found");
				else
				{
					printf("\nRoll\tName\tMarks");
					printf("\n%d\t%s\t%d",a[reply].roll,a[reply].name,a[reply].marks);
				}
				break;
			case 3 : exit(0);
		} //swith
	}while(1);
} // main

int read_data(struct stud a[], int n)
{
	int i;
	printf("\nEnter %d records\n",n);
	for(i=0;i < n;i++)
	{
		printf("\nRoll : "); scanf("%d",&a[i].roll);
		printf("\nName : "); flushall(); scanf("%s",a[i].name);
		printf("\nMarks : "); scanf("%d",&a[i].marks);
	} // for
	return;
} // read data

int bin_search( struct stud a[], int n , int sroll)
{
	int l,h,m;
	int probe,gap;	
	l = 0;
	h = n-1;
	while( l < h )
	{
		gap = sqrt(h-l+1);		
		probe = l + ( h - l ) * ( (sroll - a[l].roll ) / ( a[h].roll - a[l].roll ) );
		m = min(h-gap, max(probe,l+gap));		
		if( sroll > a[m].roll )
			l = m+1;
		else if ( sroll < a[m].roll )
			h = m-1;
		else
			return(m);
	} // while
	if( a[l].roll == sroll)
		return(l);
	else
	if( a[h].roll == sroll)
		return(h);
	else
		return(-1);
}