The Gateway to Computer Science Excellence
0 votes
548 views

Which one of the following describes the syntax of prolog program?

  1. Rules and facts are terminated by full stop(.)
  2. Rules and facts are terminated by semi colon(;)
  3. Variables names must start with upper case alphabets.
  4. Variables names must start with lower case alphabets.
  1. I, II
  2. III, IV
  3. I, III
  4. II, IV
in Others by Veteran (105k points)
recategorized by | 548 views

2 Answers

+1 vote

In Prolog Variables begin with an uppercase letter. Predicate names, function names, and the names for objects must begin with a lowercase letter. 
and Rules and facts are terminated by full stop (.)

ans is C

by Active (1.9k points)
0 votes

Ans: C

Clause (representing fact or rule) in Prolog is terminated by full stop (.)

Variable names are formed similar to function and predicate names but it must start with upper case letter. Normally, we use X, Y, Z, ... for variables.

ref: http://www.cse.iitd.ac.in/~saroj/LFP/LFP_2013/L8.pdf

by Loyal (7.2k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,648 questions
56,430 answers
195,214 comments
99,931 users