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 ...
Home/Programming Language/C++/Page 2
SIKSHAPATH Latest Questions
Pavanagg
Asked: April 12, 2022In: C++
What’s printed by the following code fragment? set<int> s; s.insert(100); s.insert(25); for(auto e : s) cout << e
Pavanagg
Asked: April 4, 2022In: C++
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];
Pavanagg
Asked: April 4, 2022In: C++
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];
Paneer selvam
Asked: February 15, 2022In: C++
What is the value of variable count at the end of execution?
Pavanagg
Asked: February 14, 2022In: C++
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++; } } }