100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

CS 326 Questions

Beoordeling
-
Verkocht
-
Pagina's
6
Cijfer
A+
Geüpload op
10-08-2025
Geschreven in
2025/2026

CS 326 Questions False - answersRegular expressions are used to describe the syntactic structure of a language, while context-free grammars are used to describe its lexical structure. False - answersThere's a one-to-one correspondence between instructions in assembly language and instructions in a high-level language. False - answersIn C, the variable x that appears in void f() {int x;...} is allocated statically. True - answersScheme belongs to the class of declarative programming languages. True - answersSubroutine closures are used in languages with deep binding. True - answersEvery case statement can also be written as one or more if...then....else statements. False - answersIt is possible to do type checking at compile time in a language with dynamic scoping. False - answersEvery logically-controlled loop can also be written as an enumeration-controlled loop. Kleene closure (the *) - answersWhich mechanism does NOT appear explicitly in context-free grammars? Declarative languages describe what to do; imperative languages describe how to do it. - answersWhat best characterizes the difference between declarative and imperative programming languages? A variable name that begins w a digit - answersWhat is a lexical (as opposed to syntactic or semantic) error in C

Meer zien Lees minder
Instelling
Cs 326
Vak
Cs 326









Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Geschreven voor

Instelling
Cs 326
Vak
Cs 326

Documentinformatie

Geüpload op
10 augustus 2025
Aantal pagina's
6
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

Voorbeeld van de inhoud

CS 326 Questions
False - answers✔✔Regular expressions are used to describe the syntactic structure of a language, while
context-free grammars are used to describe its lexical structure.



False - answers✔✔There's a one-to-one correspondence between instructions in assembly language and
instructions in a high-level language.



False - answers✔✔In C, the variable x that appears in void f() {int x;...} is allocated statically.



True - answers✔✔Scheme belongs to the class of declarative programming languages.



True - answers✔✔Subroutine closures are used in languages with deep binding.



True - answers✔✔Every case statement can also be written as one or more if...then....else statements.



False - answers✔✔It is possible to do type checking at compile time in a language with dynamic scoping.



False - answers✔✔Every logically-controlled loop can also be written as an enumeration-controlled
loop.



Kleene closure (the *) - answers✔✔Which mechanism does NOT appear explicitly in context-free
grammars?



Declarative languages describe what to do; imperative languages describe how to do it. -
answers✔✔What best characterizes the difference between declarative and imperative programming
languages?



A variable name that begins w a digit - answers✔✔What is a lexical (as opposed to syntactic or
semantic) error in C?

, They produce faster code, since tail-recursive calls may reuse the same space on the stack, and hence
don't involve push and pop operations. - answers✔✔Why are tail-recursive functions useful?



G -> decl decl_list;

decl_list -> , ID decl_list | epsilon

decl -> type ID

type -> int | float - answers✔✔Write a context-free grammar that describes simple var declarations in C
syntax, consisting of a type (int or float) followed by a list of identifiers separated by commas, followed
by a terminating semicolon such as: int x, y, z; You don't need to describe the identifiers, consider them
given by the scanner as ID.



(aa)*a - answers✔✔Write a regular expression that describes the set of strings consisting of an odd
number of a's, over alphabet {a}.



Internal fragmentation is represented by a request for allocation that is smaller than the block available,
therefore creating gaps/wasted space. External fragmentation is when there's a lot of open space but
it's all fragmented so that there's no continuous space large enough to satisfy the request. -
answers✔✔What are internal and external fragmentation?



E-> T-> T*F

T-> F -> (E)

E -> E+T

E -> T -> F -> identifier -> a

T -> F -> identifier -> b

F -> number -> 3

*show each step separately tho - answers✔✔E -> E+T | E-T | T

T -> T*F | T//F | F

F -> identifier | number | -F | (E)

Using this grammar, show leftmost derivation for string (a+b)*3.
$8.49
Krijg toegang tot het volledige document:

100% tevredenheidsgarantie
Direct beschikbaar na je betaling
Lees online óf als PDF
Geen vaste maandelijkse kosten

Maak kennis met de verkoper
Seller avatar
newborn

Ook beschikbaar in voordeelbundel

Thumbnail
Voordeelbundel
cs-326 quizlets questions and answers
-
3 2025
$ 25.47 Meer info

Maak kennis met de verkoper

Seller avatar
newborn stuvia
Bekijk profiel
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
0
Lid sinds
5 maanden
Aantal volgers
0
Documenten
197
Laatst verkocht
-

0.0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen