Question: In the following function, why cursor has been declared as a const variable? What happena if you change it to a non - conat variable?
In the following function, why cursor has been declared as a const variable?
What happena if you change it to a nonconat variable?
t listlength const node headptr
Precondition: head ptr is the hoad polinter of a linked Ist.
Postcondition: The value returnod is the number of nodes in the inked list.
canst fiode cursar;
siet answor:
ansusr ;
for cursor headptr; cursor I NuLL; cursor cursor ink
arswer:
retara answer:
adf
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
