- Type
- Quiz
- Course
- CS304P Object Oriented Programming (Practical)
- Size
- PDF 853 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 1, 2, 3 of 5. Download the file for all 5 pages.
Q1. Everything in LISP is considered as a __________.
Correct answer: Symbol
Q2. While eliminating repeated elements of list in PROLOG, each element should be replaced with:
Correct answer: Single copy of the same element
Q3. How many times the value of a PROLOG variable can be changed after first assignment?
Correct answer: Zero (Can not be changed)
Q4. Which of the following are the types of constants in PROLOG?
Correct answer: atoms and numbers
Q5. All the variables in PROLOG clauses/predicates are:
Correct answer: Global
Q6. In a PROLOG program, the names of all relationships and objects must begin with:
Correct answer: Lowercase letter
Q7. Which of the following statement in LISP is used to list all properties of symbol ‘k’?
Correct answer: >(symbol-plist ‘k)
Q8. The correct way to write Goal for following statement in PROLOG is _________________. "Which medicine relieves in diarrhea?"
Correct answer: relieves (M, diarrhea).
Q9. Basic elements of a program in PROLOG are:
Correct answer: Predicates and rules
Q10. Following statement in PROLOG is considered as ______________________. "unsuitable_for(Person, Drug) :- aggravates(Drug, Condition), suffers_from(Person, Condition)."
Correct answer: Rule
Q11. Which of the following function is used to add an element to the end of a vector?
Correct answer: push_back()
Q12. How can you define a class template in C++?
Correct answer: template<typename T> class MyClass { ... };
Q13. A class with pure virtual function is called ________ class.
Correct answer: abstract
Q14. In case of public inheritance between Base class A and Derived class B, which of the folllowing data members of Base class will be hidden in Derived class?
Correct answer: private
Q15. Which of the following is the correct syntax for creating a template class X friend of a template class Y?
Correct answer: friend X<T>;
Q16. There are ________ types of inheritance in C++.
Correct answer: 4
Q17. Which of the following is the correct syntax to declare a vector of type int?
Correct answer: vector<int> sampleVector;
Q18. Which of the following is not the correct type of inheritance in C++?
Correct answer: secret
Related CS304P files
All CS304P files →Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.