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
When using fall arrest, free fall must be kept at or below how many feet
FromTheMoon [43]
6 feet
Explanation: A few extra feet of free fall can significantly increase the arresting force on the employee, possibly to the point of causing injury. Because of this, the free fall distance should be kept at a minimum, and, as required by the standard, in no case greater than 6 feet (1.8 m).
5 0
3 years ago
Compute the volume percent of graphite, VGr, in a 2.5 wt% C cast iron, assuming that all the carbon exists as the graphite phase
ludmilkaskok [199]

Answer:

The volume percent of graphite is 91.906 per cent.

Explanation:

The volume percent of graphite (\% V_{Gr}) is determined by the following expression:

\%V_{Gr} = \frac{V_{Gr}}{V_{Gr}+V_{Fe}} \times 100\,\%

\%V_{Gr} = \frac{1}{1+\frac{V_{Gr}}{V_{Fe}} }\times 100\,\%

Where:

V_{Gr} - Volume occupied by the graphite phase, measured in cubic centimeters.

V_{Fe} - Volume occupied by the ferrite phase, measured in cubic centimeters.

The volume of each phase can be calculated in terms of its density and mass. That is:

V_{Gr} = \frac{m_{Gr}}{\rho_{Gr}}

V_{Fe} = \frac{m_{Fe}}{\rho_{Fe}}

Where:

m_{Gr}, m_{Fe} - Masses of the graphite and ferrite phases, measured in grams.

\rho_{Gr}, \rho_{Fe} - Densities of the graphite and ferrite phases, measured in grams per cubic centimeter.

Let substitute each volume in the definition of the volume percent of graphite:

\%V_{Gr} = \frac{1}{1 +\frac{\frac{m_{Gr}}{\rho_{Gr}} }{\frac{m_{Fe}}{\rho_{Fe}} } } \times 100\,\%

\%V_{Gr} = \frac{1}{1+\left(\frac{m_{Gr}}{m_{Fe}} \right)\cdot \left(\frac{\rho_{Fe}}{\rho_{Gr}} \right)}\times 100\,\%

Let suppose that 100 grams of cast iron are available, masses of each phase are now determined:

m_{Gr} = \frac{2.5}{100}\times (100\,g)

m_{Gr} = 2.5\,g

m_{Fe} = 100\,g - 2.5\,g

m_{Fe} = 97.5\,g

If m_{Gr} = 2.5\,g, m_{Fe} = 97.5\,g, \rho_{Fe} = 7.9\,\frac{g}{cm^{3}} and \rho_{Gr} = 2.3\,\frac{g}{cm^{3}}, the volume percent of graphite is:

\%V_{Gr} = \frac{1}{1+\left(\frac{2.5\,gr}{97.5\,gr} \right)\cdot \left(\frac{7.9\,\frac{g}{cm^{3}} }{2.3\,\frac{g}{cm^{3}} } \right)} \times 100\,\%

\% V_{Gr} = 91.906\,\%

The volume percent of graphite is 91.906 per cent.

6 0
3 years ago
Conclusion. What process is responsible for the bubbling action of the organism? What is your evidence?
noname [10]

Answer:

Explanation:

Hands-on Activity Bubbling Plants Experiment to Quantify Photosynthesis ... After running the experiment, students pool their data to get a large sample ... Explain that photosynthesis is a process that plants use to convert light ... Describe a simple experiment that provides indirect evidence that photosynthesis is occurring.

Through photosynthesis, certain organisms convert solar energy (sunlight) into ... of our planet continuously and is transferred from one organism to another. Therefore, directly or indirectly, the process of photosynthesis provides most of the energy ... Biology in Action ... Chlorophyll is responsible for the green color of plants.Photosynthetic organisms capture energy from the sun and matter from the air to ... oxygen produced during photosynthesis makes leaf bits float like bubbles in water. ... their ability to carry out photosynthesis, the biochemical process of capturing ... this air is forced out and replaced with solution, causing the leaves to sink.

6 0
3 years ago
What is the function of a fixed resistor?
agasfer [191]

Answer:

  add resistance to a circuit

Explanation:

It depends on the design in which it is incorporated. A fixed resistor has many uses, including, but not limited to ...

  • dropping voltage
  • limiting current
  • contributing to a time delay
  • adjusting frequency response
  • eliminating (or creating) signal reflections
  • acting as a fuse
  • calibrating or trimming a response
  • providing protection against electrical shock or ESD
  • acting as a reference when measuring variable resistors
8 0
3 years ago
A horizontal curve of a two-lane undivided highway (12-foot lanes) has a radius of 678 feet to the center line of the roadway. A
OLEGan [10]

Answer:

maximum speed for safe vehicle operation = 55mph

Explanation:

Given data :

radius ( R ) = 678 ft

old building located ( m )= 30 ft

super elevation = 0.06

<u>Determine the maximum speed for safe vehicle operation </u>

firstly calculate the stopping sight distance

m = R ( 1 - cos \frac{28.655*S}{R} )  ----  ( 1 )

R = 678  

m ( horizontal sightline ) = 30 ft

back to equation 1

30 = 678 ( 1 - cos (28.655 *s / 678 ) )

( 1 - cos (28.655 *s / 678 ) )  = 30 / 678 = 0.044

cos \frac{28.65 *s }{678}  = 1.044

hence ; 28.65 * s = 678 * 0.2956

s = 6.99 ≈ 7 ft

next we will calculate the design speed ( u ) using the formula below

S = 1.47 ut  + \frac{u^2}{30(\frac{a}{3.2} )-G1}  ----  ( 2 )

t = reaction time,  a = vehicle acceleration, G1 = grade percentage

assuming ; t = 2.5 sec , a = 11.2 ft/sec^2, G1 = 0

back to equation 2

6.99 = 1.47 * u * 2.5 + \frac{u^2}{30[(11.2/32.2)-0 ]}

3.675 u  + 0.0958 u^2 - 6.99 = 0

u ( 3.675 + 0.0958 u ) = 6.99

5 0
3 years ago
Other questions:
  • You will be observing laminar-turbulent transition for room temperature (about 20°C) water flowing in a 0.602"" ID pipe (Schedul
    8·1 answer
  • Explain the effect of heat transfer, reversibilities and irreversibilities on changes in entropy
    11·1 answer
  • Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the array's
    11·2 answers
  • List everything wrong with 2020
    5·2 answers
  • What do machines require in order to work?
    12·1 answer
  • A magnesium oxide component must not fail when a tensile stress of 14 MPa is applied. Determine the maximum allowable surface cr
    8·1 answer
  • Although many countries have issues with soil erosion due to deforestation, some of the most serious effects are seen
    8·1 answer
  • Their game off badminton is always on Tuesday
    11·1 answer
  • A system of organization, people activities, informations, and resources involved in supplying a productor or service to a custo
    5·2 answers
  • What do you mean by decentralization??​
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!