Combining two Singly connected Linked List : Need Help

0

Write a 'C' Function to combine two singly connected linked lists in the following manner. Suppose one list is "L" which can be given by L=(l0,l1,.....,lm) and the other list is "M" where "M" can be expressed as M=(m0,m1,......,mn) where each li,mi represents one node in the respective lists. For simplicity, you may assume that each node contains an integer as the data. After combining them the combined list should be (l0,m0,l1,m1,.....,). Do not Use any additional node for writing the Function...

Please give some idea about Implementing this Function...!!

If you know how to implement a normal linked list, this one should be no problem at all. What is the challenge?? Start with a node from L, l->next is the address of a node from M. M-> next is address of next node of L. So on and so forth.

I made a prime number finder, it finds the nearest prime that is above and below any integer (Does not work that well with giant numbers.)
Made this in cpp.sh
Why would I need the x=y+1-1;?
x=y; just doesnt seem to work
Why is this?
And I know my coding ...

write a C++ program which take inputs from the user/keyboard and calculate his ZAKAT.
get the input from user may include
-Bank balance
-Amount invested in business
-Amount given to other business partners as loan
and
-Amount payable to others

there are five tables (personTb, addressTb,churchTb) each holds data pertinent to an individual; (personAddress,personChurch) each hold the primary key for the person table and corresponding table IE personAddress holds primary key for addressTb.

both snippets work, my question is; Is my join correctly formatted?