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
A metallic material with yield stress of 140 MPa and cross section of 300 mm x 100 mm, is subjected to a tensile force of 8.00 M
Readme [11.4K]

Answer:Yes,266.66 MPa

Explanation:

Given

Yield stress of material =140 MPa

Cross-section of 300\times 100 mm^2

Force(F)=8 MN

Therefore stress due to this Force(\sigma)

\sigma =\frac{F}{A}=\frac{8\times 10^6}{300\times 100\times 10^{-6}}

\sigma =266.66 \times 10^{6} Pa

\sigma =266.66 MPa

Since induced stress  is greater than Yield stress therefore Plastic deformation occurs

8 0
3 years ago
The device whose operation closely matches the way the clamp-on ammeter works is
Ivanshal [37]

Answer:

The answer is

C. Split phase motor

Explanation:

Clamp meters rely on the principle of magnetic induction to make non contact AC current measurements. Electric current flowing through a wire produces a magnetic field.

Which is similar to basic mode of operation of electric motor and split phase motor is a type of electric motor.

What is a a clamp on meter?

Clamp meters are electrical testers which have wide jaws that are able to clamp around an electrical conductor. Originally designed as a single purpose tool for measuring AC current, clamp meters now include inputs for accepting test leads and other probes that support a wide range of electrical measurements, the jaws of a clamp meter permit work in tight spaces and permits current measurements on live conductors without circuit interruption.

6 0
3 years ago
If superheated water vapor at 30 MPa iscooled at ​constant pressure​, it will eventually become saturated vapor, and with suffic
nirvana33 [79]

Answer:

False.

Explanation:

False. The pressure is above pressure at critical point (22.064 MPa.), the limit where pressure can prevent boiling.

3 0
2 years ago
Given below are the measured streamflows in cfs from a storm of 6-hour duration on a stream having a drainage area of 185 mi^2.
sertanlavr [38]

Answer:

33.56 ft^3/sec.in

Explanation:

Duration = 6 hours

drainage area = 185 mi^2

constant baseflow = 550 cfs

<u>Derive the unit hydrograph using the inverse procedure </u>

first step : calculate for the volume of direct runoff hydrograph using the details in table 2 attached below

Vdrh = sum of drh *  duration

        = 29700 * 6 hours ( 216000 secs )

        = 641,520,000 ft^3.

next step : Calculate the volume of runoff in equivalent depth

Vdrh / Area = 641,520,000  / 185 mi^2

                    = 1.49 in

Finally derive the unit hydrograph

Unit of hydrograph = drh /  volume of runoff in equivalent depth

                                = 50 ft^3 / 1.49 in  =  33.56 ft^3/sec.in

5 0
3 years ago
Write the following decorators and apply them to a single function (applying multiple decorators to a single function): 1. The f
natita [175]

Answer:

Complete question is:

write the following decorators and apply them to a single function (applying multiple decorators to a single function):

1. The first decorator is called strong and has an inner function called wrapper. The purpose of this decorator is to add the html tags of <strong> and </strong> to the argument of the decorator. The return value of the wrapper should look like: return “<strong>” + func() + “</strong>”

2. The decorator will return the wrapper per usual.

3. The second decorator is called emphasis and has an inner function called wrapper. The purpose of this decorator is to add the html tags of <em> and </em> to the argument of the decorator similar to step 1. The return value of the wrapper should look like: return “<em>” + func() + “</em>.

4. Use the greetings() function in problem 1 as the decorated function that simply prints “Hello”.

5. Apply both decorators (by @ operator to greetings()).

6. Invoke the greetings() function and capture the result.

Code :

def strong_decorator(func):

def func_wrapper(name):

return "<strong>{0}</strong>".format(func(name))

return func_wrapper

def em_decorator(func):

def func_wrapper(name):

return "<em>{0}</em>".format(func(name))

return func_wrapper

@strong_decorator

@em_decorator

def Greetings(name):

return "{0}".format(name)

print(Greetings("Hello"))

Explanation:

5 0
3 years ago
Other questions:
  • Using any of the bilinear transform, matched pole-zero, or impulse invariance techniques in converting a continuous-time system
    14·2 answers
  • Which of the following is an example of an iterative process?
    12·1 answer
  • A chemistry student accidentally drops a large mercury thermometer and it breaks. The thermometer contained 2 grams of mercury (
    13·1 answer
  • Pls help! 39 points!!
    5·2 answers
  • Various factors to be considered in deciding the factor of safety?
    14·1 answer
  • When must an Assured Equipment Grounding Conductor Program (AEGCP) be in place?
    10·1 answer
  • Heyyyyyyyyy people wrud
    7·1 answer
  • Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    9·1 answer
  • Technician A states that a scan tool can read
    13·1 answer
  • Which one of the following best defines hardness: (a) energy absorbed by a material when an object strikes its surface, (b) resi
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!