Programming  >  EXAM  >  Arizona State UniversityCSE 340Final Exam_ Principles of Programming Languages (All)

Arizona State UniversityCSE 340Final Exam_ Principles of Programming Languages

Document Content and Description Below

1/16/2020 Final Exam: Principles of Programming Languages https://asuce.instructure.com/courses/1344/quizzes/17553?module_item_id=119038 1/20 Final Exam Due No due date Points 40 Questions 40 Avail ... able Jan 13 at 12am - Dec 31, 2023 at 11:59pm almost 4 years Time Limit None Attempt History Attempt Time Score LATEST Attempt 1 97 minutes 27.57 out of 40 Score for this quiz: 27.57 out of 40 Submitted Jan 16 at 12:19pm This attempt took 97 minutes. Ques 1 / 1 pts tion 1 Consider the following code: Token LexicalAnalyzer::GetToken() { input.GetChar(c); switch (c) { case '=': input.GetChar(c); if (c == ’=') { tmp.token_type = EQEQ; } else if (c == ’<') { tmp.token_type = EQLT; } else if (c == ’>') { tmp.token_type = EQGT; } else tmp.token_type = ERROR; return tmp; default: tmp.token_type = ERROR; return tmp; } } In the code, input.GetChar() gets the next character from standard input. If GetToken() is called four times on input <==<==, how many times is ERROR returned 0 1 2 Correct! 3 Q 1 / 1 pts uestion 2 letter = a | b | c | d LETTER = A | B | C | D 1/16/2020 Final Exam: Principles of Programming Languages https://asuce.instructure.com/courses/1344/quizzes/17553?module_item_id=119038 2/20 digit = 4 | 5 | 6 | 7 | 9 Consider the regular expression R = (LETTER | digit | !) • (letter • digit) • (letter | digit). Which of the following is correct (more than one choice or no choice can be correct)? 1 * !5aA ∈ L(R1) ?55aA ∈ L(R1 ) 555aA ∈ L(R1 ) None of the above Correct! Ques 1 / 1 pts tion 3 Consider the regular expressions: R = ( a | b )* ( 0*1* ) ( a | b )* R = ( a | b ) ( 0*1* )* ( a | b ) Which of the following is true? 1 2 a0a ∈ L(R1) and ab01a ∈ L(R2) a0a ∈ L(R1) and ab01a ∉ L(R2) Correct! a0a ∉ L(R1) and ab01a ∈ L(R2) a0a ∉ L(R1) and ab01a ∉ L(R2) [Show More]

Last updated: 3 years ago

Preview 1 out of 20 pages

Buy Now

Instant download

We Accept:

Payment methods accepted on Scholarfriends (We Accept)
Preview image of Arizona State UniversityCSE 340Final Exam_ Principles of Programming Languages document

Buy this document to get the full access instantly

Instant Download Access after purchase

Buy Now

Instant download

We Accept:

Payment methods accepted on Scholarfriends (We Accept)

Reviews( 0 )

$10.00

Buy Now

We Accept:

Payment methods accepted on Scholarfriends (We Accept)

Instant download

Can't find what you want? Try our AI powered Search

223
0

Document information


Connected school, study & course


About the document


Uploaded On

Jun 12, 2022

Number of pages

20

Written in

All

Seller


Profile illustration for AGRADES
AGRADES

Member since 4 years

8 Documents Sold

Reviews Received
2
0
0
0
0
Additional information

This document has been written for:

Uploaded

Jun 12, 2022

Downloads

 0

Views

 223

Document Keyword Tags

Recommended For You

Get more on EXAM »

$10.00
What is Scholarfriends

Scholarfriends.com Online Platform by Browsegrades Inc. 651N South Broad St, Middletown DE. United States.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Scholarfriends · High quality services·