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
You work in a furniture store. You receive a
spin [16.1K]

Answer:

18 pieces of furniture

Explanation:

Since you receive $120.93 per furniture piece and a the month's commission is $2,176.74 you divide the commission by the furniture price.

  • 2176.74/120.93
3 0
3 years ago
Read 2 more answers
Technician A says that weld-on dent removal attachments may be used on a steel panel.
spin [16.1K]

Answer:

sjasfjajfhajshfdff

Explanation:

7 0
3 years ago
All machines have three fundamental hazards: moving parts, point of operation, and?
OlgaM077 [116]

Answer:

All machines have three fundamental hazards: moving parts, point of operation, and the power transmission.

Explanation:

The unit that supplies power to the machine is a critical hazard due to high energy sources being potential fatal if proper protocols are not followed. This is why lockout tagout (LOTO) measures are put in place in order to protect people while they work on equipment.

3 0
2 years ago
The equation sigma = My/l is used in the mechanics of materials to determine normal stresses in beams. When this equation is exp
Alenkinab [10]

Answer:

Part a : The SI unit of σ is Pascal.

Part b : The pressure is 414.28 psi.

Explanation:

Part a

The equation is given as

\sigma =\frac{My}{l}

As per the dimensional analysis

M=[N-m]\\y=[m]\\l=[m^4]

So the equation becomes

\sigma =\frac{[N-m][m]}{[m^4]}\\\sigma =\frac{[N][m^2]}{[m^4]}\\\sigma =\frac{[N]}{[m^{4-2}]}\\\sigma =\frac{[N]}{[m^{2}]}\\

As the dimensions are of pressure so the SI unit of σ is Pascal.

Part b

\sigma =\frac{My}{l}\\\sigma =\frac{2000 \times 0.1}{7 \times 10^{-5}}\\\sigma =2857142.857  \, Pa

Pressure in US customary base units is given in psi so

1 Pa =1.45 \times 10^{-4}\\

So

\sigma =2857142.857  \times 1.45 \times 10^{-4} psi\\\sigma =414.28 psi

So the pressure is 414.28 psi.

5 0
3 years ago
Which phase involves research to determine exactly what the client expects?
LiRa [457]

Answer:

B. identifying the need

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • Select the properties and typical applications for the high carbon steels.
    12·1 answer
  • Reasons for racking back on a wall
    15·1 answer
  • #198. Moment of inertia about center of a segmented bar A bar of width is formed of three uniform segments with lengths and area
    7·1 answer
  • A piston-cylinder assembly has initially a volume of 0.3 m3 of air at 25 °C. Mass of the air is 1 kg. Weights are put on the pis
    15·1 answer
  • A vernier caliper will measure in what ( URGENT)
    10·1 answer
  • A water reservoir contains 108 metric tons of water at an average elevation of 84 m. The maximum amount of electric energy that
    5·1 answer
  • If you are a subcontractor in the leather and apparel industry, you might make any of the following items EXCEPT which
    7·1 answer
  • Air enters a turbine with a stagnation pressure of 900 kPa and a stagnation temperature of 658K, and it is expanded to a stagnat
    9·1 answer
  • Write short notes on: (any four) a) Suspended ground floor b) Soil exploration c) Baulking of sand d) Bearing capacity of soil e
    12·1 answer
  • What is the gear ratio of the given train
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!