• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 7 pages
Exam (elaborations)

Csce 3600 Final Exam Questions & Answers

Document preview thumbnail
Preview 2 out of 7 pages

CSCE 3600 FINAL EXAM QUESTIONS & ANSWERS

Content preview

CSCE 3600 FINAL EXAM QUESTIONS & ANSWERS

Compilation Process - Answers - Preprocessor -> Compiler -> Assembler -> Linker ->
Loader

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

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

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

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

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

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

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

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

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

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

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

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

To Run: - Answers - ./hello

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

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

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

Compilation Stages - Answers - 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) - Answers - recognizes tokens (keywords, operators,
identifiers, numbers) of a program, outputs sequence of tokens to syntax analyzer

Lexical Analysis Process - Answers - 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* - Answers - zero or more occurrence of x. i.e., it can generate { e, x, xx, xxx, xxxx, ...
}

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

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

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

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

Write all strings of 0s and 1s containing at least two consecutive 1s in regex - Answers -
( 0 | 1 )* 1 1( 0 | 1 )*

Write all strings of alternating 0s and 1s in regex - Answers - ( e | 1 ) ( 0 1 )* ( e | 0 )

x+= x x* - Answers - denotes L(x)+

x? = x | e - Answers - denotes L(x) U {e}

[abc] = a | b | c - Answers - matches one character in the square bracket

a-z = a | b | c | ... | z - Answers - range

[^abc] - Answers - ^ means negation

. - Answers - (dot) matches any character except the newline

Document information

Uploaded on
November 28, 2024
Number of pages
7
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$11.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.
GEEKA
3.8
(373)
Sold
2212
Followers
1450
Items
62502
Last sold
4 hours 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