C++ Array Important MCQs
- _________ is a group of consecutive memory locations with same name and data type.
- Each element of an array has its own.
- The index of the first element of an array is aloways;
- Each Element in array has
- Which of the following correct declaration of an array?
- Object of an array is called as ____________.
- What is the index number of the last element of an array with 50 elements?
- What is the index number of the first element of an array with 50 elements?
- Which of the following is correct initialization of array?
- In the declaration statement
int arr[10][6];
the total number of element is? - Which of the following functions is used to return the length of a string?
- Which of the following function is used to copy one string to another string?
- A character constant is written in _______.
- What is the output of the following code?
- Which of the following functions is used to append a string on to the end of another string?
- Which of the following functions is used to compare two string character by character?
- The
strcmp()
function will return ________ if string 1 is greater than string 2? - Which of the following function is used to read a string from a keyboard that may contain blank space?
- The
strcmp()
function will return _______ if string 1 is less than string 2? - All strings end with special character called __________ character.
- The
strcmp
function will return _______ if string 1 and string 2 are same. - A string constant is written in ______.
- A two dimensional array is always considered as
- Which of the following provides the number of bytes occupied by the data type given in the parenthesis?
- What is output the following code segment?
- Array is used for :
- A One Dimensional Array is always considered as
- One Dimensional Array contains __________ row and _______________ column?
- Two dimensional Array is always considered as
- Two dimensional Array contains __________ row and ________ columns?
- Correct Syntax of One Dimensional Array is ____________.
- Correct Syntax of two dimensional Array is __________.
- How many kinds of elements an array can have?
- what does the following code do?
- what is the last legal subscript that can be used with the following array?
Int Values[5];
- every element in an array is searched against some searching key, special for
- which of the header file is used for array type manipulation?
- What will be the output of the following C++ code?
- Array is a ________ collection of similar data items, by similar we mean that all data items must have the same type
- Array variable can store __________.
- An array can be a Single Dimensional _________________.
- Array Subcript Start with index no ___.
- The two dimensional (2D) array in C programming is ___________.
- In Single Dimensional Array ________ is used
- In two dimensional array the first subcript of array is ________.
- In two dimensional array the second subcript/index of the array is __________.
(a) Loop
(b) Array
(c) Function
(d) Class and Object
(b) Array
(a) Name
(b) Index
(c) Size of an Array
(d) List of Number
(b) Index
(a) 0
(b) 1
(c) -1
(d) All of these
(a) 0
(a) Name
(b) Unique Index
(c) Size of an Array
(d) List of Number
(b) Unique Index
(a) int array[10];
(b) int array[10];
(c) int array{10};
(d) INT array[10];
(b) int array[10];
(a) Element of an Array
(b) Index of an Array
(c) Size of an array
(d) List of an Array
(a) Element of an Array
(a) 50
(b) 49
(c) 51
(d) None of these
(b) 49
(a) 0
(b) 1
(c) -1
(d) 30
(a) 0
(a) int arr[2][2] = [1,2,34],[11,22,44],[41,23,24];
(b) int arr[2][2] = {1,2,34};{11,22,44};{41,23,24};
(c) int arr[2][2] = {1,2,34},{11,22,44},{41,23,24};
(d) int arr[2][2] = {1,2,34},{11,22,44},{41,23,24};
(d) int arr[2][2] = {1,2,34},{11,22,44},{41,23,24};
(a) 61
(b) 60
(c) 16
(d) None of these
(b) 60
(a) strlen
(b) stringsize
(c) stringlen
(d) None of these
(a) strlen
(a) strcopy
(b) stringcopy
(c) stringcpy
(d) strcpy
(d) strcpy
(a) Double Quotes
(b) Single Quotes
(c) Quote
(d) None of these
(b) Single Quotes
float arr[3] = {5500,3000,202,5605};
cout<<[1];
(a) 5500
(b) 3000
(c) 8500
(d) None of these
(b) 3000
(a) strcmp
(b) strlen()
(c) stringcpy
(d) strcat()
(d) strcat()
(a) strcmp
(b) stringcompare
(c) strlen
(d) None of these
(a) strcmp
(a) 0
(b) Null
(c) 1
(d) -1
(c) 1
(a) cin.gets()
(b) cin.get()
(c) cin.puts()
(d) None of these
(b) cin.get()
(a) 0
(b) Null
(c) 1
(d) -1
(d) -1
(a) Null
(b) Zero
(c) 1
(d) None of these
(a) Null
(a) 0
(b) Null
(c) 1
(d) -1
(a) 0
(a) Single Quotes
(b) Double Quotes
(c) Without Quotes
(d) None of these
(b) Double Quotes
(a) Linear
(b) Sequential
(c) Matrix
(d) All of these
(c) Matrix
(a) pow()
(b) sizeof()
(c) strcmp
(d) None of these
(b) sizeof()
int Array[5] = {10,20,30,40,60,56};
cout<<Array[2];
(a) 20
(b) 10
(c) 30
(d) All of these
(c) 30
(a) Array can store a large number of values with single name.
(b) The use of arrays reduces Program Size.
(c) A Search Process can be applied an array easily.
(d) All of these
(d) All of these
(a) Linear
(b) List
(c) Linear/List
(d) All of these
(c) Linear/List
(a) Single Row and Multiple Columns
(b) 1 row and 2 columns
(c) Single Row and one Columns
(d) None of these
(a) Single Row and Multiple Columns
(a) Table
(b) Matrix
(c) Table/Matix
(d) All of these
(c) Table/Matix
(a) Multiple Row and Multiple Columns
(b) 1 Row and 2 Columns
(c) Single Row and Multiple Columns
(d) None of these
(a) Multiple Row and Multiple Columns
(a) Datatype arrayname[arraysize];
(b) Datatype arrayname[arraysize];
(c) Datatype arrayname{arraysize};
(d) All of these
(b) Datatype arrayname[arraysize];
(a) Datatype arrayname[arraysize];
(b) .datatype arrayname[columnsize][rowsize];
(c) datatype arrayname[rowsize][columnsize];
(d) All of these
(c) datatype arrayname[rowsize][columnsize];
(a) Char and int type
(b) Only char type
(c) Only int type
(d) All of them have same type
(d) All of them have same type
for (int index = 0; index < 5; index++){
cin >> numbers[index];
}
(a) Place data into a four element array called numbers.
(b) Place data into a four element array called index.
(c) Place data into a five element array called numbers.
(d) Place data into a five element array called index.
(d) Place data into a five element array called index.
(a) 4
(b) 0
(c) 6
(d) 5
(a) 4
(a) Linear search
(b) Bubble sort
(c) Binary search
(d) All of them
(a) Linear search
(a) <array>
(b) <type_traits>
(c) <iostream>
(d) std namespace
(d) std namespace
#include <iostream>
#include <string>
using namespace std;
int main()
{
cout<<rank<int[10]>::value;
cout<<rank<char[10][10]>::value;
cout<<rank<string[10][10][10]>::value;
return 0;
}
(a) 400
(b) 123
(c) 111
(d) 200
(b) 123
(a) finite
(b) undefined
(c) 3 time
(d) Both a and b
(a) finite
(a) More then one value
(b) store string,integer values
(c) Both a and b
(d) None
(a) More then one value
(a) one Subcript Dealing with one Dimensional
(b) two Subcript
(c) three Subcript
(d) None
(a) one Subcript Dealing with one Dimensional
(a) 1
(b) 2
(c) 3
(d) 0
(d) 0
(a) matrix
(b) subcript
(c) index
(d) no
(a) matrix
(a) single Subcript
(b) multiple Subcript
(c) three Subcript
(d) two Subcript
(a) single Subcript
(a) Row
(b) Column
(c) Both a and b
(d) Nobe
(a) Row
(a) Row
(b) Column
(c) Both a and b
(d) Nobe
(b) Column
Related Topics
"C++ Array Important MCQs","cpp array mcqs","c++ array questions and answers pdf","cpp array mcqs","Multiple choice questions and answers on Arrays in C++ MCQs","Arrays C++ MCQ","C++ Arrays Multiple Choice Questions and Answers","cpp array question answers","C++ Array Solved MCQs Questions Answers","Arrays in C++ Multiple Choice Questions and Answers".
إرسال تعليق
To be published, comments must be reviewed by the administrator.