InterviewSolution
Saved Bookmarks
| 1. |
Pick the incorrect statement about Character-Array.(a) Character-Array can be terminated by a null character(‘\0’)(b) Character-Array has a static size(c) Character-Array has a dynamic size(d) Character-Array has a threat of array-decayThis question was posed to me in exam.This interesting question is from String topic in chapter Source Files, Classes and Operator Overloading in C++ of C++ |
|
Answer» RIGHT choice is (C) CHARACTER-ARRAY has a DYNAMIC size Easy explanation - As Character-Array is an array, its size should be defined during its declaration hence the size of Character-Array is static. A Character-Array is not necessarily to be terminated by a null character. Also, it has a threat of array-decay. |
|