GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

Author Archives: Anonymous

A wheelchair patient could not use the medical office restro…

A wheelchair patient could not use the medical office restroom because it was too small for the wheelchair.  This office is in violation of

Read Details

Given the following code, what will the output be? vector da…

Given the following code, what will the output be? vector data;int x = 1;for (int i = 0; i < 4; i++){ x *= 2; data.push_back(&x);}for (int i = 0; i < 4; i++) cout

Read Details

In an employment interview 

In an employment interview 

Read Details

After the following code has executed, which pointers are po…

After the following code has executed, which pointers are pointing to data located on the stack? int x = 7;int* y = &x;int* z = &x;y = new int(3);x = 0;int* w = &x;

Read Details

Which of the following are reasons why we might dynamically…

Which of the following are reasons why we might dynamically allocate data in our program? Mark all that apply.

Read Details

Given the following: class TestQuestion{ std::string *answer…

Given the following: class TestQuestion{ std::string *answers;public: TestQuestion(int count) { answers = new std::string[count]; } ~TestQuestion { // What goes here? }}; How can you properly delete the dynamically allocated memory for an instance of this class?

Read Details

How do we access the data at the memory address a pointer po…

How do we access the data at the memory address a pointer points to? Or, how do we access the “pointee” of a pointer? 

Read Details

How many times do you need to deallocate memory (using eithe…

How many times do you need to deallocate memory (using either delete[] or delete) to prevent this code from leaking? float* myData[3];float* myPtr = nullptr;for (int i = 0; i < 2; i++) myData[i] = new float[10];myData[2] = new float;myPtr = myData[2];

Read Details

Our morals are shaped from:

Our morals are shaped from:

Read Details

σύν

σύν

Read Details

Posts pagination

Newer posts 1 … 67,032 67,033 67,034 67,035 67,036 … 85,305 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top