0% found this document useful (0 votes)
35 views

Moderen Programming Languages

The student document declares that the student, Ramsha Sarwar with registration number 19-arid-336, will not engage in cheating, copying or plagiarism on the midterm exam for the course Modern Programming Languages. The student takes full responsibility for their conduct and understands the institute can take disciplinary action if found engaging in prohibited activities. The exam consists of 10 short answer questions worth a total of 12 marks.

Uploaded by

Ishita hamdani
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Moderen Programming Languages

The student document declares that the student, Ramsha Sarwar with registration number 19-arid-336, will not engage in cheating, copying or plagiarism on the midterm exam for the course Modern Programming Languages. The student takes full responsibility for their conduct and understands the institute can take disciplinary action if found engaging in prohibited activities. The exam consists of 10 short answer questions worth a total of 12 marks.

Uploaded by

Ishita hamdani
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Student Declaration

I RAMSHA SARWAR Registration No. 19-arid-336 , hereby declare

that by attempting the paper for the course Modern Programming Languages, I will not be

involved in any kind of cheating/copying/plagiarizing in solving the short questions based

paper of Mid Term Examination Fall2020. I take full responsibility of my conduct. If I found

involved in any kind of such activity of cheating/copying/plagiarizing, then Institute reserves

the right to take any disciplinary action against me.

Student Signature
Mid Exam / Fall 2020 (Paper Duration 24 hours)
(Online Assignment Based Question Paper)

Course No.: CS-432 Course Title:Modern Programming Languages


Total Marks: 12 Date of Exams: 5/12/2020
Degree: BSCS Semester: 4th Section:A
Marks
Q.No. 1 2 3 4 5 6 7 8 9 10 Obtained/
TotalMarks
Marks
Obtained
Total Marks in Words:
Name of the Teacher: SAJJAD ABBAS
Who taught the course:Signature of Teacher / Examiner:

To be filled by Student

Registration No.: RAMSHA SARWAR Name: 19-ARID-336

(THEORETICAL/PRACTICAL EXAMINATION)

Answer the following questions.


Q.No.1. “The tools we use have a profound (and devious!) Influence on our
thinking habits, and, therefore, on our thinking abilities.” What do you say?
(02)
Answer
“The tools we use have a profound (and devious!) Influence on our thinking habits, and,
therefore, on our thinking abilities.”
In the above statement it is said that if I am a programmer, the language/tool in which I have
a grip or I do my work that language/tool influence my thinking habits or thinking abilities.
I say YES, this statement is true because when i give most of my time to that language or tool
to do my work, it always effect in my normal life thinking pattern or ways. Basically the
language in which I do my work, the depth of that language or the way of my thinking are co-
relate with each other. By this my thinking ability will definitely hurt.
Example:
Suppose if I am a web developer for which I make an algorithm and do things professionally
than this tool will influence my thinking because I will think to do every think professionally.
Q.No.2. How to compare and examine Programming languages? (02)
Answer
We can compare and examine the programming languages on the basic criteria that include:
 Readability:
One of the important criteria for examine a programming language is that the ease with
that programs can be read and understood. In readability the selection of language for a
task is depend upon following:
 Simplicity
 Orthogonality
 Control Statements
 Data types and data structures
 Syntax Consideration
 Writability:
It is the measure of how easily a language can be used to create the programs for a chosen
problem domain. It also support for abstraction.
 Reliability:
A program is said to be reliable if it performs its specifications under all conditions.
Following are the features that have significant effect on it:
 Aliasing
Q.No.3. Compare C++ with Java. (03)
Answer
C++ Java
C++ is platform-dependent. Java is platform-independent.
C++ is mainly used for system programming Java is mainly used for application programming. It is
widely used in window, web-based, enterprise and mobile
applications.
 C++ supports multiple inheritances. Java doesn't support multiple inheritances through class. It
can be achieved by interfaces in java.
C++ is an compiled language  java is an compiled and interpreted language
C++ code is not portable. It must be compiled Java, however, translates the code into byte code. This
for each platform.  byte code is portable and can be executed on any
platform. 
C++ supports virtual keyword so that we can Java has no virtual keyword. We can override all non-
decide whether or not override a function. static methods by default. In other words, non-static
methods are virtual by default.
Support the goto statement. Does not support the goto statement.
Cin and Cout are used for I/O. System.in and System.out.println used for I/O.
powerful capabilities of language feature-rich, easy to use standard library
#include <iostream> class first{
using namespace std; public static void main(String args[]){
int main() { System.out.println("Hello Java");
cout << "Hello World!"; }
return 0; } }
Some popular C++ applications ar, Chrome, Some popular Java applications are JPC, UltraMixer,
Windows XP, Windows 7, Microsoft Office, Project Looking Glass, Sun SPOT, Eclipse, Netbeans
Internet Explorer, etc IDE, etc.
Q. No. 4: How object oriented languages evolve? Describe briefly. (03)
Answer:
Evolution of OOP
The OOP (Object Oriented Programming) approach is most commonly used approach now
days. OOP is being used for designing large and complex applications. Before OOP many
programming approaches existed which had many drawbacks.
These programming approaches have been passing through revolutionary phases just like
computer hardware. Initially for designing small and simple programs, the machine
language was used. Next the Assembly Language which was used for designing larger
programs. Both machine and Assembly languages is machine dependent. Next Procedural
Programming Approach which enabled us to write larger and hundred lines of code. Then in
1970, a new programming approach called Structured Programming Approach was
developed for designing medium sized programs. In 1980's the size of programs kept
increasing so a new approach known as OOP was invented.
1) Monolithic Programming Approach
2) Procedural Programming Approach
3) Structured Programming Approach
4) Object Oriented Programming Approach
Monolithic Programming Approach: In this approach, the program consists of sequence of
statements that modify data. All the statements of the program are Global throughout the
whole program. The program control is achieved through the use of jumps i.e. goto
statements. The programming languages like ASSEMBLY and BASIC follow this approach.
Procedural Programming Approach: This approach is top down approach. In this approach,
a program is divided into functions that perform a specific task. Data is global and all the
functions can access the global data. Program flow control is achieved through function calls
and goto statements. This approach is mainly used for medium sized applications. The
programming languages: FORTRAN and COBOL follow this approach.
Structured Programming Approach: The basic principal of structured programming
approach is to divide a program in functions and modules. The use of modules and functions
makes the program more comprehensible (understandable). It helps to write cleaner code
and helps to maintain control over each function. This approach gives importance to
functions rather than data. It focuses on the development of large software applications.
The programming languages: PASCAL and C follow this approach.
Object Oriented Programming Approach: The OOP approach came into existence to
remove the drawback of conventional approaches. The basic principal of the OOP approach
is to combine both data and functions so that both can operate into a single unit. Such a unit
is called an Object. Using this approach we can write any lengthy code. This approach
secures data also. Now a day this approach is used mostly in applications. The programming
languages: C++ and JAVA follow this approach.
Q. No. 5: Discuss features of SNOBOL Programming language? (02)
Answer:
SNOBOL :
It is String Oriented Symbolic Language. The SNOBOL is a special purpose language for
string manipulation and handling
SNOBOL Features
1. Dynamic typing
2. Mixing arithmetic and string operations
3. String operations including concatenation
4. GOTO control structure
5. Overloaded operators
6. Space as an operator
7. Run-time compilation
8. Code can be embedded in data, allowing easy run-time extension of programs
9. Variable length string
10. Array tables and record type objects
11. Absence of declaration
12. Operator overloading.

You might also like