Data Types MCQs

100 MCQs  (Page 7 of 10)

Which statement about UTF-8 is correct?
It is variable-length (1 to 4 bytes per character) and backward-compatible with ASCII
It is fixed at 8 bytes per character
It cannot represent non-Latin scripts
It always uses 2 bytes per character
In which order does C/C++ store multidimensional arrays?
Row-major order
Random order
Column-major order
Implementation-defined
Is int n; cin >> n; int a[n]; standard C++?
Only when n is less than 100
Yes, since C++11
Yes, always
No; variable-length arrays are not part of standard C++ (some compilers accept them as an extension)
How is a Python list implemented in CPython?
As a hash table
As a singly linked list
As a dynamic array of references, with amortized O(1) append
As a balanced tree
In the C++ declaration int* p, q;, what are the types of p and q?
p is int*; q is int
p is int; q is int*
Both are int
Both are int*