(15 Points)What is the output of the following program. Trace and display output int search(int,struet studinfo allstil.
Posted: Wed Apr 27, 2022 3:51 pm
(15 Points)What is the output of the following program. Trace and display output int search(int,struet studinfo allstil.int.in);// prototype struct studinfo Int stNr : char name|15|: int grade; int main() // Initialized sorted base on student number struct studInfo allSt[10] (434, "BEKIR" 75. 678,"CEMAL".65. 712." AHMET".48 841,"EMRAH 67, 855,"SEVGI" 78. 891."CANAN".88. 912."MERT",48 941,"SEMRA".94. 965,"GULER",38, 977,"MEHDI.83) int kent-10. given = 941: k=search (given, allst, 0, ent): if (>printf("Find Position -%d %%d\n", k. allStk.name, allStikerade) else printf("%s Not Found". given) return 0; }/"Main ends/ int search(int given, struct studinfo allSt[], int low, int high) ! int mid: while(low <=high) mid - (low + high) / 2: if (given--allSt[mid.stNr) return mid; else if (given > allstmid.stNr) printf("Low=%d Mid="%d\n", low, mid); low-mid+1; 1 else { printf("High=%d Mid=%d\n", high, mid); high-mid - 1; ) return -1; 2 OUTPUT OF THE PROGRAM