100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

Programming Languages: Final Exam Review Guide/ Qs & Ans/ .

Rating
-
Sold
-
Pages
22
Grade
A+
Uploaded on
25-06-2024
Written in
2023/2024

Programming Languages: Final Exam Review Guide/ Qs & Ans/ .

Institution
Programming Languages
Course
Programming Languages










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Programming Languages
Course
Programming Languages

Document information

Uploaded on
June 25, 2024
Number of pages
22
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Content preview

Programming Languages: Final Exam
Review Guide/ Qs & Ans/ 2024-2025.
Strong typing and weak typing. Static typing and dynamic typing. (Examples.
Why). - Answer: Strong Typing - a language is said to be strongly typed if it
prohibits, in a way that the language implementation can enforce, the application
of any operation to any object that is not intended to support that operation to
any object that is not intended to support that operation. (e.g., Java, C++,) Ruby is
strongly typed because once it knows the type of an object, it expects you to do
something that makes sense with it.
Ex:
x = "3"
y = x + "ho!"
#=> "3ho!"


but

,x = "3"
y=x+3
will produce an error.
------------------------------------------Weak Typing - a language that is being lenient
about what you can do with your typed variables. Javascript, however, is
dynamically but weakly typed because it lets you mix types together in your
expressions without throwing an exception. The danger? If you're not careful you
will get weird results.
----------------------------------------
Statically Typing - a language is said to be statically typed if it is strongly typed and
type checking can be performed at compile time.language has a type system that
is checked at compile time by the implementation (a compiler or interpreter) and
it is strongly typed. (e.g. Ada, Pascal, Lisp)
------------------------------------------
Dynamic Typing - Dynamic type checking is a form of late binding, and tends to be
found in languages that delay other issues until run time as well. (e.g., Python,
Ruby, Lisp)


Some languages have both static and dynamic type checking.
- Pascal, Java etc are mostly static typing.
- Python, PHP, and most script languages are dynamic typing.
- C++ are combined (support dynamic casting)

, Reference variables and value variables. - Answer: Reference Variable - It provides
an alias (alternative name) for a previously defined variable. References cannot be
null because every reference refers to some object.
Ex: int foo;
int& bar = foo;
bar is now a reference which means that bar holds the location of memory where
foo lies.


Value Variable -
d = a;
a = b + c;
In the first statement, the right hand side of the statement refers to the value of a,
which we wish to place into d. In the second statement, the left hand side refers
to the location of a, where we want to put the sum of b and c.


•Variables as values vs. variables as references
-value-oriented languages
•C, Pascal, Ada
-reference-oriented languages
•most functional languages (Lisp, Scheme, ML) •Clu, Smalltalk
-Algol-68 kinda halfway in-between -Java deliberately in-between
•built-in types are values •user-defined types are objects - references

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Studyresource1 Teachme2-tutor
View profile
Follow You need to be logged in order to follow users or courses
Sold
7243
Member since
1 year
Number of followers
24
Documents
1361
Last sold
3 weeks ago
EXCELLENT TUTOR.

Veteran teacher / Tutor with years of experience planning and implementing study documents, case studies, test banks and all kinds of exams questions with well articulated answers for students. Passionate and highly effective with success in study guide strategies to develop students\' academic skills and raise test scores.

4.6

708 reviews

5
490
4
148
3
58
2
10
1
2

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions