Professional Documents
Culture Documents
Sample OBE Questions
Sample OBE Questions
0 1 2 3
0 12 5 8 10
1 6 7 4 11
2 18 9 2 1
3 20 3 15 13
2. Walid is excited about going to the cattle market with his father and brother to buy cows for Eid-
ul-Adha. They plan to buy three similar (in height, weight and color) cows from a seller. While
roaming around the market, they found a seller who has assigned ratings to his cows based on
their height, weight and color. Walid along with his father and brother has decided to buy the
three cows having the minimum difference between their ratings. Now, you must identify the
proper data structure concept for this (which concept you need to follow). Write a C++ Program
for Walid to find the difference in ratings between three cows.
3. Write a program with appropriate data structure to keep records of 10 students. Each student will
have the following information: Unique ID (you can use integer for this), Number of Credits
Completed, CGPA
Print all the student’s ID whose CGPA is more than 3.75.
Print all the student’s ID who has completed more than 50 credits.
4. You are designing a text editor that includes a feature to check the validity of parentheses in a
given text. Your task is to implement a function that checks whether the parentheses in the text
are balanced or not. For example, "((())())" is a valid sequence of parentheses, whereas "())(" is
not.
5. You're working on a program that manages a library inventory system. The system stores
information about books in an array, with each element containing details like title, author, and
publication year. A user wants to search for a specific book by title. You need to efficiently locate
the book within the array if it exists and inform the user accordingly.