Explain where you use + operator in Prolog?
Answer / chaitanya
Operator + can be used to negate goals; these are either sub-goals in the body of a rule or sub-goals of a query. We cannot negate facts or the heads of rules.
Is This Answer Correct ? | 0 Yes | 0 No |
Which keyword is used to construct an array in LISP? a) Array b) Make-array c) Bins d) Make
What is the output of the following statement? * (setf meals ‘(breakfast lunch tea dinner)) * (first meals) a) Breakfast b) Lunch c) Tea d) Dinner
Which is used to build the lisp procedures? a) Data b) Primitives c) Definition d) None of the mentioned
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 List structures in Prolog?
Which forms can be constructed with the same primitives that manipulate lisp expressions? a) Lisp b) Macro c) Procedure d) Defun
What is the output of the following statement? * (setf meals ‘(breakfast lunch tea dinner)) * (cons (first meals) (last meals)) a) Breakfast b) Lunch c) Dinner d) Both a & c
Which enables storage in procedurally indexed places in LISP? a) Defstruct b) Object c) Structure d) None of the mentioned
. What is the output of the given statement? * (setf high 98 temperature 102) * (when (> temperature high) (setf high temperature) ‘new-record) * high a) 98 b) 102 c) new d) Error
What is the output of the given statement in LISP? * (Setf part-bins (make-array ‘(4))) a) #Done b) #4 c) #(0 0 0 0) d) None of the mentioned
Which require sophisticated precedence compputation? a) Superclass b) Multiple Superclass c) Subclass 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)) * (setf (person-surname person-instance-1) ‘winston) a) Winston b) Nil c) T d) Error