- Type
- Final term past paper
- Course
- CS508 Modern Programming Languages
- Size
- PDF 937 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extension for 30 a day.
Preview text
Text from pages 1, 2, 3 of 40. Download the file for all 40 pages.
Q.No.1 Write three concepts which are introduced in LISP first time?
- Conditionals: such as if-then-else construct.
- Function types: where functions are just like integers and strings
- Recursion: first language to support it.
- Dynamic typing: all variable are pointers.
- Garbage-Collection.
- Programs composed of expressions.
- A symbol type.
- The whole program is a mathematical function
Q.No.2 Write a function in LISP to concatenate two lists List a=(3 4 5) List b=(c d 6)
>(append '(3 4 5) '(c d 6)) (3 4 5 c d 6)..concatenated List
Q.No.3 Ada is strongly typed language describe how?
ADA is strongly typed. A programming language is strongly typed if type errors are always detected and in ADA Errors can be signaled as exceptions and handled explicitly.
automatically caught and handled through this exception mechanism, improving program reliability.
Q.No.4 How can we determine the size of Array in SNOBOL?
In SNOBOL, The size of the array can be determined at run time by using input from the system of using a variable. Example: A = ARRAY(INPUT)
Q.No.5 In C++ ^ and ~ are used for bitwise exclusive OR and bitwise NOT write there equivalent in ada
^ bitwise exclusive OR of c++ = Xor in ADA.. ~ = Not in ADA
Q.No.6 What code in LISP language used to compute power of x to y?
(defun power (x y) (if (= y 0) 1 (* x (power x (1y))))) This function computes the power of x to y. That is, it computes xy by recursively multiplying x with itself y number of times. Example; >(power 3 4)
Q.No.7 A code was given about ADA case concept. Please refer topic "Case statement”
case expression is
when choice list =>
sequence-of-statements
when choice list =>
sequence-of-statements
when others =>
sequence-of-statements end case;
Q.No.8 Name functions that are used in List construction
Lists can be created and extended with the help of three basic functions.
- cons,
- list
- append
Q.No.9 Write IO header file for Ada.
with Ada. Text_Io; -- intent to use use Ada. Text_Io; -- direct visibility
Related CS508 files
All CS508 files →- CS508 Final Term Solved File 1 by Team Hadi Final term PDF 3.1 MB
- CS508 Final Term Solved File 2 by Team Hadi Final term PDF 1.3 MB
- CS508 Final Term Solved File 5 by Team Hadi Final term PDF 7.1 MB
- CS508 Final Term Solved File 3 by Team Hadi Final term PDF 1.6 MB
- CS508 Highlighted Handouts by Mickey Ch Highlighted PDF 1.7 MB
- CS508 Quiz 1 by VU Topper RM Quiz PDF 698 KB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.