Feedback for subjective question
Question 1: The following function is performing some operation on the elements of a singly link list please tell what this functions is doing,
void LinkList::mystery(){
Node * temp = headNode;
int result = 0;
while( temp->getNext() != NULL ){
temp = temp->getNext();
int value = temp->get();
if(value % 2 == 0) {
value ++;
temp->set(value);
}
}
}
void LinkList::mystery(){
Node * temp = headNode;
int result = 0;
while( temp->getNext() != NULL ){
temp = temp->getNext();
int value = temp->get();
if(value % 2 == 0) {
value ++;
temp->set(value);
}
}
}
Current Answer:
Be the first to post an answer to earn 100CR.