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
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 |
How do I read the arrow keys? What about function keys?
What is infinite loop?
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
who will call your main function in c under linux?
how to count no of words,characters,lines in a paragraph.
How can I find out how much memory is available?
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.
What is 'bus error'?
What is action and transformation in spark?
What is structure pointer in c?
What are the different types of data structures in c?
Who had beaten up hooligan "CHAKULI" in his early college days?