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
Calculate the amount of current flowing through a 75-watt light bulb that is connected to a 120-volt circuit in your home.
aev [14]

Answer: 220

Explanation:

7 0
3 years ago
A three-phase voltage source with a terminal voltage of 22kV is connected to a three-phase transformer rated 5MVA 22kV/220V. The
amid [387]

Answer:

A) See Attachment B) See Attachment C) 186.153

Explanation:

C) Per phase Voltage= 220/∛3

                                  = 6.037

S=V²/Z

  = (6.037)²/(0.01+i0.05)

  = 62051.282-i310256.41

Active power losses per phase= 62.051kW

total Active power losses= 62.051×3

                                         =186.153kW

6 0
4 years ago
A venturi meter is to be installed in a 63 mm bore section of a piping system to measure the flow rate of water in it. From spac
Alex Ar [27]

Answer:

Throat diameter d_2=28.60 mm

Explanation:

 Bore diameter d_1=63mm  ⇒A_1=3.09\times 10^{-3} m^2

Manometric deflection x=235 mm

Flow rate Q=240 Lt/min⇒ Q=.004\frac{m^3}{s}

Coefficient of discharge C_d=0.8

We know that discharge through venturi meter

 Q=C_d\dfrac{A_1A_2\sqrt{2gh}}{\sqrt{A_1^2-A_2^2}}

h=x(\dfrac{S_m}{S_w}-1)

S_m=13.6 for Hg and S_w=1 for water.

h=0.235(\dfrac{13.6}{1}-1)

h=2.961 m

Now by putting the all value in

Q=C_d\dfrac{A_1A_2\sqrt{2gh}}{\sqrt{A_1^2-A_2^2}}

0.004=0.8\times \dfrac{3.09\times 10^{-3} A_2\sqrt{2\times 9.81\times 2.961}}{\sqrt{(3.09\times 10^{-3})^2-A_2^2}}

A_2=6.42\times 10^{-4} m^2

 ⇒d_2=28.60 mm

So throat diameter d_2=28.60 mm

     

4 0
3 years ago
Air enters the compressor of a regenerative gas-turbine engine at 300 K and 100 kPa, where it is compressed to 800 kPa and 580 K
Bad White [126]

Answer:

a) The amount of heat transfer in the regenerator, q = 114.12 kJ/kg

b) Thermal efficiency = 35.9%

Explanation:

The calculations are neatly handwritten and attached as files to this solution for easiness of expression and clarity. The cycle is also drawn on the T - S diagram and included in the attached files. Check the files below for the complete calculation.

I hope this helps!

3 0
3 years ago
A soil specimen was tested to have a moisture content of 32%, a void ratio of 0.95, and a specific gravity of soil solids of 2.7
belka [17]

Answer:

a. 0.9263

b. 0.4872

c. 13.83kN/m^{3}

Explanation:

moisture content (ω) = 0.32

void ratio (e) = 0.95

specific gravity (G_{s}) = 2.75

the degree of satruation (S) = \frac{w . G_{s} }{e} =0.32×2.75/0.95 = 0.9263

b. porosity (n) = \frac{e}{e + 1} = 0.95/(0.95 + 1)= 0.4872

c. dry unit weight (γ_{d}) = \frac{G_{s} . V_{w} }{1 + e}

taking specific unit weight of water (V_{w})= 9.81kN/m^{3}

γ_{d} = 2.75 × 1000/(1 + 0.95) = 13.83kN/m^{3}

5 0
3 years ago
Other questions:
  • Which of the following is NOT a characteristic of hazardous waste
    5·1 answer
  • Assume you have a beam that is 15 feet long and carries a concentrated load of 900 pounds at a distance of 4 feet from R . React
    15·1 answer
  • In what way do you think the motorcycles perform<br> work?
    10·1 answer
  • A very large thin plate is centered in a gap of width 0.06 m with a different oils of unknown viscosities above and below; one v
    12·1 answer
  • A local reaction is when a chemical enters the bloodstream?
    5·1 answer
  • A 78-percent efficient 12-hp pump is pumping water from a lake to a nearby pool at a rate of 1.5 ft3/s through a constant-diamet
    10·1 answer
  • PLZ HELP ASAP!!!
    6·1 answer
  • Find the differential and evaluate for the given x and dx: y=sin2xx,x=π,dx=0.25
    13·1 answer
  • More and more companies are discarding the traditional superior-subordinate performance feedback process and replacing it with:
    13·1 answer
  • 3. (5%) you would like to physically separate different materials in a scrap recycling plant. describe at least one method that
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!