pgm to find middle element of linklist(in efficent manner)
Answer Posted / sharan
NODE display_middle(NODE first)
{
int count = 0;
NODE temp,mid;
for ( temp = mid = first, count=0; temp ; temp = temp ->
link,count++)
{
if ( count % 2 )
{
mid = mid -> link;
}
}
return mid;
}
Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
Why is c known as a mother language?
How can you read a directory in a C program?
How can I dynamically allocate arrays?
What is function prototype in c with example?
What is the symbol indicated the c-preprocessor?
What is the process of writing the null pointer?
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
What is string function in c?
Write a program to reverse a given number in c?
How can I implement a delay, or time a users response, with sub-second resolution?
please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics
what does static variable mean?
Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.
What extern c means?
What does sizeof function do?