Home » C++ Programming » Memory Management :: Discussion
Discussion :: Memory Management - Section 1
  1. Which of the following is/are valid ways to allocate memory for an integer by dynamic memory allocation in CPP?

  2. A.
    int *p = new int(100);
    B.
    int *p; p = new int; *p = 100;
    C.
    int *p = NULL; p = new int; *p=100;
    D.
    All of these

    view answer View Answer

    discussion Workspace


Be The First To Comment