In the following function to push data into a stack, the condition "if (!success)" tests _____.void insertData (STACK_NODE** pStackTop){   char charIn;   bool success;   for (int nodeCount = 0; nodeCount < 10; nodeCount++)   {      charIn = rand() % 26 + 'A';      success = push(pStackTop, charIn);      if (!success)      {         exit (100);      } // if   } // for} // insertData

A. if the stack is empty
B. if an attempt to insert duplicate data was made
C. for underflow
D. for overflow

Answer: D

Computer Science & Information Technology

You might also like to view...

_______________ are the ultimate key to protecting your network.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Which of the following statements about pointer initialization is true?

A. Pointer constants can only point to constants. B. Pointer constants can only be initialized to null pointers. C. Pointer constants are automatically set to null by the compiler. D. The data variable must be declared before it can be used for pointer initialization.  E. To initialize a pointer to the address of a variable, the variables identifier is suffixed with the indirection operator (*).

Computer Science & Information Technology