MCQ Bank
Which of the following is the correct syntax to declare a vector of type int?
- A) int <vector> sampleVector;
- B) vector<int> sampleVector;
- C) sampleVector vector<int> ;
- D) vector {int} sampleVector;
Which of the given is not a component of STL?
- A) Iterator
- B) Cursor
- C) Container
- D) Algorithm
If Vector<char* > is instantiated, which version will the compiler choose?
- A) Partial specialization
- B) Complete specialization
- C) General template
- D) Function overloading
Which of the following function is used to add an element to the end of a vector?
- A) insert()
- B) back()
- C) end()
- D) push_back()
Which of the given is not a Sequence Container?
- A) Deque
- B) List
- C) Vector
- D) Set
What feature enables same-named template functions to exist?
- A) Specialization
- B) Function overloading
- C) Polymorphism
- D) Inheritance
What does the compiler check first during template resolution?
- A) Partial specialization
- B) Complete specialization
- C) Function overloading
- D) General template
From the following options, Choose the correct statement for the third normal form.
- A) There is partial dependency in the relation
- B) There is redundant data in the relation
- C) No non key attribute is dependent on another non key attribute
- D) Non key attribute is dependent on another non key attribute
A table is in third normal form if it is in second normal form and there is no __________.
- A) Consistency
- B) Partial dependency
- C) Transitive dependency
- D) Full functional dependency
A relation is in third normal form if ________.
- A) It has multivalued attributes
- B) It has a transitive dependency
- C) It has a partial dependency
- D) It is already in second normal form
Which of the following action is performed on a relation to remove the transitive dependency?
- A) Decomposition
- B) Aggregation
- C) Composition
- D) Augmentation
Consider the following relation: STD(stId, stName, stAdr, prName, prCrdts) stId → stName, stAdr, prName, prCrdts prName → prCrdts Which of the following dependency exist in above relation?
- A) Reflexive dependency
- B) Transitive dependency
- C) Terminal dependency
- D) Composite dependency
The anomalies caused by transitive dependency in a relation are removed by __________.
- A) Changing primary key
- B) Reducing number of rows
- C) Reducing number of columns
- D) Breaking down the relation
A transitive dependency occurs when __________.
- A) Part of the key is dependent on key attribute
- B) Primary key attribute is dependent on non-key attribute
- C) Non-key attribute is not dependent on another non-key attribute
- D) Non-key attribute is dependent on another non-key attribute
If a relation is not in third normal form, then anomalies are due to ________.
- A) Transitive dependency
- B) Reflexive dependency
- C) Partial dependency
- D) Full functional dependency
Which of the following is NOT related to CREATE TABLE command?
- A) Attributes
- B) Constraints
- C) Records
- D) Data types
Which of the following command is used to insert data into tables?
- A) DQL
- B) DDL
- C) DDL
- D) DML
Which of the following is NOT a type of integer data type in SQL?
- A) Smallerint
- B) Smallint
- C) Smallint
- D) Int
INSERT INTO statement is used to enter values into__________.
- A) All columns
- B) Only particular column
- C) Not null columns only
- D) Key value columns only
Which of the following is the correct syntax for inserting some values into the employee table?
- A) INSERT into employee (col1, col2, col3) VALUES (val1, val2, val3)
- B) INSERT into employee (col1, col2, col3), (val1, val2, val3)
- C) INSERT into (col1, col2, col3) VALUES (val1, val2, val3)
- D) INSERT into employee COLUMN (col1, col2, col3) VALUES (val1, val2, val3)