Can you please anwser these c++ questions for me 1) If NodeTypePtr is defined to
ID: 3880432 • Letter: C
Question
Can you please anwser these c++ questions for me
1) If NodeTypePtr is defined to be a pointer type to a node in a linked list, then the declaration:-
NodeTypePtr head;
d)
2)
If you want to declare a node type struct and typedef a pointer type for that node, in which order must you make these declarations?
you cannot do both of them in the same program
3)
If you need to insert an element in the front of a list with N nodes (and move the other elements back one place), how many nodes do you have to move?
allocates a linked list
3
a) allocates memory for the node that head will point toExplanation / Answer
1) allocates only the memory for a pointer variable
2) first the node, then the typedef
Since we need to have Typedef
3) 0, We dont have to shift all or any elements. Since it is just adding a pointer to add nodes
Thanks, let me know if there is any concern.