Questions · Page 1 of 2

MCQ . (1 Marks)

🎯

Test yourself on this topic

50 questions · timed · auto-graded

MCQ 11 Mark
What happens if a C program tries to access a value from an array element whose subscript exceeds the size of array ?
  • A
    The element will be set to 0.
  • B
    The compiler would report an error.
  • The program may crash or gives garbage dat
  • D
    The array size increases automatically.
Answer
Correct option: C.
The program may crash or gives garbage dat
C
View full question & answer
MCQ 21 Mark
If int a[3][3]-{{11, 12, 13)}, {14, 15, 16]. {17. 18, 19}}; then what will be the value of a [1] [2]?
  • A
    15
  • 16
  • C
    17
  • D
    12
Answer
Correct option: B.
16
b
View full question & answer
MCQ 31 Mark
What will be the value of a[4] in int a[5]={ 11, 23, 35, 10, 44}?
  • A
    10
  • B
    23
  • C
    11
  • None of the given
Answer
Correct option: D.
None of the given
d
View full question & answer
MCQ 41 Mark
_______of the following is two dimensional array.
  • A
    int a[3][3];
  • int a[2][2]={(0, 0), (1, 1));
  • C
    int a[4][4];
  • D
    Int a[5][4];
Answer
Correct option: B.
int a[2][2]={(0, 0), (1, 1));
b
View full question & answer
MCQ 51 Mark
Which of the following is not provided by C?
  • A
    To make single dimensional array.
  • No bound check on array index.
  • C
    To make N-dimensional array.
  • D
    None of the given
Answer
Correct option: B.
No bound check on array index.
b
View full question & answer
MCQ 61 Mark
What happens when invalid index value is used with an array?
  • A
    The program may give garbage dat
  • B
    The program may get crash.
  • Both A and B
  • D
    The program will run properly.
Answer
Correct option: C.
Both A and B
c
View full question & answer
MCQ 71 Mark
C language provides power to the programmer to write any _______within the [ ] of an array.
  • index value
  • B
    data type
  • C
    array name
  • D
    all of the given
Answer
Correct option: A.
index value
a
View full question & answer
MCQ 81 Mark
In C language, the multi dimensional arrays are major.
  • rows
  • B
    columns
  • C
    both A and B
  • D
    none of the given
Answer
Correct option: A.
rows
a
View full question & answer
MCQ 101 Mark
What will be the value of a[4] in int a[5]= {11, 23, 35, 10, 44); ?
  • A
    10
  • B
    35
  • C
    11
  • 44
Answer
Correct option: D.
44
d
View full question & answer
MCQ 111 Mark
Total.......... values can be entered by the user if an array is declared as int x [3][3].
  • A
    3
  • B
    6
  • 9
  • D
    12
Answer
Correct option: C.
9
c
View full question & answer
MCQ 121 Mark
The statement int a[3][3]: divides the array elements as per
  • 3 x3
  • B
    3+3
  • C
    3-3
  • D
    3%3
Answer
Correct option: A.
3 x3
a
View full question & answer
MCQ 141 Mark
The______ array have row index as well as column index.
  • A
    three dimensional
  • B
    two dimensional
  • N-dimensional
  • D
    one dimensional
Answer
Correct option: C.
N-dimensional
c
View full question & answer
MCQ 151 Mark
The simplest form of the multi dimensional array is_______.
  • A
    three dimensional
  • B
    N-dimensional.
  • two dimensional
  • D
    one dimensional
Answer
Correct option: C.
two dimensional
c
View full question & answer
MCQ 161 Mark
The data associated with which of the following are in two dimensions?
  • A
    Digital Image
  • B
    A chess game board
  • C
    Matrix
  • All of the given
Answer
Correct option: D.
All of the given
d
View full question & answer
MCQ 171 Mark
The single dimensional array keeps track of information in _______ order.
  • linear
  • B
    random
  • C
    two dimensional
  • D
    both B and C
Answer
Correct option: A.
linear
a
View full question & answer
MCQ 181 Mark
Which of the following array is allowed in C?
  • A
    One dimensional, two dimensional
  • B
    Three dimensional
  • C
    N-dimensional
  • All of the given
Answer
Correct option: D.
All of the given
d
View full question & answer
MCQ 191 Mark
Which of the following is an invalid array declaration?
  • A
    char namel 1 {‘A’, 'b', 'c', ‘\0'};
  • B
    int number! = {1, 1, 1, 1};
  • int n1 [ ] = {{1, 1}. {2 2}, {3, 3}};
  • D
    None of the given
Answer
Correct option: C.
int n1 [ ] = {{1, 1}. {2 2}, {3, 3}};
c
View full question & answer
MCQ 201 Mark
Which of the following array element will get value 7 from int a 15)={3, 15, 25, 7, 10}: ?
  • A
    A[4]
  • B
    A[6]
  • A[3]
  • D
    A [0]
Answer
Correct option: C.
A[3]
C
View full question & answer
MCQ 221 Mark
The statement int x[ ]= {11, 12, 23, 10, 55}; will declare an array variable x of size _______.
  • A
    4
  • B
    6
  • 5
  • D
    1
Answer
Correct option: C.
5
c
View full question & answer
MCQ 241 Mark
Strings in a C language are terminated by the special character called null character_______.
  • A
    \n
  • \0
  • C
    \t
  • D
    \b
Answer
Correct option: B.
\0
b
View full question & answer
MCQ 251 Mark
Which of the following is a valid character array to store the word/string SWAMP?
  • A
    char name [6]= "PURVA";
  • B
    char name [5]= "PURVA";
  • C
    char name [6]= ('P. 'U'. 'R. V. 10);
  • both A and C
Answer
Correct option: D.
both A and C
d
View full question & answer
MCQ 261 Mark
Which of the following character variable has not been assigned the values properly?
  • A
    char P[6]= "PURVA";
  • B
    char B[6]= {‘P’. ‘U’. 'R’. ‘V’. ‘A’.’\0’};
  • C
    char SI 1= { ‘G’, ‘U’, ‘J’, ‘A’, ‘R’, ‘A’ , ‘T’,’\0’};
  • char A[ ] = 'INDIA':
Answer
Correct option: D.
char A[ ] = 'INDIA':
d
View full question & answer
MCQ 271 Mark
In C language,_______ array is used to represent string.
  • A
    Integer
  • character
  • C
    string
  • D
    float
Answer
Correct option: B.
character
b
View full question & answer
MCQ 281 Mark
During the declaration of an integer array variable, if list of values are less than the size of an array, then only specified number of elements will be initialized and the remaining elements will be initialized to ______
  • A
    \n
  • B
    \0
  • C
    At
  • 0
Answer
Correct option: D.
0
d
View full question & answer
MCQ 291 Mark
When an array is assigned values at the time of execution of program, it is known as ______array initialization.
  • run time
  • B
    compile time
  • C
    declaration time.
  • D
    none of the given
Answer
Correct option: A.
run time
a
View full question & answer
MCQ 301 Mark
When an array is assigned values at the time of declaration, it is known as_______ array initialization.
  • A
    run time.
  • compile time
  • C
    declaration time
  • D
    none of the given
Answer
Correct option: B.
compile time
b
View full question & answer
MCQ 321 Mark
The initial values of an array are separated using _______sign.
  • $,$
  • B
    $-$
  • C
    $:$
  • D
    $;$
Answer
Correct option: A.
$,$
$,$
View full question & answer
MCQ 331 Mark
The list of values that is to be assigned to an array element is enclosed within________.
  • A
    $()$
  • B
    $1$
  • $\{ \}$
  • D
    $([ ])$
Answer
Correct option: C.
$\{ \}$
$\{ \}$
View full question & answer
MCQ 341 Mark
In array syntax. data type arrayname[size]:_______ indicates the number of elements the array can store.
  • A
    data type
  • B
    arrayname
  • size
  • D
    none of the given
Answer
Correct option: C.
size
size
View full question & answer
MCQ 351 Mark
Which of the following is not provided as in$-$built data type by $C$ language?
  • A
    int
  • B
    char
  • C
    float
  • string
Answer
Correct option: D.
string
View full question & answer
MCQ 361 Mark
Which of the following data type can be used for an array variable?
  • A
    int
  • B
    float, double
  • C
    char
  • all of the above
Answer
Correct option: D.
all of the above
View full question & answer
MCQ 371 Mark
What does arrayname specify in array syntax, data type arrayname$[$size$]$; ?
  • A
    Type of data
  • Name of array variable
  • C
    Number of elements
  • D
    All of the given
Answer
Correct option: B.
Name of array variable
View full question & answer
MCQ 381 Mark
In array syntax, data type arrayname$[$size$]; ..........$ indicates the type of element that an array stores.
  • data type
  • B
    arrayname
  • C
    $[ ]$
  • D
    size
Answer
Correct option: A.
data type
View full question & answer
MCQ 391 Mark
Which of the following array has one or more rows and one or more columns?
  • A
    Single dimensional array
  • Multidimensional array
  • C
    Multipurpose array
  • D
    None of the given
Answer
Correct option: B.
Multidimensional array
View full question & answer
MCQ 401 Mark
Which of the following array have one row or one column?
  • Single dimensional array
  • B
    Multidimensional array
  • C
    Three dimensional array
  • D
    Two dimensional array
Answer
Correct option: A.
Single dimensional array
View full question & answer
MCQ 431 Mark
The subscript of an array must be $..........$
  • A
    an integer
  • B
    an integer expression
  • $a$ or $b$
  • D
    real number
Answer
Correct option: C.
$a$ or $b$
View full question & answer
MCQ 441 Mark
In array, the index number contained within square bracket is known as
  • subscript
  • B
    index number
  • C
    $A$ or $B$
  • D
    none of the given
Answer
Correct option: A.
subscript
View full question & answer
MCQ 451 Mark
An array variable marks $[60]$ can store values.
  • A
    $1$ to $60$
  • B
    $0$ to $60$
  • $0$ to $59$
  • D
    $0$
Answer
Correct option: C.
$0$ to $59$
View full question & answer
MCQ 461 Mark
$..........$is an arrayname in marks $[i].$
  • marks
  • B
    $1$
  • C
    $[ ]$
  • D
    None of the given
Answer
Correct option: A.
marks
View full question & answer
MCQ 471 Mark
All the $..........$ of an array is referred by single name.
  • A
    parts
  • B
    values
  • C
    elements
  • $A$ or $B$ or $C$
Answer
Correct option: D.
$A$ or $B$ or $C$
View full question & answer
MCQ 481 Mark
$..........$ is a fixed$-$size sequential collection of elements.
  • A
    functions
  • B
    storage classes
  • An array
  • D
    non of the given
Answer
Correct option: C.
An array
View full question & answer
MCQ 491 Mark
An array element occupies $..........$ memory locations.
  • contiguous
  • B
    separate
  • C
    small
  • D
    large
Answer
Correct option: A.
contiguous
View full question & answer
MCQ 501 Mark
A$/$An $..........$ Is a data structure made up of group of variables having same property.
  • A
    structure
  • array
  • C
    function
  • D
    constant
Answer
Correct option: B.
array
View full question & answer
MCQ . (1 Marks) - Computer STD 10 Questions - Vidyadip