Consider the following stack implemented using stack. SIZE 11 struct STACK {…

PYQ Capgemini Hiring Assessment 2023

Consider the following stack implemented using stack.

SIZE 11

struct STACK

{

int arr[SIZE];

int top=-1;

}

What would be the maximum value of the top that does not cause the overflow of the stack?

  1. A.

    8

  2. B.

    9

  3. C.

    11

  4. D.

    10

Attempted by 814 students.

Sign up free to check your answer

Sign up free

Explore the full course: Cdac C Cat Complete Preparation

Loading lesson…