Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 7 pages
Exam (elaborations)

CSCE 3600 FINAL EXAM QUESTIONS AND ANSWERS 100% CORRECT

Document preview thumbnail
Preview 2 out of 7 pages

CSCE 3600 FINAL EXAM QUESTIONS AND ANSWERS 100% CORRECTCSCE 3600 FINAL EXAM QUESTIONS AND ANSWERS 100% CORRECTCSCE 3600 FINAL EXAM QUESTIONS AND ANSWERS 100% CORRECT Compilation Process - ANSWER-Preprocessor - Compiler - Assembler - Linker - Loader Preprocessor Directive - ANSWER-lines begin with # (like #include or #define) Preprocessing - ANSWER-before a program is compiled, definition of constants and macros, conditional compilation of program code #include - ANSWER-copy of a specified file included, used for programs with multiple source files compiled together or libraries

Content preview

CSCE 3600 FINAL EXAM QUESTIONS
AND ANSWERS 100% CORRECT
Compilation Process - ANSWER-Preprocessor -> Compiler -> Assembler -> Linker ->
Loader

Preprocessor Directive - ANSWER-lines begin with # (like #include or #define)

Preprocessing - ANSWER-before a program is compiled, definition of constants and
macros, conditional compilation of program code

#include - ANSWER-copy of a specified file included, used for programs with multiple
source files compiled together or libraries

#define - ANSWER-when program compiled, all occurrences of symbolic constant
replaced with replacement text

#undef - ANSWER-undefines a symbolic constant or macro (#define WIDTH
80 ........#undef WIDTH)

gcc - ANSWER-GNU Compiler Collection, standard Linux C compiler, translates C to
assembly

Assembler - ANSWER-assembles, but doesn't link, source code to generate relocatable
object code

Linker - ANSWER-combines compiled and assembled object code to make executable
file

Loader - ANSWER-ensures that object programs are placed in memory in executable
form

Only Compiling: - ANSWER-gcc -c hello.c

Only Linking: - ANSWER-gcc hello.o -o hello

Compiling and Linking: - ANSWER-gcc hello.c -o hello

To Run: - ANSWER-./hello

Compiler - ANSWER-system software that translates high level language to machine
language

, Intermediate Code - ANSWER-produces a program in a different language, between
source code and machine code levels

Semantic Analyzer - ANSWER-takes its input from the syntax analysis phase in the
form of a parse tree and a symbol table, determines if the input has a well-defined
meaning

Symbol Table - ANSWER-built and maintained by the semantic analyzer, contains
information about each identifier in a program, such as identifier type, scope of
identifier, etc

Lexical Error - ANSWER-a mistake in lexeme like misspelling or missing one of the
quotes in a string

Static Semantics - ANSWER-semantics rules that can be checked at compile time

Runtime Semantics - ANSWER-semantics rules that can be checked only at runtime

Compilation Stages - ANSWER-lexical analysis (scanner) -> syntax analysis (parser) ->
semantic analysis -> intermediate code generation -> machine independent
improvement (optional) -> target code generation -> machine specific improvement
(optional)

Lexical Analysis (Scanner) - ANSWER-recognizes tokens (keywords, operators,
identifiers, numbers) of a program, outputs sequence of tokens to syntax analyzer

Lexical Analysis Process - ANSWER-1. discard blanks, tabs
2. put characters together
3. repeat step 2 until end of token
4. classify and save token
5. repeat steps 1-4 until end of statement
6. repeat steps 1-5 until end of source code

x* - ANSWER-zero or more occurrence of x. i.e., it can generate { e, x, xx, xxx,
xxxx, ... }

x+ - ANSWER-one or more occurrence of x. i.e., it can generate { x, xx, xxx, xxxx ... } or
x.x*

x? - ANSWER-at most one occurrence of x i.e., it can generate either {x} or {e}.

Write all strings of 1s and 0s in regex - ANSWER-( 0 | 1 )*

Write all strings of 1s and 0s beginning with a 1 in regex - ANSWER-1 ( 0 | 1 )*

Document information

Uploaded on
December 6, 2024
Number of pages
7
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$12.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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.
NursingTutor1
3.9
(459)
Sold
1701
Followers
1073
Items
18447
Last sold
1 week ago




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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions