Which of the following is NOT a container adapter? stack queue deque priority-queue
SIKSHAPATH Latest Questions
Write a templated class named “EveryOther” that behaves much like std::vector (in the file named “everyother.h”). It has a member function called “push_back”, but only every other call to the member function actually does anything (actually pushed the element to ...
My program contains the line: delete x; It does not cause a compile time error. Which of the following is a possibledeclaration for x? a. int x; b. double x; c. double *x; d. int x[10];
To create an array of integers which can be accessed as A[0],…,A[4] residing on the heap the code to be executed is: a. int A[5]; b. int *A = new int[5]; c. int A = new int[5]; d. int new A[5];
What is the value of variable count at the end of execution? int count=0; for (int i=1; i<=5; i++) { for (int j=1; j<=5; j+=i) { for (int k=1; k<=5; k+=j) { count++; } } }
Write a menu-driven program that implements the following operations (using separate functions)on a linear array- Insert a new element at the end Display the elements of the linear array