Common Lisp Interview Questions for Freshers/Common Lisp Interview Questions and Answers for Freshers & Experienced

Which notation facilitates uniformity in LISP?

Prefix notation facilitates uniformity in LISP.

Posted Date:- 2021-11-29 09:23:20

Which symbol is used to represent the prompt in LISP?

symbol is used to represent the prompt in LISP.

Posted Date:- 2021-11-29 09:22:32

What is meant by keyword argument in LISP?

keyword argument are function arguments that are passed by keyword, instead of position.Keyword arguments can be mixed with by-position arguments, and default-value expressions can be supplied for either kind of argument:
(define greet
(lambda (given #:last surname)
(string-append "Hello, " given " " surname)))

> (greet "John" #:last "Smith")
"Hello, John Smith"
> (greet #:last "Doe" "John")
"Hello, John Doe"
In above example last is a keyword argument.

Posted Date:- 2021-11-29 09:20:31

List some library for NLP?

Some of the popular NLP libraries are,

NLTK (Natural Language Toolkit) - Probably the most popular NLP library used by millions of developers around the world. Written in python, it has all the functionalities and features to do Natural Language Processing.

SpaCY – An optimized NLP library available in python and CPython. The programs written in spaCY can be easily integrated with deep learning frameworks such as TensorFlow and PyTorch.

Pattern – A data mining library developed for python. It has various NLP tools to parse a variety of data sources from Google, Facebook, Twitter, etc.

TextBlob – Based on NLTK and Pattern the textblob has a good API for common NLP operations.

Posted Date:- 2021-11-29 09:18:46

Write a hello world program in lisp?

The format keyword is used to print values in LISP like printf in C.

//Program for Hello world

(format t "Hello, World!")

Posted Date:- 2021-11-29 09:18:08

What is Common Lisp?

The Common Lisp is a dialect of LISP that was developed as a successor to Maclisp. It is a language specification that is sought to unify and standardize the features of Maclisp dialects. It is a dynamically typed language, general-purpose, multi-paradigm programming language with the file extensions of .lisp, .lsp, .l, .cl, .fasl. It has support for functional, procedural, and object-oriented paradigms. It also includes support for CLOS and Macros.

Posted Date:- 2021-11-29 09:17:03

Explian use of macro in LISP?

Macros in LISP are just a function that is used to define the syntax extension to LISP. Macros transform the LISP code. The macro function takes its arguments as s-expression and it returns the LISP form for it. LISP macros are also used to do things like adding syntactic sugar, build pieces of a program during compile time, generate code, etc. You can define your Macro by using the keyword defmacro.

//syntax

(defmacro macro-name (parameter-list))
body-form

Posted Date:- 2021-11-29 09:16:22

How data types are categorized in LISP?

The Predicates in LISP are functions that test specific conditions on their parameters. It returns non-nil, if the condition is true, or nil if it is false.

Here are some of the predicates in LISP,

* Atom – It checks the argument and returns t if it is atoms or nil.
* Equal – It checks if two arguments are equal and return t if it is. It returns nil if it is not equal.
* Zerop – it checks if the argument is zero and returns t. It returns nil otherwise.
* Null – it returns t if the argument is nil or it returns nil.

Posted Date:- 2021-11-29 09:15:40

What is CDR in LISP program?

In LISP, the data types are categorized into two types.

Scalar Types – It has normal types such as integers, numbers, characters, symbols, etc.

Data Structures – It has complex types such as linked list & other lists. Vectors, bit-vectors, strings, etc.

Posted Date:- 2021-11-29 09:13:26

What is CAR in LISP?

The LSIP programming language has a record structure called a con. It is nothing but a single linked list. In this list, the car is a function that is used to access the first value. The car function extracts the pointer of the first value in the linked list.

The expression (car (con x y)) returns the first value x.

Posted Date:- 2021-11-29 09:12:35

What syntax is used to create a sequence in LISP?

The make-sequence function is used to create a sequence of any type.

//syntax for creating sequence
make-sequence sqtype sqsize &key :initial-element
The sqtype is the type and the sqsize is the length of the sequence. You can also specify some optional values using the :initial-element argument. So each of the elements will be initialized to this value.

Posted Date:- 2021-11-29 09:12:00

Which primitive in LISP tests two arguments to see if their values are the same expression?

Equal primitive in LISP tests two arguments to see if their values are the same expression. It works on both atoms and lists.

Posted Date:- 2021-11-29 09:11:11

What is meant by symbolic expression in LISP?

A symbolic expression as S-expression, sexpr or sexp is a way to represent a nested list of data in LISP.

For example (* 5 (+ 7 3))

Posted Date:- 2021-11-29 09:09:35

What is setq in LISP?

The setq construct is used to assign a value to the variables. It takes a symbol as a variable and assigns it value. Setq is the simple variable assignment statement in the LISP.

//syntax for setq
(set1 var1 val1 var2 val2 ...)
Here, the var1, var2 are the variables, and val1, val2 is the values assigned to the variables.

Posted Date:- 2021-11-29 09:07:54

what are the two pre-defined packages used in LISP?

The two pre-defined packages in LISP are

• Common Lisp: It contains symbols for all the functions and variables defined
• Common Lisp User: It uses the common-lisp package and all other packages with editing and debugging tools

Posted Date:- 2021-11-29 09:03:16

Explain what is the property list in LISP?

In LISP, a symbol represents a data-objects. It consists of component called Property list or plist. LISP enables to assign properties to symbols. A property list is executed as a list within an even numbers of elements.

Posted Date:- 2021-11-29 09:02:32

Explain LISP-Vectors?

Vectors are one-dimensional arrays, therefore, a subtype of array. Vectors and lists together are called sequences. LISP has fixed length variable/ simple vectors as well as variable length vectors which are created with the keywords: adjustable and fill-pointer.

Posted Date:- 2021-11-29 09:01:59

Explain what is the importance of the hash table in LISP?

The hash table data structure denotes a collection of key and value pairs which are arranged based on the hash code of the key. Each item in the hash table has key/value pair and is used to access the items in the collection. When you want to access elements by using a key a hash table is used.

Posted Date:- 2021-11-29 09:01:23

Enlist types of variables available in LISP?

Variables are used to store a value and it is represented by a symbol in LISP. There are two types of variables available in LISP. They are the Global variables and Local variables.

Global variables have the scope throughout the program and they have permanent values throughout the LISP system until a new value is specified to it. They are declared using the defvar construct.

//example of declaring global variables
(defvar x 1) //here ‘x’ is a global variables.

Local variables are defined within a function or procedure and have scope within the function. They can be created using the setq, let, or prog construct.

//example of declaring local variables
(let (variable1 value 1))

Posted Date:- 2021-11-29 08:59:28

Is LISP a functional programming language ?

LG3 is a code Generator for LISP. It generates code that is easy to read and edit on the editor and run on any AutoCAD system.

You can pass commands to LG3 by selecting general operations from the tools menu.

Posted Date:- 2021-11-29 08:45:58

What is macro in LISP?

Macros in the LISP are used to extend the syntax of the LISP. They are just a function that takes an s-expression as input arguments and returns a LISP form. Macros are defined using the construct defmacro. The macro definition consists of the name of the macro, a parameter list, an optional documentation string, and the body of the LISP expression. The LISP expression defines the job that is to be performed by the macro.

Posted Date:- 2021-11-29 08:44:07

What are the number types supported by LISP?

The number of data types in the LISP can be divided into two types. They are Scalar types and Data Structures.

* The Scalar types are called primitive types which include integer, float, cons, symbol, string, vector, subr, byte-code function, etc.

* The Data Structures are the complex types which include lists, vectors, bit-vectors, and strings.

Posted Date:- 2021-11-29 08:42:36

Which notation facilitates uniformity in LISP?

The prefix notation is used to facilitate uniformity in LISP. LISP defines their entire syntax in prefix notation as it can be readily parsed into an abstract syntax tree. The prefix notation has seen a wide application in the LISP s-expressions. Here, the brackets are required as the operators in the language are data.

Posted Date:- 2021-11-29 08:41:49

Which symbol is used to represent the prompt in LISP?

The ">" symbol is used to represent a prompt. You should type after the prompt symbol in the lisp interpreter.

Posted Date:- 2021-11-29 08:41:20

What Are The Two Pre-described Packages Used In Lisp?

The two pre-described applications in LISP are:

* Common Lisp: It consists of symbols for all the capabilities and variables described.
* Common Lisp User: It makes use of the not unusual-lisp package and all different applications with modifying and debugging tools.

Posted Date:- 2021-11-29 08:38:13

Mention what are the three functions required by LISP?

For defining functions, macro named defun is used, it needs three arguments

• Name of the function
• Parameters of the function
• Body of the function

Posted Date:- 2021-11-29 08:37:03

What is LG3 , How to pass commands to LG3

LG3 is a code Generator for LISP. It generates code that is easy to read and edit on the editor and run on any AutoCAD system.

You can pass commands to LG3 by selecting general operations from the tools menu.

Posted Date:- 2021-11-29 08:35:43

What is the full form of LISP?

LISP stand for – List Processing – LISP (or LISP)

Posted Date:- 2021-11-29 08:33:57

What is CLOS in LISP?

CLOS is a conventional lisp object system. It is robust object-oriented programming used for any kind of programming language starting from C, C++, etc.

Posted Date:- 2021-11-29 08:33:21

What is LG3,How to pass commands to LG3?

The LG3 in the LISP is the code generator. In LISP programming, LG3 is used to generate code that is easy to run.

The commands can be passed to the LG3 by selecting the general operations from the menu option in the LG3.

Posted Date:- 2021-11-29 08:32:14

Who is the Founder of LISP Programming

LISP was invented by John McCarthy in 1958.

Posted Date:- 2021-11-29 08:31:20

Who is the Founder of LISP Programming

The slots in LISP are the data that is used to store data or fields. The slot-description is used to define a slot. The slot-description has the form (slot-name slot-option).

The slot-option is followed by the name, expression, and other options. Commonly used slot options are :accessor, :initform, :initarg.

Posted Date:- 2021-11-29 08:30:40

What is LISP Machine (LISPM)

LISP machines are general-purpose computers designed to efficiently run LISP as their main software and programming language, usually via hardware support. They are an example of a high-level language computer architecture, and in a sense, they were the first commercial single-user workstations.

Posted Date:- 2021-11-29 08:29:00

How data types are categorized in LISP?

In LISP, data types are categorized as

• Scalar Types: Number types, Characters, Symbols, etc.
• Data Structure: list, vectors, bit-vectors and strings

Posted Date:- 2021-11-29 08:28:21

What is the programming structure for LISP?

LISP programming structure is composed of symbolic expressions or s-expressions. The s-expression consists of three valid objects

• Atom: It is a number or string of contiguous characters
• Lists : A list is a sequence of atoms or other lists enclosed in parentheses
• String: A group of characters enclosed in double quotation marks is referred as String.
LISP programs can be either run on an interpreter or as a compiled code.

Posted Date:- 2021-11-29 08:27:59

Demonstrate with an example how you can code in LISP?

Almost everything in LISP is a function, even the mathematical operators.

For example, (+ (* 5 3) 1 )

The output will be 16, functions in LISP open and close with parenthesis.

Posted Date:- 2021-11-29 08:27:21

What Is Meant By Keyword Argument In Lisp?

Keyword arguments are characteristic arguments which can be exceeded with the aid of keyword, in place of function. Keyword arguments can be combined with with the aid of-role arguments, and default-cost expressions may be provided for both kind of argument:(outline greet (lambda (given #:closing surname) (string-append "Hello, " given " " surname))) > (greet "John" #:ultimate "Smith") "Hello, John Smith"> (greet #:final "Doe" "John")"Hello, John Doe"In above example closing is a keyword argument.

Posted Date:- 2021-11-29 08:26:32

What Is Meant By Symbolic Expression In Lisp?

The S- expression. The syntactic elements of the Lisp programming language are symbolic expressions, additionally called s-expressions. Both programs and statistics are represented as s-expressions: an s-expression can be both an atom or a listing.

Posted Date:- 2021-11-29 08:25:59

Can I Save My Programs To Files?

Yes, honestly, and the documents are general LISP code so as to run on any AutoCAD system.

Posted Date:- 2021-11-29 08:25:27

What are LISP Vectors?

Lisp Vectors are generally called as one-dimensional arrays. Vectors work as sequences with lists to make the system of data more accessible.

Posted Date:- 2021-11-29 08:25:09

How many types of variables are available in LISP?

There are two types of variables are available in LISP one is lexical variable, and other is special variable.

Posted Date:- 2021-11-29 08:24:19

What is predicate in LISP?

The function used in the system to make the condition false and right is called predicate. It checks the condition for any argument and reverses with false and true conditions based on the result of the discussion.

Posted Date:- 2021-11-29 08:23:38

What is a constant in Lisp?

Like in other programming languages, constants in LISP never change their values during the program execution. They are declared using the defconstant construct.

//example of defining a constant
(defconstant pi 3.14)
Here, the ‘pi’ is a constant and its value will never change throughout the execution of the program

Posted Date:- 2021-11-29 08:23:00

What is Local Variables in Lisp?

The local variables are the variables that are defined within a given procedure. These variables don’t have scope outside the procedure in which it is defined. Parameters and arguments defined within a function definition are also called as local variables. These parameters don’t have scope outside the function definition. Local variables can be created using the setq, let, and prog constructs.

//example of creating local variables
(let ((variable1 value1)))

Posted Date:- 2021-11-29 08:22:09

How many types of arguments are available in LISP?

The arguments in the LISP are the specific data that you pass to a function to do some process. The arguments to a function can be a fixed number of arguments or an arbitrary number of arguments.

Posted Date:- 2021-11-29 08:21:37

For what LISP programming is used for?

LISP can be used for building any type of application, but it is the preferred language for building applications related to Artificial Intelligence, Machine Learning, and other kinds of advanced programming that uses recursive logic.

LISP is also used to customize AutoCAD, and write macros to automate steps.

Posted Date:- 2021-11-29 08:21:20

Enlist few popular applications built in LISP?

Some of the popular applications built with LISP are,

* Emacs editor - It is a code editor that is largely written in LISP except for a few small parts written in C.
* Interleaf - It is a document processing system that can process millions of pages.
* AutoCAD - It is designing software that uses LISP as its scripting software.
* NoteCards - One of the early hypertext systems. Microsoft Bob - A software that provides a user-friendly interface for the Windows system.

Posted Date:- 2021-11-29 08:21:00

Who is the Founder of LISP Programming?

John McCarthy is the founder and developed LISP in 1958. He developed it when he was at the MIT (Massachusetts Institute of Technology).

Posted Date:- 2021-11-29 08:20:23

Why LISP is used for Artificial Intelligence?

LISP is used for Artificial Intelligence for following reasons

• It supports the symbolic programming, and old AI was based on symbols
• LISP is powerful. The code or data distinction is weaker, so it feels more extensible than other programming languages which make it feels like a domain specific language
• It is an excellent prototyping tool and good at tackling problems

Posted Date:- 2021-11-29 08:19:07

What is LISP?

LISP (LISt Processor) is the second-oldest high-level programming language that is still used today. It was first created as a practical mathematical notation for computer programs, but LISP soon became the favored programming language for Artificial Intelligence research. It was designed by John McCarthy.

LISP founded many ideas in computer science such as data structures, automatic storage management, dynamic typing, higher-order functions, recursion, self-hosting compiler, conditionals and more. The source code of the LISP is made up of linked list data structures as they are the major data structures in LISP. Released in the year 1958, LISP is a multi-paradigm, functional, and procedural programming language.

Posted Date:- 2021-11-29 08:18:06

Search
R4R Team
R4R provides Common Lisp Freshers questions and answers (Common Lisp Interview Questions and Answers) .The questions on R4R.in website is done by expert team! Mock Tests and Practice Papers for prepare yourself.. Mock Tests, Practice Papers,Common Lisp Interview Questions for Freshers,Common Lisp Freshers & Experienced Interview Questions and Answers,Common Lisp Objetive choice questions and answers,Common Lisp Multiple choice questions and answers,Common Lisp objective, Common Lisp questions , Common Lisp answers,Common Lisp MCQs questions and answers R4r provides Python,General knowledge(GK),Computer,PHP,SQL,Java,JSP,Android,CSS,Hibernate,Servlets,Spring etc Interview tips for Freshers and Experienced for Common Lisp fresher interview questions ,Common Lisp Experienced interview questions,Common Lisp fresher interview questions and answers ,Common Lisp Experienced interview questions and answers,tricky Common Lisp queries for interview pdf,complex Common Lisp for practice with answers,Common Lisp for practice with answers You can search job and get offer latters by studing r4r.in .learn in easy ways .