click below
click below
Normal Size Small Size show me how
Data Structures
| Question | Answer |
|---|---|
| The following are examples of primitive data structures, except. | Array? |
| Pointer is a non-primitive data structure. | False |
| Abstraction is providing only essential information outside the world. | False? |
| char &ch is valid pointer declaration | False |
| Given: int *p; int x; x = 10; p = x is a valid statement. | False |
| Given: int *q; * q = 10; The statement cout << *q will have an output of 10. | True |
| Any new dynamic variable created by a program consumes some of the memory in the freespace | True |
| Remove operator eliminates a dynamic variable and returns the memory that the dynamic variable occupied to the freestore manager so that the memory can be reused. | False |
| An ADT is a relational model, together with the various operations defined on the model. | False |
| TRUE/FALSE: The * operator in front of a pointer variable produces the variable to which it points. When used this way, the * operator is called the dereferencing operator. | True |
| It is a memory address of a variable. | Pointer |
| Stack is a special area of memory that is reserved for dynamically allocated variables. | False |
| If pointer variable pointing to the dynamic variable that was destroyed and becomes undefined is called dangling pointers. | True |
| Heap is a special area of memory that is reserved for dynamically allocated variables. | True |
| Which of the following is the proper way of declaring a pointer variables of type char? | char *p, *q; |
| The new operator creates a new dynamic variable of a specified type and returns a pointer that points to this new variable. | True |