Mention what is the difference between Prolog and normal programming language?
Answer / chaitanya
Prolog: It is a “declarative programming” language which means that you have to specify the goals, but not the strategy to reach the goal. It figures it out on its own.
Normal Programming language: Languages like C/C++/Java/Python are imperative (IP) languages that does specify instructions of how to reach some goal, but leaving the real goal implicit
Is This Answer Correct ? | 4 Yes | 0 No |
What are the variables that are bound and that have values assigned to them? a) Data b) Variable c) Parameters d) None of the mentioned
Explain what is LISP? Give an example of some of the popular applications built in LISP?
What is the output of the given statement? * (setf pressure -3) * (when-plusp pressure (print ‘alarm)); a) T b) Nil c) Alarm d) None of the mentioned
What is the output of the following statement? * (cdr ‘(a b c)) a) a b) B c) (B C) D) None of the mentioned
What will happen if the value of all the test-forms are nil? a) Nothing b) COND form is nil c) Both a & b d) None of the mentioned
What is the output of the given statement? * (defstruct person (sex nil) (personality ‘nice)) * (setf person-instance-1 (make-person)) * (setf person-instance-2 (make-person :sex ‘female)) a) Person :sex female :personality nice b) Person :sex c) Sex:Female d) None of the mentioned
Explain where you use + operator in Prolog?
Explain what is slot and what are the most commonly used slot options?
Which notation facilitates uniformity in lisp? a) Prefix b) Postfix c) Infix d) None of the mentioned
Which symbol holds the first element and also an index in LISP? a) Nail b) Tail c) Initial d) All of the mentioned
Explain what is LISP constants?
Which can build new lists by depositing pointers in free boxes? a) Do b) Dobuild c) Cons d) None of the mentioned