Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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;

a) allocates memory for the node that head will point to
b) automatically makes head->link point to NULL
c) allocates only the memory for a pointer variable

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?

a) first the node pointer, then the node, since the node has a pointer in it
b) first the node, then the typedef
c) it doesn't matter which order you do them in

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?

0
1
N-1
N

allocates a linked list

3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Theory Icdt 97 6th International Conference Delphi Greece January 8 10 1997 Proceedings Lncs 1186

Authors: Foto N. Afrati ,Phokion G. Kolaitis

1st Edition

3540622225, 978-3540622222

More Books

Students also viewed these Databases questions