CS508MidtermSolvedCurrentSubjectivePapersWithrefernces.pdf

Verified academic study resource for CS508 (Modern Programming Languages) under the Computer Science at Virtual University of Pakistan. This PDF document (Midterm Solved Past Paper & Revision File) covers Mid-Term Exam Scope (Lectures 1 to 22) spanning approximately 240 pages across 4 curriculum modules, and is indexed for student examination review with instant in-browser preview and 100% free direct download.

Course
CS508 – Modern Programming Languages
Faculty
Computer Science
Format
PDF
Type
Midterm
Coverage
Mid-Term Exam Scope (Lectures 1 to 22)

Focus on core definitions and repeated MCQs from Lectures 1–22. Remember that scoring in the First Half builds your safety buffer toward the mandatory 20% Two-Half passing rule in CS508.

What this file covers — CS508 syllabus roadmap

  1. Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
  2. Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
  3. Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
  4. Midterm Consolidation, Strings & Algorithm Synthesis — Lectures 19 to 22 (Pages 216 to 280). Midterm Exam Culmination (Lectures 1–22 Scope)

Frequently asked questions

Where can I download CS508MidtermSolvedCurrentSubjectivePapersWithrefernces.pdf for free?

You can preview and download "CS508MidtermSolvedCurrentSubjectivePapersWithrefernces.pdf" (CS508 PDF, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs508midtermsolvedcurrentsubjectivepaperswithrefernces-pdf-2) with 100% free high-speed downloads and zero registration requirements.

What syllabus chapters and lectures are covered in this CS508 file?

This document covers Mid-Term Exam Scope (Lectures 1 to 22) across 4 distinct lecture units (Lectures 1 to 6, Lectures 7 to 12, Lectures 13 to 18, Lectures 19 to 22), featuring comprehensive definitions, solved objective questions, and examiner marking rubrics.

What is the passing criteria for CS508 under the VU 20% Two-Half Rule?

Under official Virtual University regulations, students must score at least 20% in the First Half (Quizzes, Assignments, GDBs, and Midterm combined) AND independently at least 20% in the Final-Term examination paper. Scoring under 20% in the final exam results in an automatic F grade regardless of earlier marks.

Are CS508 solved past papers and handouts verified for 2026 exams?

Yes. All CS508 materials on MIHORA VU—including Moaaz, Waqar Siddhu, and team archives—are reviewed against the current VU syllabus to help students prepare for 2026 Midterm, Final-Term, and online quiz examinations.

Inside this file

                       CS508 Midterm Subjective Solved with References

                           Include Current Midterm Papers Year 2013
                            Solved by: Saher (Well Wisher / Aqualeo)

                                    www.saher-it-soutions.com
                                 Midterm Paper Year 2013

Q. What will be choice of language in functional program paradigm?
Answer:                                                      Page no : 63

Functional programming is a style of programming that emphasizes the
evaluation of expressions, rather than execution of commands. The expressions in
these languages are formed by using functions to combine basic values. A
functional language is a language that supports and encourages programming in a
functional style. LISP is a representative language of this style of programming.

Q. Tell the names of operates that are present in Ada but not in C++

Answer:                                                      Page no : 47

Remainder                Rem

AbsoluteValue            Abs

Exponentiation            **

Range                       ..

Membership                In

String Concatenation &

Q. Tell the difference between first,rest,car,cdr?

Answer:             Page no : 67

First (or car) is a list selector. It takes list as argument and return first element of
list.

Rest(or cdr) is a list selector. It takes list as argument and return whole list after
excluding first element.

Q. Tell the out put if

www.saher-it-solutions.com | solved by Saher

     defun y-min (x)(- x,y)

     set y 2

     y-min 20

Answer:                      Page no : 69

(y-min 20)

(setq y 2 )

20-2= 18

Q1 Write two predicate that are used in lisp. Marks 2

Answer:                        Page no : 68

Some other useful predicates are listed below:

atom: test if x is an atom

listp: test if x is a list

Also number, symbolp, null can be used to test whether the operand is a number,
symbol, or a null value.
Q2 Lists are used in lisp write top elements of the list given as (add 3( multp 3
4))
and (job car school) Marks 3

Answer:                  Page no : 64

3 and (3 4 ) are top element in first list while job , car and school are top
elements in second list.

Q3 write a two dimensional array of siz (2x8) in sonobl and intialize it to
zero.Marks 3

www.saher-it-solutions.com | solved by Saher

Answer:

N=ARRAY(‘2,5’,0)

Q4 We want to write a program in ada and want to take marks as inputs from
user and
subject 1=(100)
subject 2=(200)
subject 3=(400)
Answer:

with Ada.Text_IO; use Ada.Text_IO;
procedure Subject is
  S1: String(1 .. 100)
  S2: String(1 .. 200)
  S3: String(1 .. 400)
  Last: Integer;
begin
  Put_Line("Subject1:");
  Get_Line(S1, Last);
  Put_Line("Subject2:");
  Get_Line(S2, Last);
  Put_Line("Subject3:");
  Get_Line(S3, Last);

end Subject;

How we prevent user to input value that is not in this range?

Which symbol is used for alternation in Snobol?

Answer:                          Page no : 36

Vertical bar is used to specify pattern alternation as shown in the example below.

www.saher-it-solutions.com | solved by Saher

P1 | P2

This is example of a pattern that will match either P1 or P2.

Overloading in ada and c++?

Answer:                              Page no : 48

Ada allows a limited overloading of operators. The exception in Ada is that the
assignment operator (:=) cannot be overridden. It can be overridden in case of
inheritance from a special kind of “abstract class”. When you override the
equality operator ( =) you also implicitly overridethe inequality operator (/=).

"Single standard language"

Answer:                Page no : 45

The need for a single standard language was felt in 1975 and the draft
requirements were given the code name strawman. Strawman was refined to
Woodman and then Tinman in 1976. It was further refined to ironman. At that
time proposals were invited for the design of a new language. Out of the 17
proposals received, four were selected and given the code names of green, red,
blue, and yellow. Initial designs were submitted in 1978 and red and green short
listed on the basis of these designs. Standard requirements were then refined to
steelman. The designs were refined further and finally Green was selected in
1979. DoD announced that the language will be called Ada. The 1995 revision of
Ada (Ada 95) was developed by a small team led by Tucker Taft. In both cases, the
design underwent a public comment period where the designers responded to
public comments.

1. what is the functionality of KEYWORD INT|CAHR IN snobol4 2

Answer:                 Page no : 36

KEYWORD = ‘INT’ | ‘CHAR’ This statement assigns the pattern ‘INT’ | ‘CHAR’ to
the variable KEYWORD.

www.saher-it-solutions.com | solved by Saher

2.what is error in it >(sqrt x) in LISP 3

Answer:                   Page no : 65

X is unbound because this symbol doesn’t have any value we will have to assign a
value using setq, setf and set.

>(setq x 3) = 3

3. How many element in it (a (d e)) related to lisp 2

Answer:                 Page no : 64

There are two elements in this list a and (d e)
what is predicate in lisp ?

Answer:

Predicate is a special function which return nill if predicate is not true and returns
T otherwise. Comparative operators are used as functions for numerical values
e.g = < > <= >=. Equal or eq are used for comparing non numeric values. Atom ,
Lisp , Symbolp , number , null are other useful predicates used to find out
whether x is a atom , list , symbol number or null.

What is valid or invalid statement in ADA language 5
a=(1....5) integer
b=(1....5) integer
c,d=(1....5) float
condition
a=b
a=c
b=a
Answer:

a : integer (1..5); , //syntax is valid

a=c    // condition is invalid

www.saher-it-solutions.com | solved by Saher

The proposal of ada is proposed by which company.

Answer:                      Page no : 45

DoD announced that the language will be called Ada.

Explain briefly the expression of the LISP language.

Answer:

An S-expression(S stands for symbolic) is a convention for representing data or an

More CS508 files

All CS508 files · Midterm Prep 2026 · MCQs Bank