Compilers Questions and Answers – Relations – 2

This set of Compilers Questions and Answers for Freshers focuses on “Relations – 2”.

1. If A ∩ B = B, then?
a) A ⊂ B
b) A = ø
c) B ⊂ A
d) B = ø
View Answer

Answer: c
Explanation: Since A ∩ B = B, hence B ⊂ A.

2. Empty set is a _____________
a) Invalid set
b) Infinite set
c) Finite set
d) None of the mentioned
View Answer

Answer: c
Explanation: Empty set is a finite set.

3. If A, B and C are any three sets, then A – (B ∪ C) is equal to _____________
a) (A – B) ∪ (A – C)
b) (A – B) ∪ C
c) (A – B) ∩ (A – C)
d) (A – B) ∩ C
View Answer

Answer: c
Explanation: it is De’ Morgan law.
advertisement
advertisement

4. A = {x: x ≠ x} represents?
a) {0]
b) {1}
c) {}
d) {x}
View Answer

Answer: c
Explanation: That is a fact.

5. If A, B, C be three sets such that A ∪ B = A ∪ C and A ∩ B = A ∩ C, then?
a) A=B
b) A=C
c) B=C
d) A=B=C
View Answer

Answer: c
Explanation: Transition Law.
Note: Join free Sanfoundry classes at Telegram or Youtube

6. The number of proper subsets of the set {1, 2, and 3} is?
a) 8
b) 6
c) 7
d) 5
View Answer

Answer: b
Explanation: Number of proper subsets of the set {1, 2, 3) = 23 – 2 = 6.

7. If A and B are any two sets, then A ∪ (A ∩ B) is equal to _____________
a) A
b) B
c) A^C
d) B^C
View Answer

Answer: a
Explanation: A ∩ B ⊆ A Hence A ∪ (A ∩ B) = A.
advertisement

8. If A, B and C are any three sets, then A × (B ∪ C) is equal to _____________
a) (A × B) ∪ (A × C)
b) (A × B) ∩ (A × C)
c) (A ∪ B) × (A ∪ C)
d) None of the mentioned
View Answer

Answer: a
Explanation: It is distributive law.

Sanfoundry Global Education & Learning Series – Compilers.

advertisement

To practice all areas of Compilers for Freshers, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.