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
Two semiconductor materials have exactly the same properties except material A has a bandgap energy of 0.90 eV and material B ha
AlekseyPX

Answer: hello your question is incomplete attached below is the complete question

answer : Ac = 5° , A_{f} = 2.5°

Explanation:

Bandgap energy for material A = 0.90 eV

Bandgap energy for material B = 1.10 eV

<u>Calculate the ratio of ni for Material B to Material B </u>

Total derivation ( d ) = d1 + d2

 d = A_{c} ( μ_{c} - 1 ) + A_{f} ( μ_{f} - 1 )  ---- ( 1 )

where : d = 1° , μ_{c} = 1.5 , μ_{f} = 1.6

Input values into equation 1 above

1° = 0.5Ac + 0.6Af  ---- ( 2 )

also d = d1 [ 1 - w/ w1 ] ------ ( 3 )

∴ d = Ac ( μ_{c} - 1 ) ( 1 - w/w1 )

  1° = Ac ( 1.5 - 1 ) ( 1 - 0.06/0.1 ) --- ( 4 )

resolving  equation ( 4 )

Ac = 5°

resolving equation ( 2 )

A_{f} = 2.5°

8 0
3 years ago
Consider a dip-coating process where a very long (assume infinitely long) wire(solid) with radius, ri, is being pulled verticall
Gekata [30.6K]

Answer:

See explaination and attachment.

Explanation:

Navier-Stokes equation is to momentum what the continuity equation is to conservation of mass. It simply enforces F=ma in an Eulerian frame.

The starting point of the Navier-Stokes equations is the equilibrium equation.

The first key step is to partition the stress in the equations into hydrostatic (pressure) and deviatoric constituents.

The second step is to relate the deviatoric stress to viscosity in the fluid.

The final step is to impose any special cases of interest, usually incompressibility.

Please kindly check attachment for step by step solution.

6 0
4 years ago
Explain ten application of solar electric energy​
Aleksandr-060686 [28]

Answer:

Some of the major application of solar energy are as follows: (a) Solar water heating (b) Solar heating of buildings (c) Solar distillation (d) Solar pumping (e) Solar drying of agricultural and animal products (f) Solar furnaces (g) Solar cooking (h) Solar electric power generation (i) Solar thermal power production (j) Solar green houses.

6 0
2 years ago
A rectangular steel bar, with 8" x 0.75" cross-sectional dimensions, has equal and opposite moments applied to its ends.
denpristay [2]

Answer:

Part a: The yield moment is 400 k.in.

Part b: The strain is 8.621 \times 10^{-4} in/in

Part c: The plastic moment is 600 ksi.

Explanation:

Part a:

As per bending equation

\frac{M}{I}=\frac{F}{y}

Here

  • M is the moment which is to be calculated
  • I is the moment of inertia given as

                         I=\frac{bd^3}{12}

Here

  • b is the breath given as 0.75"
  • d is the depth which is given as 8"

                     I=\frac{bd^3}{12}\\I=\frac{0.75\times 8^3}{12}\\I=32 in^4

  • y is given as

                     y=\frac{d}{2}\\y=\frac{8}{2}\\y=4"\\

  • Force is 50 ksi

\frac{M_y}{I}=\frac{F_y}{y}\\M_y=\frac{F_y}{y}{I}\\M_y=\frac{50}{4}{32}\\M_y=400 k. in

The yield moment is 400 k.in.

Part b:

The strain is given as

Strain=\frac{Stress}{Elastic Modulus}

The stress at the station 2" down from the top is estimated by ratio of triangles as

                        F_{2"}=\frac{F_y}{y}\times 2"\\F_{2"}=\frac{50 ksi}{4"}\times 2"\\F_{2"}=25 ksi

Now the steel has the elastic modulus of E=29000 ksi

Strain=\frac{Stress}{Elastic Modulus}\\Strain=\frac{F_{2"}}{E}\\Strain=\frac{25}{29000}\\Strain=8.621 \times 10^{-4} in/in

So the strain is 8.621 \times 10^{-4} in/in

Part c:

For a rectangular shape the shape factor is given as 1.5.

Now the plastic moment is given as

shape\, factor=\frac{Plastic\, Moment}{Yield\, Moment}\\{Plastic\, Moment}=shape\, factor\times {Yield\, Moment}\\{Plastic\, Moment}=1.5\times400 ksi\\{Plastic\, Moment}=600 ksi

The plastic moment is 600 ksi.

3 0
4 years ago
What is the name of the model/shape below?
yuradex [85]

Answer:

H

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • 2. Consider Dekker’s algorithm written for an arbitrary number of processes by changing the statement executed when leaving the
    8·1 answer
  • Consider a finite wing with an aspect of ratio of 7; the airfoil section of the wing is a symmetric airfoil with an infinite-win
    9·1 answer
  • PLEASE HELP, TEST MULTIPLE CHOICE QUESTIONS
    12·2 answers
  • To test the effects of a new fertilizer, 100 plots were divided in half. Fertilizer A is randomly applied to one half, and B to
    13·2 answers
  • One of the best methods for understanding a company’s policies and procedures is
    14·1 answer
  • How does the turbo on a car work?
    5·2 answers
  • A converging nozzle has an exit area of 0.001 m2. Air enters the nozzle with negligible velocity at a pressure of 1 MPa and a te
    6·1 answer
  • A four-lane divided multilane highway (two lanes in each direction) in rolling terrain has five access points per mile and 11-ft
    10·1 answer
  • How do I do this?<br> Blueprints, complete the missing view.
    15·1 answer
  • Refrigerant 134a passes through a throttle valve as part of a refrigeration cycle. The fluid enters the valve as compressed liqu
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!