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
REY [17]
3 years ago
14

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= , V|E
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.
2. Using the Nullable values that you calculated in part 1, and using the FIRST sets that you calculated in part 2, determine the FOLLOW sets for all non-terminals, i.e. LHS of the rules. Please note, your answer includes all FOLLOW relations in addition to the resulting sets.
Engineering
1 answer:
Aliun [14]3 years ago
7 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

Explanation:

You might be interested in
Consider 4.8 pounds per minute of water vapor at 100 lbf/in2, 500 oF, and a velocity of 100 ft/s entering a nozzle operating at
andriy [413]

Answer:

A) v_2 = 2016.80 ft/s

B) \Delta s = 0.006 Btu/lbm R  

Explanation:

Given data:

P-1 = 100 lbf/in^2

T_1 = 500 degree f

V_1 = 100 ft/s

P_2 = 40 lbf/inc^2

effeciency = 80%

from steady flow enerfy equation

h_1 +\frac{V_1^2}{2} = h_2 + \frac{V_2^2}{2}

where h1 and h2 are inlet and exit enthalpy

for P1 = 100 lbf/in^2 and T1 = 500 degree F

H_1 = 1278.8 Btu/lbm

s_1 = 1.708 Btu/lbm -R

for P1 = 40 lbf/in^2

H_1 = 1193.5 Btu/lbm

s_1 = 1.708 Btu/lbm -R

exit enthalapy h_2

\eta = \frac{h_1 - h'_2}{ h_1 - h_2}

0.80 = \frac{1278.8 - h'_2}{1278.8 -1193.5} = 1197.77 Btu/lbm

from above equation

1278.8 \times 25037 + \frac{100^2}{2} = 1197.77   \times 25037 + \frac{v_2^2}{2}                   [1 Btu/lbm = 25037 ft^2/s^2]

v_2 = 2016.80 ft/s

b) amount of entropy

\Delta s = s_2 - s_1

s_1 = 1.708 Btu/lbm -R

at h_2 = 1197.77 Btu/lbm [\tex]  and [tex]P_2 = 40 lbf/in^2

s_2 is 1.714 Btu/lbm -R

\Delta s = 1.714 - 1.708 = 0.006 Btu/lbm R

6 0
3 years ago
An ideal neon sign transformer provides 9130 V at 51.0 mA with an input voltage of 240 V. Calculate the transformer's input powe
BaLLatris [955]

Answer:

Input power = 465.63 W

current = 1.94 A

Explanation:

we have the following data to answer this question

V = 9130

i = 0.051

the input power = VI

I = 51.0 mA = 0.051

= 9130 * 0.051

= 465.63 watts

the current = 465.63/240

= 1.94A

therefore the input power is 465.63 wwatts

while the current is 1.94A

the input power is the same thing as the output power.

4 0
3 years ago
What is the mechanical advantage of a pulley with 3 support ropes?
snow_tiger [21]

Answer:

The mechanical advantage is 3 to 1

Explanation:

A frictionless pulley with three support ropes carries equal tension on each of the ropes thus;

Tension in each pulley rope = T

Total tension in the 3 ropes = 3 × T = 3·T

Direction of the tension forces on each rope = Unidirectional

Total force provided by the 3 ropes = 3·T

Therefore, a force, T, applied at the end of the rope will result in a lifting force of 3·T

Hence, the mechanical advantage = 3·T to T which is presented as follows;

Mechanical \ advantage = \dfrac{3 \cdot T}{T}  = \dfrac{3}{1}

The mechanical advantage = 3 to 1.

5 0
4 years ago
The voltage valve at which a zirconia O2S switches from rich to lean and lean to rich is
frez [133]
I think the answer is C) 0.25v I’m not sure tho
6 0
3 years ago
2. Tech A says that a tapered roller bearing assembly has less rolling resistance than a similarly sized
Damm [24]
Hehehdbbs dnndne banner nsnene sheen snndne jejeje
6 0
3 years ago
Other questions:
  • 1.5 kg of liquid water initially at 12∘C is to be heated to 95∘C in a teapot equipped with an 800-W electric heating element ins
    9·1 answer
  • A freshwater jet boat takes in water through side vents and ejects it through a nozzle of diameter D = 75 mm; the jet speed is V
    5·1 answer
  • According to the HERARCHY of hazard control what sequence is specified for protecting workers from chemical hazards assume that
    7·1 answer
  • A smoking lounge is to accommodate 13 heavy smokers. The minimum fresh air requirement for smoking lounges is specified to be 30
    12·1 answer
  • For an automotive spark-ignition engine, the combustion duration (from time of ignition through completion) is approximately one
    11·1 answer
  • Which among the four that doesn't use an elbow in wiring installation a.EMT b. CPC c.PVC d.RSC<br>​
    8·1 answer
  • Is (3x+1)(4x-5) the factor form of 12x^2-11x-5?
    12·2 answers
  • 3. Sitúese en la época de los faraones en Egipto. Usted es el encargado de construir una de esas fabulosas pirámides que fueron
    11·1 answer
  • Which of the following best describes maintenance?
    9·1 answer
  • How to clean a snowblower carburetor without removing it.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!