=>which of the following represent valid use cases of the ANSI C register storage class specifier?     A)A for loop in which the loop index is declared in the initialization.     B)A short int inside a block which will be passed by pointer to another function.     C)An unsigned short defined inside a function combined with other quantities as a bitmask.     D)A parameter list of an external function declared in a header file.     E)A char array declare at file scope to be used by all functions defined in the file. =>Memory has been dynamically allocated in the C++ statement below: char*  str = new  char[20]; Which of the following statements can be used to free the memory?     A)delete[]  str;     B)delete  str[];     C)delete char* str;     D)delete *str;     E)delete str[20];

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section7.5: Case Studies
Problem 8E
icon
Related questions
Question

=>which of the following represent valid use cases of the ANSI C register storage class specifier?

    A)A for loop in which the loop index is declared in the initialization.
    B)A short int inside a block which will be passed by pointer to another function.
    C)An unsigned short defined inside a function combined with other quantities as a bitmask.
    D)A parameter list of an external function declared in a header file.
    E)A char array declare at file scope to be used by all functions defined in the file.

=>Memory has been dynamically allocated in the C++ statement below:

char*  str = new  char[20];

Which of the following statements can be used to free the memory?


    A)delete[]  str;
    B)delete  str[];
    C)delete char* str;
    D)delete *str;
    E)delete str[20];

 

Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning