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
kifflom [539]
3 years ago
15

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 = , VIE 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. (25 points)

Engineering
1 answer:
zubka84 [21]3 years ago
4 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

3.

Follow of nullable variable X is Follow (V).

Follow (S) = $

Follow (T) = {z, w}

Follow (V) = ;

Follow (X) = Follow (V) = ;

Follow (C) = , and ;

Explanation:

You might be interested in
What is the sun's degree angle in the sky in summer and in winter?
Vladimir [108]

Answer:

At the time of the summer or winter solstices, the Sun is 23.44° degrees above or below the horizon, respectively, irrespective of time of day.

Explanation:

6 0
2 years ago
If you were to plot the voltage versus the current for a given circuit, what would you expect the slope of the line to be? If no
Brut [27]

Answer:

Part 1: It would be a straight line, current will be directly proportional to the voltage.

Part 2: The current would taper off and will have negligible increase after the voltage  reaches a certain  value. Graph attached.

Explanation:

For the first part, voltage and current have a linear relationship as dictated by the Ohm's law.

V=I*R

where V is the voltage, I is the current, and R is the resistance. As the Voltage increase, current is bound to increase too, given that the resistance remains constant.

In the second part, resistance is not constant. As an element heats up, it consumes more current because the free sea of electrons inside are moving more rapidly, disrupting the flow of charge. So, as the voltage increase, the current does increase, but so does the resistance. Leaving less room for the current to increase. This rise in temperature is shown in the graph attached, as current tapers.

7 0
3 years ago
A horizontal pipe has an abrupt expansion from D1 5 8 cm to D2 5 16 cm. The water velocity in the smaller section is 10 m/s and
anyanavicka [17]
  • Answer:  Explanation:  Application of the bernoulli's equation comes in from conservation of mass flow.  The cross sectional area of the two pipes are calculated. from A = πD²/4 The velocity of water from conservation of mass flow is also calculated ; V2 = Ac1V1/Ac2 The Loss coefficient is then calculated from KL = (1 - Ac1²/Ac2²)² Then the head Loss (hL) is calculated  The detailed calculated and appropriate steps is as shown in the attached files.

5 0
3 years ago
please help me answer 3 of these questions in complete sentences. this is ccrd 1 related to jobs and college. thanks so much if
Kitty [74]

Answer:

1. Work is a driving force of identity in your life, whether its because it influences you due to the time spent there. Or its truly a passion of yours.

2. Two main aspects of identity development are self-concept and self-esteem

3. Based on you obviously

Hope this helped!

Explanation:

5 0
3 years ago
Which of the following is a valid reason why a scientist might reject a scientific theory
Flauer [41]
C I think hope it helps :)
6 0
2 years ago
Read 2 more answers
Other questions:
  • For some transformation having kinetics that obey the Avrami equation , the parameter n is known to have a value of 1.1. If, aft
    6·1 answer
  • A gasoline engine has a piston/cylinder with 0.1 kg air at 4 MPa, 1527◦C after combustion, and this is expanded in a polytropic
    14·1 answer
  • Part of the following pseudocode is incompatible with the Java, Python, C, and C++ language Identify the problem. How would you
    12·1 answer
  • An inventor claims to have developed a heat engine that produces work at 10 kW, while absorbing heat at 10 kW. Evaluate such a c
    12·1 answer
  • Which type of Bridge is considered the strongest in both compression and tension?
    11·2 answers
  • Can U lose a rank in Brainly by using too many points?
    6·1 answer
  • Which of the following machine parts always require
    12·1 answer
  • When could you use the engineering design process in your own life?
    9·1 answer
  • Summarize the difference in hydraulic and pneumatic systems.
    12·1 answer
  • Principals of Construction intro
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!