Pages

Friday, August 16, 2013

Viva Questions-LISP


LISP Inventor?  

                           John McCarthy 

Lisp Stands for?
            LISt processing.

LISP Application?
                 artificial intelligence (AI) research
Differences between 'compiler'  and '

interpreter'   ?

          Both are translators.

How to print a message in LISP?
          
          (print 'Enter the Limit')

How to read a variable in LISP?

          (setf   l(read))

How to create an array in LISP?

          (setf  a(make-array l))

How to create an array with size 50 in LISP?

          (setf  a(make-array 50))                       



How to read an array in LISP?
          (setf   (aref a i)(read))


What is the syntax for 'for-loop' in LISP?

          (dotimes (i n))

or 
          (loop for ............)



How to 'comment' a line in LISP?

          ;  (print  'hi')

If LISP language is a compiler or interpreter?

         Interpreter


How to define a function in LISP?


        (defun sum(arguments))


How to call a function in main() ?

        (partision a b)



Will continue...........


  •    



No comments:

Post a Comment