=>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];
=>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];
Step by step
Solved in 3 steps