subject

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;
1. In the code, input. GetChar() gets the next character from standard input. If GetToken() is called four times, which of the following inputs will return a token whose type is ERROR?
A.
A. =<
B. ===>
C. <==
D. <=
2. If GetToken() is called four times on input <==<==, how many times is ERROR returned?
a. 0
b. 1
c. 2
d. 3

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:30, iamquintix
Exchanging which type of data uses the least bandwidth? music photographs video voice bandwidth- the amount of data that can be moved between two points in a set time period
Answers: 1
image
Computers and Technology, 23.06.2019 13:30, Gearyjames8
Anetwork security application that prevents access between a private and trusted network and other untrusted networks
Answers: 1
image
Computers and Technology, 23.06.2019 17:00, Alexaisokay1
In which of the following ways can using test-taking tips you? a. you can focus on the information that you need to study. b. you will see the answers to the test. c. you will study more. d. you will be less organized.
Answers: 1
image
Computers and Technology, 24.06.2019 19:50, joThompson
Which is a characteristic of free and open-source software licenses? a. the source code is unavailable to everyone b. the source code is available only to the government c. the source code is available to all users d. the source code is constantly modified
Answers: 1
You know the right answer?
Consider the following code: Token LexicalAnalyzer: : GetToken()
input . GetChar(c);
...

Questions in other subjects:

Konu
Computers and Technology, 19.09.2019 18:20