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
kifflom [539]
3 years ago
15

In C++ the declaration of floating point variables starts with the type name float or double, followed by the name of the variab

le, and terminates with a semicolon. It is possible to declare multiple variables separated by commas in one statement. The following statements present examples, float z; double z, w; The following partial grammar represents the specification for C++ style variable declaration. In this grammar, the letters z and w are terminals that represent two variable names. The non-terminal S is the start symbol. S=TV; V=CX X = , VIE T = float double C = z w 1 - Determine Nullable values for the LHS and RHS of all rules. Please note, your answer includes all Nullable functions for LHS and RHS, in addition to the resulting values. (25 points)

Engineering
1 answer:
zubka84 [21]3 years ago
4 0

Answer:

The given grammar is :

S = T V ;

V = C X

X = , V | ε

T = float | double

C = z | w

1.

Nullable variables are the variables which generate ε ( epsilon ) after one or more steps.

From the given grammar,

Nullable variable is X as it generates ε ( epsilon ) in the production rule : X -> ε.

No other variables generate variable X or ε.

So, only variable X is nullable.

2.

First of nullable variable X is First (X ) = , and ε (epsilon).

L.H.S.

The first of other varibles are :

First (S) = {float, double }

First (T) = {float, double }

First (V) = {z, w}

First (C) = {z, w}

R.H.S.

First (T V ; ) = {float, double }

First ( C X ) = {z, w}

First (, V) = ,

First ( ε ) = ε

First (float) = float

First (double) = double

First (z) = z

First (w) = w

3.

Follow of nullable variable X is Follow (V).

Follow (S) = $

Follow (T) = {z, w}

Follow (V) = ;

Follow (X) = Follow (V) = ;

Follow (C) = , and ;

Explanation:

You might be interested in
THEME: What is the impact of technology on architecture?
abruzzese [7]

Answer:

With increased technological knowledge and consequent decreased factors of ignorance, the structures have less inert masses and therefore less need for such decoration. This is the reason why the modern buildings are plainer and depend upon precision of outline and perfection of finish for their architectural effect.

8 0
3 years ago
Do volts or amps kill you.
svetoff [14.1K]
11,000 volts can be fatal to a human
4 0
3 years ago
Suppose there are 76 packets entering a queue at the same time. Each packet is of size 5 MiB. The link transmission rate is 2.1
tia_tia [17]

Answer:

938.7 milliseconds

Explanation:

Since the transmission rate is in bits, we will need to convert the packet size to Bits.

1 bytes = 8 bits

1 MiB = 2^20 bytes = 8 × 2^20 bits

5 MiB = 5 × 8 × 2^20 bits.

The formula for queueing delay of <em>n-th</em> packet is :  (n - 1) × L/R

where L :  packet size = 5 × 8 × 2^20 bits, n: packet number = 48 and R : transmission rate =  2.1 Gbps = 2.1 × 10^9 bits per second.

Therefore queueing delay for 48th packet = ( (48-1) ×5 × 8 × 2^20)/2.1 × 10^9

queueing delay for 48th packet = (47 ×40× 2^20)/2.1 × 10^9

queueing delay for 48th packet = 0.938725181 seconds

queueing delay for 48th packet = 938.725181 milliseconds = 938.7 milliseconds

4 0
3 years ago
A rotating shaft is subjected to a steady torsional stress of 13 ksi and an alternating bending stress of 22 ksi.
mixas84 [53]

Answer:

A) б1 = 28 ksi and  б2 = -6.02 ksi

B) 1.25

Explanation:

Given data :

Torsional stress = 13 ksi

Alternating bending stress = 22ksi

A) determine yielding factor of safety  according to the distortion energy theory

б1,2 = \frac{22}{2} ± √(22/2)² + 13²

       = 11  ± 17

therefore б1 = 28 ksi  hence б2 = -6.02 ksi

B) determine the fatigue factor of safety  

with properties ;  Se = 35ksi, Sy = 60 ksi, Sut = 85 ksi

( б1 - б2 )²  + ( б2 - б3 )² + ( б3 - б1 )²  ≤  2 ( Sy / FOS ) ²

( 28 + 6.02 ) ² + ( 6.02 - 0 )² + ( 0 - 28 )² ≤  2 ( 60 / FOS ) ²

solving for FOS = 1.9

Next we can determine FOS with the use of Goodman criterion

бm / Sut  + бa / Se  =  1 / FOS

= 0 / 85 + 28/35 = 1 / FOS

making FOS the subject of the equation ; hence  FOS = 1.25

3 0
3 years ago
A drive-through system at a fast food restaurant where the first facility takes the order, the second takes the money, and the t
Fynjy0 [20]

Answer:

single-channel, multiple-phase arrangement.

Explanation:

A single channel and a multiple phase arrangement system in a queue is the technique where a customer in a queue goes through the point where there is more than one point of activity.

In the context, in a food restaurant where there are many point of activity for a single channel of ordering food. Here in the first facility, it receives the order and second facility takes money while the other provides the food to the customer. This is an example of single channel and a multiple phase arrangement.

7 0
3 years ago
Other questions:
  • Unlike in previous questions where we wanted you to complete a function we had started, here we want you to write a Python funct
    5·1 answer
  • Terri Duncan recommends following up after an interview in which way?
    9·1 answer
  • A settling tank with 50 foot diameter and a SWD of 9 feet treats
    6·1 answer
  • Determine the maximum weight of the flowerpot that can besupported without exceeding a cable tension of 50 lb in eithercable AB
    15·1 answer
  • What Is the Job Demand for Solar Engineers?<br> (2 or more sentences please and thank you)
    9·1 answer
  • Type the correct answer in the box. Spell all words correctly. Type the exact term Mike should use for the given scenario. Mike
    8·2 answers
  • WHICH OF THIS PLS FAST!!!
    5·1 answer
  • Atoms contain charged particles called___?
    6·1 answer
  • Simplify the expression below:<br><br> 313 + 12 =
    13·2 answers
  • 1. A car engine transfers 3000J in 20 seconds. What is the power generated by the engine?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!