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
Nothing. i have nothing to say but that. other than that im good. :))))
ohaa [14]

Answer:

aw good <3

Explanation:

4 0
3 years ago
Question 9 of 25
mafiozo [28]

Answer:

D

Explanation:

took test failed question D is the right answer

3 0
3 years ago
A hypothetical A-B alloy of composition 57 wt% B-43 wt% A at some temperature is found to consist of mass fractions of 0.5 for b
Dennis_Churaev [7]

Answer:

composition of alpha phase is 27% B

Explanation:

given data

mass fractions  = 0.5 for both

composition = 57 wt% B-43 wt% A

composition = 87 wt% B-13 wt% A

solution

as by total composition Co = 57 and by beta phase composition  Cβ = 87  

we use here lever rule that is

Wα = Wβ   ...............1

Wα = Wβ = 0.5

now we take here left side of equation

we will get

\frac{C_\beta - Co}{C_\beta - Ca}   = 0.5

\frac{87 - 57}{87 - Ca} = 0.5  

solve it we get

Ca = 27

so composition of alpha phase is 27% B

8 0
3 years ago
1. A team of students have designed a battery-powered cooler, which promises to keep beverages at a high-drinkability temperatur
Anit [1.1K]

Answer:

Minimum electrical power required = 3.784 Watts

Minimum battery size needed = 3.03 Amp-hr

Explanation:

Temperature of the beverages, T_L = 36^0 F = 275.372 K

Outside temperature, T_H = 100^0F = 310.928 K

rate of insulation, Q = 100 Btu/h

To get the minimum electrical power required, use the relation below:

\frac{T_L}{T_H - T_L} = \frac{Q}{W} \\W = \frac{Q(T_H - T_L)}{T_L}\\W = \frac{100(310.928 - 275.372)}{275.372}\\W = 12.91 Btu/h\\1 Btu/h = 0.293071 W\\W = 12.91 * 0.293071\\W_{min} = 3.784 Watt

V = 5 V

Power = IV

W_{min} = I_{min} V\\3.784 = 5I_{min}\\I_{min} = \frac{3.784}{5} \\I_{min} = 0.7568 A

If the cooler is supposed to work for 4 hours, t = 4 hours

I_{min} = 0.7568 * 4\\I_{min} = 3.03 Amp-hr

Minimum battery size needed = 3.03 Amp-hr

6 0
3 years ago
I WILL GIVE 20 POINTS!!
Alex777 [14]

Answer:

Use a resume header

Explanation:

Create a Summary

Research industry, employer keywords

there are some hints okay

5 0
3 years ago
Read 2 more answers
Other questions:
  • Modify any of the previous labs which would have crashed when non-numeric data was entered by adding exception handling so that
    8·1 answer
  • Our goal is to design a traffic-light controller with the following properties; it lights up the green light (output G) for 15 s
    7·1 answer
  • One cylinder in the diesel engine of a truck has an initial volume of 650 cm3 . Air is admitted to the cylinder at 35 ∘C and a p
    7·1 answer
  • Consider two different types of motors. Motor A has a characteristic life of 4100 hours (based on a MTTF of 4650 hours) and a sh
    10·1 answer
  • A cylinder with a piston restrained by a linear spring contains 2 kg of carbon dioxide at 500 kPa and 400°C. It is cooled to 40°
    7·1 answer
  • Air enters a counterflow heat exchanger operating at steady state at 27 C, 0.3 MPa and exits at 12 C. Refrigerant 134a enters at
    5·1 answer
  • What have you learned from the previous lesson? Let's try to check your prior knowledge
    9·1 answer
  • Of the core elements of successful safety and health programs, Management Leadership, Worker Participation, and what else relate
    10·2 answers
  • Explain the importance of water quality in aquaculture business.
    8·2 answers
  • Which material has the highest cp value?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!