1) There is a singing competition for children going to be
conducted at a local club. Parents have been asked to arrive
at least an hour before and register their children’s names
with the Program Manager. Whenever a participant registers,
the Program Manager has to position the name of the person
in a list in alphabet order. Write a program to help the
Program Manager do this by placing the name in the right
place each time the Program Manger enters a name.
2) the Event Manager
has to send participants to the stage to perform in the
order in which they registered.
Write a program that will help the Event Manager know who to
call to the stage to
perform.
The Logic should be in Data Structures



1) There is a singing competition for children going to be conducted at a local club. Parents have ..

Answer / Raju Chaudhary

```cnint getNextParticipantIndex(struct participant **list, int count)n{n if (count == 0) return -1;nn return 0;n}nnvoid callToStage(struct participant **list, int count)n{n int next = getNextParticipantIndex(list, count);nn if (next >= 0 && next < count)n {n printf("Calling %s to the stage.
", list[next]->name);nn memmove(&list[next], &list[next+1], sizeof(struct participant)*(count-next-1));n (*count)--;n}n}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

How do I read the arrow keys? What about function keys?

1 Answers  


What is infinite loop?

1 Answers  


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

1 Answers  


who will call your main function in c under linux?

2 Answers  


how to count no of words,characters,lines in a paragraph.

1 Answers  


How can I find out how much memory is available?

1 Answers   Persistent,


write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.

1 Answers   Subex,


What is 'bus error'?

1 Answers  


What is action and transformation in spark?

1 Answers  


What is structure pointer in c?

1 Answers  


What are the different types of data structures in c?

1 Answers  


Who had beaten up hooligan "CHAKULI" in his early college days?

1 Answers  


Categories