Answer to Question #275171 in C for Pragadeesh

Question #275171

In a college the faculty member wants find a student with help of their register number, now he wants to compare the register no. one by one and to find the corresponding person. Use the suitable searching technique.

1
Expert's answer
2021-12-03T14:35:38-0500
string *students;

int find(string name){
  int idx=-1;
  for(int i=0;i<sizeof(students)/sizeof(students[0]);i++)
    if(name==students[i]) idx=i;
  return idx;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS