Modern Programming Languages MCQs with Answers
Practice important Modern Programming Languages MCQs with answers and explanations.
Multiple Choice Questions
Q461: What does the predicate aggravates(Drug, Condition) signify in Prolog?
- A: The drug helps alleviate the condition
- B: The drug causes the condition
- C: The drug is unrelated to the condition
- D: The drug cures the condition
View Answer
B
Q462: In Prolog, which built-in feature generates readable and maintainable code?
- A: Syntax analysis
- B: Tree formation and backtracking
- C: Type checking
- D: Optimization
View Answer
B
Q463: Ali suffers from peptic ulcers. Which drug is suitable for his headache?
- A: aspirin
- B: new_med
- C: anti-diarrhea
- D: penicilline
View Answer
B
Q464: Which of the following is NOT a use case for Prolog?
- A: Language processing
- B: Game playing
- C: Operating system development
- D: Knowledge representation
View Answer
C
Q465: Which of the following is a side effect of "aspirin"?
- A: diabetes
- B: fever
- C: peptic_ulcer
- D: nasal_congestion
View Answer
C
Q466: Fill in the blank: Prolog uses ______ to avoid infinite loops caused by left recursion.
- A: efficient type-checking
- B: backtracking
- C: tree formation
- D: strict standardization
View Answer
B
Q467: In the clause should_take(Person, Drug), what does the predicate not(unsuitable_for(...)) check?
- A: Whether the drug relieves a symptom
- B: Whether the drug aggravates a condition
- C: Whether the drug is suitable for the person
- D: Whether the person complains about the drug
View Answer
C
Q468: What type of programming language is Prolog?
- A: Object-oriented
- B: Functional
- C: Declarative
- D: Procedural
View Answer
C
Q469: Which drug is used to relieve severe pain?
- A: aspirin_codine_combination
- B: bis_cure
- C: penicilline
- D: de_congest
View Answer
A
Q470: What feature of Prolog makes it easier to achieve inference tasks compared to imperative languages?
- A: Built-in tree formation and backtracking
- B: Case sensitivity
- C: Optimization techniques
- D: Code modularity
View Answer
A