Garantie de satisfaction à 100% Disponible immédiatement après paiement En ligne et en PDF Tu n'es attaché à rien 4,6 TrustPilot
logo-home
Examen

CS 326 Final

Note
-
Vendu
-
Pages
10
Grade
A+
Publié le
10-08-2025
Écrit en
2025/2026

CS 326 Final − Syntax and semantics − Naming, scopes and bindings − Control flow − Data types − Subroutines - answersGeneral issues in the design and implementation of a language: Mechanism for defining types (syntax, semantics) − Rules for: − type equivalence (when are the types of two values the same?) − type compatibility (when can a value of type A be used in a context that expects type B?) − type inference (what is the type of an expression, given the types of the operands?) - answersA type system consists of: ensure that a program obeys thecompatibility rules - answersType checking violation of compatibility rules - answersType clash − Strong typing - language prevents you from applying an operation to data for which it is not appropriate − Static typing - language has strong typing, and it does type checking at compile time − Dynamic typing - type checking done at run time - answersA language may have: language prevents you from applying an operation to data for which it is not appropriate - answersStrong typing language has strong typing, and it does type checking at compile time - answersStatic typing

Montrer plus Lire moins
Établissement
Cs 326
Cours
Cs 326









Oups ! Impossible de charger votre document. Réessayez ou contactez le support.

École, étude et sujet

Établissement
Cs 326
Cours
Cs 326

Infos sur le Document

Publié le
10 août 2025
Nombre de pages
10
Écrit en
2025/2026
Type
Examen
Contient
Questions et réponses

Aperçu du contenu

CS 326 Final
− Syntax and semantics

− Naming, scopes and bindings

− Control flow

− Data types

− Subroutines - answers✔✔General issues in the design and implementation of a language:



Mechanism for defining types (syntax, semantics)

− Rules for:

− type equivalence (when are the types of two values the same?)

− type compatibility (when can a value of type A be used in a context that

expects type B?)

− type inference (what is the type of an expression, given the types of the

operands?) - answers✔✔A type system consists of:



ensure that a program obeys thecompatibility rules - answers✔✔Type checking



violation of compatibility rules - answers✔✔Type clash



− Strong typing - language prevents you from applying an operation to data for which it is not
appropriate

− Static typing - language has strong typing, and it does type checking at compile time

− Dynamic typing - type checking done at run time - answers✔✔A language may have:



language prevents you from applying an operation to data for which it is not appropriate -
answers✔✔Strong typing



language has strong typing, and it does type checking at compile time - answers✔✔Static typing

, type checking done at run time - answers✔✔Dynamic typing



− Scheme - strong typing, but dynamic

− Smalltalk - strong typing, but dynamic (operations <=> messages

sent to objects)

− Ada - strong and static typing

− Pascal - "almost" strong and "almost" static typing

− C - weaker than Pascal, but static (not much done at run time)

− Java - strong typing, part done at compile time, part at run time - answers✔✔Type Systems Examples



collection of values for a domain - answers✔✔Type: Denotational



internal structure of data, described down to the level

of fundamental types

− built-in types (integer, character, real, etc), also called primitive or

predefined types

− composite types (array, record, set, etc) - answers✔✔Type: Constructive



interface that specifies the operations that can be applied to objects - answers✔✔Type: Abstraction



For writing: FileInputStream , BufferedReader



BufferedReader reader = new BufferedReader(new FileReader("input.txt"));



For Reading: FileOutputStream , PrintWriter



PrintWriter writer = new PrintWriter(new FileWriter("output.txt")); - answers✔✔Java File I/O
$8.49
Accéder à l'intégralité du document:

Garantie de satisfaction à 100%
Disponible immédiatement après paiement
En ligne et en PDF
Tu n'es attaché à rien

Faites connaissance avec le vendeur
Seller avatar
newborn

Faites connaissance avec le vendeur

Seller avatar
newborn stuvia
Voir profil
S'abonner Vous devez être connecté afin de suivre les étudiants ou les cours
Vendu
0
Membre depuis
5 mois
Nombre de followers
0
Documents
197
Dernière vente
-

0.0

0 revues

5
0
4
0
3
0
2
0
1
0

Récemment consulté par vous

Pourquoi les étudiants choisissent Stuvia

Créé par d'autres étudiants, vérifié par les avis

Une qualité sur laquelle compter : rédigé par des étudiants qui ont réussi et évalué par d'autres qui ont utilisé ce document.

Le document ne convient pas ? Choisis un autre document

Aucun souci ! Tu peux sélectionner directement un autre document qui correspond mieux à ce que tu cherches.

Paye comme tu veux, apprends aussitôt

Aucun abonnement, aucun engagement. Paye selon tes habitudes par carte de crédit et télécharge ton document PDF instantanément.

Student with book image

“Acheté, téléchargé et réussi. C'est aussi simple que ça.”

Alisha Student

Foire aux questions