Array and Strings – Algebra – Problem #11

IIT Kharagpur CS10001 / CS11001 Programming and Data Structures Lab Question Archive

Difficulty: medium

Problem Statement

Consider two sets A and B containing a and b non-repeating integers respectively. Write a program which first reads two integers a and b. Assume a. b <100. The program then reads a and b number of integers and stores them in arrays A and B. The program should next print: i. The elements of union of sets A and B. (without repeating elements) ii. The elements of intersection of sets A and B. iii. The elements of A - B (i.e., the elements that are present in A but not in B).

Back to Lab Problems
Array and Strings/Algebra/Problem #11

Lab Problem Statement

Specifications & Problem DetailsIIT Kharagpur PDS Archive
Loading question...

Interactive C Compiler · Problem #11

WASM In-Browser

Runs directly on your machine · Zero remote server dependency

Compiler downloads on first Run (large, saved in your browser after that)
main.cCtrl + Enter to run
1
2
3
4
5
6
7
Input (stdin)given to scanf / cin
Output

Output appears here. Press Run to compile and execute.