Question: if all the following nodes are integer nodes, and the print function prints the list from the beginning What is the output of the following
if all the following nodes are integer nodes, and the print function prints the list from the beginning
What is the output of the following code
node pnew node;
node headnew nodepdata;
node ptrhead;
forint i;i;i
pnextnew nodeipdata;
ppnext;
ptrnextnew nodeiheaddata;
ptrptrnext;
ptrdatapdataheaddata;
pnexthead;
printp;
Question Answer
a
None of these
b
c
d
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
