Topic: Chapter 12: Arrays and Structures (Test 1)



Topic: Chapter 12: Arrays and Structures
  • «
  • Test: 1(current)
  • «
Q.1
Which of the following is the collection of variables of the same type that an referenced by a common name ?
A. int
B. float
C. Array
D. class
Answer : Option C
Explaination / Solution:
No Explaination.


Workspace
Report
Q.2
Array subscripts is always starts with which number ?
A. -1
B. 0
C. 2
D. 3
Answer : Option B
Explaination / Solution:
No Explaination.


Workspace
Report
Q.3
int age[]={6,90,20,18,2}; How many elements are there in this array?
A. 2
B. 5
C. 6
D. 4
Answer : Option B
Explaination / Solution:
No Explaination.


Workspace
Report
Q.4
cin>>n[3]; To which element does this statement accepts the value?
A. 2
B. 3
C. 4
D. 5
Answer : Option C
Explaination / Solution:
No Explaination.


Workspace
Report
Q.5
Structure definition is terminated by
A. :
B. }
C. ;
D. ::
Answer : Option C
Explaination / Solution:
No Explaination.


Workspace
Report
Q.6
Which of the following is a properly defined structure?
A. struct {int num;}
B. struct sum {int num;}
C. struct sum int sum;
D. struct sum {int num;};
Answer : Option D
Explaination / Solution:
No Explaination.


Workspace
Report
Q.7
A sequence of characters where each character may be a letter, number or a symbol is defined as
A. String
B. Class
C. Function
D. Structure
Answer : Option A
Explaination / Solution:
No Explaination.


Workspace
Report
Q.8
A structure without a name/tag is called
A. Anonymous structure
B. A nested structure
C. Null structure
D. Pointer structure
Answer : Option A
Explaination / Solution:
No Explaination.


Workspace
Report
Q.9
The structure declared within another structure is called
A. Anonymous structure
B. A nested structure
C. Null structure
D. Pointer structure
Answer : Option B
Explaination / Solution:
No Explaination.


Workspace
Report
Q.10
A user-defined which has the combination of data items with different data types.
A. Structure
B. Function
C. Array
D. Class
Answer : Option A
Explaination / Solution:
No Explaination.


Workspace
Report


  • «
  • Test: 1(current)
  • «