Arrays interview questions
20 questions. Tap “Show answer” to check yourself.
-
___ function compares the two given strings.
- Strcmp ()
- Strcp ()
- Stcp()
- Stcmp()
Show answer
A. Strcmp ()
-
Matrices can be represented through ____ arrays.
- Single
- 2-D
- 3-D
- Multi-dimensional
Show answer
B. 2-D
-
The size of the array should always be ___
- Positive
- Negative
- Whole number
- Real number
Show answer
A. Positive
-
Character Array should be initialized using ___ quotes.
- Any
- Double
- No
- Single
Show answer
B. Double
-
In a 2D array, the first sub-script stands for ____
- Row
- Column
- Object
- Diagonal
Show answer
A. Row
-
_____ dimensional array is an array in which each element is itself an array
- One
- Two
- Four
- Five
Show answer
B. Two
-
The ____ character is very important, as it acts the string terminator.
- Float
- Int
- Null
- String
Show answer
C. Null
-
____ is a member function of standard input istream.
- Getsline ()
- Line()
- Get ()
- Getline ()
Show answer
D. Getline ()
-
String manipulators are defined in __ header file.
- string.h
- string
- st.h
- std.h
Show answer
A. string.h
-
Arrays are of ___ types.
- 1
- 2
- 3
- 4
Show answer
B. 2
-
____ parameters are required for write function.
- Two
- Three
- Four
- Five
Show answer
A. Two
-
The process of arranging the data in a given array is called ___
- Merging
- Filtering
- Sorting
- Ordering
Show answer
C. Sorting
- Advertisement
-
The subscript always commences from ___
- One
- Two
- Three
- Zero
Show answer
D. Zero
-
A ___ is a collection of variables of the same type that are referenced by a common name.
- Program
- Array
- Constant
- Variable
Show answer
B. Array
-
____ are otherwise called as literals.
- Data
- Variables
- Constants
- Strings
Show answer
D. Strings
-
If the elements are stored in row wise manner it is called as ___ order.
- Row-major
- Column-major
- Column
- Row
Show answer
A. Row-major
-
_____ Dimensional array comprising of finite homogenous elements.
- One
- Two
- Three
- Multi
Show answer
A. One
-
____ is a member function of standard output stream i.e., ostream.
- Reads ()
- Writes ()
- Print ()
- Write ()
Show answer
D. Write ()
-
Which of the following is a derived data type?
- Array
- Double
- Float
- Union
Show answer
A. Array
-
Arrays in C++ belong to which of the following data type?
- Primitive
- User defined
- Derived
- Basic
Show answer
C. Derived