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
WRITE A PROGRAM TO CALCULATE SIMPLE INTEREST
Alchen [17]

The simple interset program is a sequential program, and does not require loops and conditions

The simple interset program in Python, where comments are used to explain each line is as follows:

#This gets input for the principal amount

P = int(input("P = "))

#This gets input for the rate

R = int(input("R = "))

#This gets input for the number of years

N = int(input("N = "))

#This calculates the simple interest

I = P * R * T * 0.01

#This prints the simple interest

print("Simple Interest =",I)

Read more about simple interest at:

brainly.com/question/2294792

7 0
2 years ago
The master system database stores a database template that is used as a blueprint when creating a new user database.
Novay_Z [31]
<span>An attribute in a relation of a database that serves as the primary key of another relation in the same database is called a</span>
6 0
3 years ago
The data selected to create a table must include
Novay_Z [31]

The column names and data types.

4 0
3 years ago
Read 2 more answers
Computer design replaced ______________
bazaltina [42]
<span>Computer design replaced (B) models draw or created by hand. Technology nowadays has a big contribution in terms of planning and designing a building or a structure without burning your eyebrow facing that paper and handling your pen. Computer designs are used to make the design more accurate and more precise compared to traditional hand drawn designs.</span>
8 0
3 years ago
Why we use cluster computing and hadoop framework for big data sysetm​
Ber [7]

Answer:

Explanation:

Hadoop clusters can boost the processing speed of many big data analytics jobs, given their ability to break down large computational tasks into smaller tasks that can be run in a parallel, distributed fashion.

5 0
2 years ago
Other questions:
  • Use the script below as a starting point to create a Rectangle class. Your rectangle class must have the following methods;A con
    12·1 answer
  • A _____ is a predefined text format that includes multiple formatting options.
    14·1 answer
  • What lie does E.D. tell to keep the musical from being canceled? There is a television crew coming to do a story on it. Jake wil
    6·1 answer
  • 2. What are the pros and cons of Toyota structure?
    13·1 answer
  • So, I have strict parents &amp; need help, if u don’t know how to fix this after u read it, leave. I don’t want u getting points
    11·2 answers
  • How designers have created products from waste materials?
    7·1 answer
  • Which can be used to decode a Unicode character encoding into text?
    13·1 answer
  • Convert (65.125)10 to octal.
    7·1 answer
  • Which camera required the photographer to project the image on paper
    9·2 answers
  • There's a rising issue with bots sending links starting with 'bit'. These links are dangerous and harmful for any computer or de
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!