Implement a function that returns the 5th element from the
end in a singly linked list of integers in one pass.
Answer Posted / vrushali
In whatever the case , we require to know the no of nodes in
the LL. As there is no way to know the total no of nodes
without traversing the LL.
Please coorect me if I am wrong.
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
What is 1f in c?
What is optimization in c?
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
What is memory leak in c?
What is %d used for?
how can I convert a string to a number?
Can a variable be both const and volatile?
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon
write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);
What is the difference between far and near ?
what do you mean by inline function in C?
What is static and auto variables in c?
How does placing some code lines between the comment symbol help in debugging the code?
write an interactive C program that will encode or decode a line of text.To encode a line of text,proceed as follows. 1.convert each character,including blank spaces,to its ASCII equivalent. 2.Generate a positive random integer.add this integer to the ASCII equivalent of each character.The same random integer will be used for the entire line of text. 3.Suppose that N1 represents the lowest permissible value in the ASCII code,and N2 represents the highest permissible value.If the number obtained in step 2 above(i.e.,the original ASCII equivalent plus the random integer)exceeds N2,then subtract the largest possible multiple of N2 from this number,and add the remainder to N1.Hence the encoded number will always fall between N1 and N2,and will therefore always represent some ASCII character. 4.Dislay the characters that correspond to the encoded ASCII values. The procedure is reversed when decoding a line of text.Be certain,however,that the same random number is used in decodingas was used in encoding.
What does do in c?