MCQ Bank
What data type does the value 3.14 represent in CLIPS?
- A) String
- B) List
- C) Float
- D) Integer
Which of the following functions is used to return the first element of a list in CLIPS?
- A) length$
- B) rest$
- C) implode$
- D) first$
What does the str-index function in CLIPS do?
- A) Returns the length of a string
- B) Converts a string into a list
- C) Concatenates two or more strings
- D) Finds the position of a substring within a string
If you want to compare two String values for equality in CLIPS, which function would you use?
- A) eq
- B) equal
- C) equ
- D) equa
Which of the following is a valid List in CLIPS?
- A) 42
- B) (3 14 15)
- C) TRUE
- D) "apple"
Which function in CLIPS returns the absolute value of a number?
- A) index
- B) abs
- C) length
- D) sqrt
Which of the following CLIPS functions is used to find the square root of a number?
- A) mod
- B) sqrt
- C) abs
- D) length
What is the purpose of the length$ function in CLIPS?
- A) To concatenate two strings
- B) To get the number of elements in a list
- C) To convert a string to a list
- D) To find the length of a string
What does the run command do in CLIPS?
- A) Exits the CLIPS environment.
- B) Initializes the system with facts.
- C) Adds a new fact to the system's working memory.
- D) Starts executing a CLIPS program.
In CLIPS, which data type is used for a sequence of characters enclosed in double quotes?
- A) Symbol
- B) Boolean
- C) List
- D) String
What is the purpose of the reset command in CLIPS?
- A) Stops the current execution without exiting CLIPS.
- B) Defines a function in CLIPS.
- C) Shuts down the CLIPS environment.
- D) Initializes the system with facts.
What is the correct syntax for defining a user-defined function in CLIPS?
- A) (deffunction function-name (parameters) body)
- B) (define function-name (parameters) body)
- C) (deffunction function-name parameters body)
- D) (define function-name parameters body)
Which of the following is NOT a valid data type in CLIPS?
- A) Integer
- B) Void
- C) String
- D) Tuple
What does the mod function in CLIPS return?
- A) The square root of a number
- B) The result of division
- C) The absolute value of a number
- D) The remainder when dividing two numbers
In a CLIPS rule, what does the symbol "=>" represent?
- A) Separator between condition and action
- B) Logical AND
- C) Rule name
- D) Conflict resolution operator
Which of the following is used to remove all facts from the fact list in CLIPS?
- A) clear
- B) reset
- C) remove
- D) delete
When a script is run, where is the output displayed in MATLAB?
- A) Files panel
- B) Command Window
- C) Editor
- D) Workspace
Which construct is used to remove a fact from CLIPS?
- A) retract
- B) delete
- C) discard
- D) remove
What happens when all conditions of a rule in CLIPS are satisfied?
- A) The rule is placed on the Facts Browser
- B) The rule is placed on the Agenda Browser
- C) The rule is placed on the Rules Browser
- D) The rule is placed on the Instance Browser
Which keyword is used to define a rule in CLIPS?
- A) define
- B) createrule
- C) rule
- D) defrule