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 JavaScript statement to convert "Information Technology" to uppercase.
OLEGan [10]

Answer:

The JavaScript  statement is

var str1 =    "Information Technology";

var result = str1.toUpperCase();

Explanation:

JavaScript  is used to validate the client side it means it provide the client side validation.

Following are the function of JavaScript that converted the string into uppercase.

 function val()

{

 var str1 = "Information Technology ";

 var result = str1.toUpperCase();

}

The toUpperCase() function convert the string into uppercase in JavaScript

OUTPUT  

INFORMATION TECHNOLOGY

4 0
3 years ago
With "read" function, which one of the following statements is NOT correct? a.If the read is successful, the number of bytes rea
worty [1.4K]

Answer:

a. If the read is successful, the number of bytes read is returned.

b. If the end of file is encountered, 0 is returned.

Explanation:

A read function is one of the functions used in computer programming. A read function is used to read an information or data that was written before into a file.

If any portion of a regular file before to the end of file has not been written and the end of file is encountered the read function will return the bytes with value 0.

If read function has read some data successfully, it returns the number of bytes it read.

3 0
3 years ago
Which of the following is benefit of information communication technology?
igor_vitrenko [27]

Answer:

C. Cost reduction

Explanation:

ICT covers all the products that can store, retrieve, transmit or receive and manipulate the information via the electronic medium in a binary or digital mode. As an example, we can consider the Personal computer, digital television, robots or email as well as the digital communication technologies that allow the organizations and people to talk and share the information between them in a digital manner. And this is cost-effective, there is no employee benefit, increased use of postal mail or less technology. The only advantage is cost reduction. And hence C, Cost reduction is the right answer.

5 0
3 years ago
Read 2 more answers
How is the number 13,000 abbreviated in scientific notation?
Gennadij [26K]
<span> 13,000 is the same as 1.3 x 10^4</span>
3 0
3 years ago
Read 2 more answers
Do companies speed up internet when you run speed test
Alecsey [184]

Answer:

you can call your internet provider to see if they can speed it up!

Explanation:

3 0
2 years ago
Other questions:
  • darren wants to substitute every occurence of the word bulky in his spreadsheet with the word strong. which of these options sho
    9·2 answers
  • The staff of the ___________________ will need to enter, maintain, and retrieve data from electronic health records within a hos
    9·1 answer
  • Consider the following code: // Merge mailing list m2 into m1 void merge (MailingList m1, MailingList m2) { for (int i = 0; i &l
    12·1 answer
  • How do you freeze the total cell so that it doesn't change when copied?
    6·1 answer
  • Is orange named after the fruit or of the color?
    9·1 answer
  • Whats with the bot spamming customer care numbers...kinda annoying when im trying to help people.
    12·1 answer
  • What are the odds that you find someone you know in person on here
    5·1 answer
  • Combination of one or more columns used to identify particular rows in a relation is a (n)<br>​
    8·1 answer
  • Please NEED HELP ASAP WILL MARK BRAINLIEST ONLY #8
    8·1 answer
  • What is the second row of letters in the keyboard called?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!