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
3 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]3 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
Lan is working on a project report that will go through multiple rounds of
Levart [38]
Its either D or A but im pretty sure its D??
8 0
3 years ago
What is another name for mesolithic age
Romashka-Z-Leto [24]
In archaeology, mesolithic is culture between paleolithic and neolithic. The term "Epipaleolithic" is often used for areas outside northern Europe, but was also the preferred synonym used by French archaeologists until the 1960s.
7 0
3 years ago
Read 2 more answers
Would an artificial intelligence come into existence anytime in the next 30 years?
Scrat [10]
Artificial Intelligence, based on neural networks, is available now.
4 0
3 years ago
You’re responsible for an always-on VPN connection for your company and have been told that it must utilize the most secure mode
liq [111]

Answer:

Tunneling

Explanation:

A networking protocol that is used to send data from one network to another network by encapsulation process.

It is the more secured method as it secures the data with the help of encapsulation process. Rest of the protocols are not helpful in security of data.

8 0
3 years ago
If we use the square wave to transmit digital data (0s and 1s), what will be the data rate. Note data rate is the bits per secon
Nesterboy [21]
The maximum bit rate
6 0
2 years ago
Other questions:
  • In the ascii coding scheme, each byte represents a single ____________________, which can be a number, letter, blank space, punc
    9·1 answer
  • When called upon to give an impromptu speech, it is a good idea to do all of the following, except:
    11·2 answers
  • I would A lot of knowledge and education for computers and <br> Technology
    10·2 answers
  • Which of these statements describes the difference between binary and decimal numbers?
    11·2 answers
  • Write a method called makeLine. The method receives an int parameter that is guaranteed not to be negative and a character. The
    11·1 answer
  • What should be included in the closing portion of your letter or e-mail?
    12·2 answers
  • What is the "online disinhibition effect"?​
    7·1 answer
  • Mihaela I. Croitoru – Utilizarea calculatorului personal Microsoft Word dau coroana
    14·1 answer
  • Which command is used to copy entire folder structures between volumes or across a network while maintaining all NTFS file permi
    10·1 answer
  • How is information processed within a<br> motherboard between the hard drive, CPU and RAM,
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!