Find the middle node in the linked list??
(Note:Do not use for loop, count and count/2)
Answer Posted / santhoshr
It wont work exactly if the no of nodes is not given!!! So
better answer is having two pointers from first itslf.
And like this , another question is there,
to find the pth node from last!! That too haas the same logic!!!
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Is main is user defined function?
program for reversing a selected line word by word when multiple lines are given without using strrev
Write a program to use switch statement.
i got 75% in all semester am i eligible for your company
What is the main difference between calloc () and malloc ()?
What is wild pointer in c with example?
Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
What are the restrictions of a modulus operator?
Why enum is used in c?
What are multibyte characters?
what are the 10 different models of writing an addition program in C language?
What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?
What does the characters “r” and “w” mean when writing programs that will make use of files?
What is data structure in c programming?