Answer:
if(currObj->GetDataVal() < 0)
{
negativeCntr++;
}
Step-by-step explanation:
This is the solution in C++ try in C see if it works (I'm more knowledgeable on C++)
You have to use the function GetDataVal() in order to receive the value attached to the currObj you are looking for. The while loop used above it goes through each node to see if it's not null, or in other words, if the memory location has a value. If the location has a value then the value itself is checked and if the value is less than 0, negativeCntr = negativeCntr + 1;