This set of Compilers Multiple Choice Questions & Answers (MCQs) focuses on “Relations – 1”.
1. (a,b) what is a?
a) Domain
b) Range
c) Domain & Range
d) None of the mentioned
View Answer
Explanation: A is called the domain.
2. (a,b) what is b?
a) Domain
b) Range
c) Domain & Range
d) None of the mentioned
View Answer
Explanation: B is called the Range.
3. R is said to be reflexive if aRa is true for every a in A.
a) True
b) False
View Answer
Explanation: All the elements of A are related with itself by relation R, hence it is a reflexive relation.
4. If every aRb implies bRa then a relation R will be a symmetric relation.
a) True
b) False
View Answer
Explanation: a is related to b by R, and if b is also related to a by the same relation R.
5. If every aRb and bRc implies aRc, then the relation is transitive.
a) True
b) False
View Answer
Explanation: a is related to b by R, and b is related to c by R, and similarly for a and c.
6. The smallest set A such that A ∪ {1, 2} = {1, 2, 3, 5, 9} is?
a) {2,3,5}
b) {1, 2, 5, 9}
c) {3, 5, 9}
d) None of the mentioned
View Answer
Explanation: Given A ∪ {1, 2} = {1, 2, 3, 5, 9}. Hence A = {3,5,9}.
7. If a set A has n elements, then the total number of subsets of A is?
a) N
b) 2n
c) N2
d) 2n
View Answer
Explanation: Number of subsets of A = nC0 + nC1 + . . . . . + nCn = 2n.
Sanfoundry Global Education & Learning Series – Compilers.
To practice all areas of Compilers, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Check Compiler Design Books
- Practice Computer Science MCQs
- Check Computer Science Books
- Practice MCA MCQs
- Apply for Computer Science Internship