Explain where you use + operator in Prolog?



 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

Post New Answer

More AI Languages Interview Questions

 Which keyword is used to construct an array in LISP? a) Array b) Make-array c) Bins d) Make

1 Answers  


 What is the output of the following statement? * (setf meals ‘(breakfast lunch tea dinner)) * (first meals) a) Breakfast b) Lunch c) Tea d) Dinner

1 Answers  


Which is used to build the lisp procedures? a) Data b) Primitives c) Definition d) None of the mentioned

1 Answers  


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

1 Answers  


Explain what is List structures in Prolog?

1 Answers  






Which forms can be constructed with the same primitives that manipulate lisp expressions? a) Lisp b) Macro c) Procedure d) Defun

1 Answers  


 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

1 Answers  


Which enables storage in procedurally indexed places in LISP? a) Defstruct b) Object c) Structure d) None of the mentioned

1 Answers  


. 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

1 Answers  


 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

1 Answers  


 Which require sophisticated precedence compputation? a) Superclass b) Multiple Superclass c) Subclass d) None of the mentioned

1 Answers  


 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

1 Answers  


Categories