1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
meriva
2 years ago
5

Using your favorite imperative language, give an example of each of the following. (a) A lexical error, detected by the scanner

(b) A syntax error, detected by the parser (c) A static semantic error, detected by semantic analysis (d) A dynamic semantic error, detected by code generated by the compiler
Computers and Technology
1 answer:
Travka [436]2 years ago
8 0

Explanation:

a. int foo+; (foo+ is an invalid identifier because + is not a valid char in identifiers)

b. foo int; (Syntax error is any error where the syntax is invalid - either due to misplacement of words, bad spelling, missing semicolons etc.)

c. Static semantic error are logical errors. for e.g passing float as index of an array - arr[1.5] should be a SSE.

d. I think exceptions like NullReferenceException might be an example of DME. Not completely sure but in covariant returns that raise an exception at compile time (in some languages) might also come in this category. Also, passing the wrong type of object in another object (like passing a Cat in a Person object at runtime might qualify for DME.) Simplest example would be trying to access an index that is out of bounds of the array.

You might be interested in
You are driving on expressway with three lanes in your direction at a speed lower then
Kaylis [27]

<em>ANSWER:</em>

<em></em>

<h2>Pass on the left<em> </em></h2>

6 0
3 years ago
Read 2 more answers
If a website ends with .gov does it mean that its written by the government or?
Soloha48 [4]
Umm... No. (I'm pretty sure)
7 0
3 years ago
Read 2 more answers
What is a computer dedicated to a single function, such as a calculator or computer game? A. TabletB. PDAC.ApplianceD. Minicompu
viktelen [127]

Answer:

C. Appliance.

Explanation:

When a device or machine performs a single function or task, it is commonly referred to as an appliance. Examples of such is an iron, a calculator, a computer game, washing machines, refrigerators, e.t.c

<em>A Personal Digital Assistant (PDA)</em>, is a device, mostly mobile and handheld, that combines various computing features such as telephoning and networking. An example is a tablet. A PDA performs more than a single function.

<em>Minicomputer</em> is a computer usually small in physical size, that is midway in capabilities and support, between a microcomputer and a mainframe computer. An example is also a tablet and our smartphones. Minicomputers are also dedicated to various functions rather than a single function.

In summary, the option that best describes the situation in the question is an appliance.

<em>Hope this helps!</em>

6 0
3 years ago
Choose the answer. Janice's IT department found that her computer had a program on it that was collecting her personal informati
harkovskaia [24]

Answer:

Spyware

Spam is just unwanted soliciation, spoofing is making links appear as something else, pharming is creating a fake website for victims to use.

7 0
2 years ago
Which of these options highlights the need for learning algorithms
LiRa [457]

Answer: D.

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • In microsoft windows when a window is minimized what happens to that window
    9·1 answer
  • ________ symbol is used in the "Advanced" section of the time range picker to round down to nearest unit of specified time.
    8·1 answer
  • In the view that follows, which field can't be updated create view example_2 as select invoice_number, invoice_date, invoice_tot
    13·1 answer
  • Word templates include pre-made flyers which may be edited and saved only if permission is obtained from the Microsoft Office te
    11·1 answer
  • Question #7
    10·2 answers
  • Which sentence in the passage shows an effective way to protect your document from misuse? Claire has saved her research paper o
    14·1 answer
  • Which key combination should you use
    9·2 answers
  • X = 9 % 2if (x == 1):  print ("ONE")else:  print ("TWO")
    13·1 answer
  • 1. Name the three kinds of Eraser in Photoshop. <br>​
    8·2 answers
  • At a family reunion, your cousin takes a picture of both of you with her phone, orders a print of it, and mails it to you with a
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!