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
Maggie discovered that a pipe in her basement has sprung a leak. She calls a plumber but in the meantime she grabs a roll of duc
dem82 [27]

Answer:

The answer is "Option a".

Explanation:

Myelination was the myelinization mechanism of a neuron axon. The endothelium is enveloped all around the axon and isolates the axon that inhibits the neuronal message from leaking with the other neuronal axons. Inside this example, therefore, its tubes tape worked similarly to those of myelin sheath, which stops brain transmission.

3 0
3 years ago
U 4. Find 2 bridges in the US and answer the following:
Zarrin [17]

Answer:

Im guessing this is for CEA for PLTW, if so look up the exact assignment number and look at online examples of the exact same assignment.

Explanation:

6 0
3 years ago
To find the reactance XLXLX_L of an inductor, imagine that a current I(t)=I0sin(ωt)I(t)=I0sin⁡(ωt) , is flowing through the indu
Sophie [7]

Answer:

V(t) = XLI₀sin(π/2 - ωt)

Explanation:

According to Maxwell's equation which is expressed as;

V(t) = dФ/dt ........(1)

Magnetic flux Ф can also be expressed as;

Ф = LI(t)

Where

L = inductance of the inductor

I = current in Ampere

We can therefore Express Maxwell equation as:

V(t) = dLI(t)/dt ....... (2)

Since the inductance is constant then voltage remains

V(t) = LdI(t)/dt

In an AC circuit, the current is time varying and it is given in the form of

I(t) = I₀sin(ωt)

Substitutes the current I(t) into equation (2)

Then the voltage across inductor will be expressed as

V(t) = Ld(I₀sin(ωt))/dt

V(t) = LI₀ωcos(ωt)

Where cos(ωt) = sin(π/2 - ωt)

Then

V(t) = ωLI₀sin(π/2 - ωt) .....(3)

Because the voltage and current are out of phase with the phase difference of π/2 or 90°

The inductive reactance XL = ωL

Substitute ωL for XL in equation (3)

Therefore, the voltage across inductor is can be expressed as;

V(t) = XLI₀sin(π/2 - ωt)

3 0
3 years ago
When lining up the song on the tempo grid it is important to allow
Reika [66]

Tempo decides the speed at which the music is played.

<u>Explanation:</u>

The Tempo of a bit of music decides the speed at which it is played, and is estimated in beats per minute (BPM). The 'beat' is dictated when mark of the piece, so 100 BPM in 4/4 compares to 100 quarter notes in a single moment.

A quick tempo, prestissimo, has somewhere in the range of 200 and 208 beats for each moment, presto has 168 to 200 beats for every moment, allegro has somewhere in the range of 120 and 168 beats for every moment, moderato has 108 to 120 beats for every moment, moderately slow and even has 76 to 108, adagio has 66 to 76, larghetto has 60 to 66, and largo, the slowest rhythm, has 40 to 60.

6 0
2 years ago
What are the conditions for sheet generator to build up its voltage?
MA_775_DIABLO [31]

Answer:

There are six conditions

1. Poles should contain some residual flux.

2. Field and armature winding must be correctly connected so that initial mmm adds residual flux.

3. Resistance of field winding must be less than critical resistance.

4. Speed of prime mover of generator must be above critical speed.

5. Generator must be on load.

6. Brushes must have proper contact with commutators.

Explanation:

3 0
2 years ago
Other questions:
  • What entrepreneurial activities do you know?are you capable of doing entrepreneurial activities
    15·1 answer
  • The reverse water-gas shift (RWGS) reaction is an equimolar reaction between CO2 and H2 to form CO and H2O. Assume CO2 associati
    10·1 answer
  • An 1800-W toaster, a 1400-W electric frying pan, and a 75-W lamp are plugged into the same outlet in a 15-A, 120-V circuit. The
    12·1 answer
  • While having a discussion, Technician A says that you should never install undersized tires on a vehicle. The vehicle will be lo
    11·1 answer
  • or a metal pipe used to pump tomato paste, the overall heat- transfer coefficient based on internal area is 2 W/(m2 K). The insi
    14·1 answer
  • What is the activation energy (Q) for a vacancy formation if 10 moles of a metal have 2.3 X 10^13 vacancies at 425°C?
    9·1 answer
  • Force = 33 newtons
    7·1 answer
  • Compute the solution to x + 2x + 2x = 0 for Xo = 0 mm, vo = 1 mm/s and write down the closed-form expression for the response.
    8·1 answer
  • A type of adjustable square that can be used to set, test, and transfer angles is called a
    5·1 answer
  • What is differentiation​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!