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
The two boxcars A and B have a weight of 20000lb and 30000lb respectively. If they coast freely down the incline when the brakes
kolbaska11 [484]

Answer:

T=5.98 kips

Explanation:

First, introduce forces, acting on both cars:

on car A there are 4 forces acting: gravity force mA*g, normal reaction force, friction force and force T- it represents the interaction between cars A and B. On car B, there are three forces acting: gravity force, normal reaction force and force T. Note, that force T is acting on both cars, but it has opposite direction. Force T, acting on car A has direction, opposite to the friction force, whether the T, acting on B, is directed backwards- in the same direction with the friction force. Note, that both cars have the same acceleration, which is directed backwards.

Once the forces were established, we can write components of the Second Newtons Law on vertical and horizontal axes, considering that horizontal axis is directed backwards- in the same direction with the acceleration:

For car A on the vertical axis the equation is: -mAg+NA=0

For car A on the horizontal axis, the equation is: Ffr-T=mAa

For car B, on the vertical axis the equation is: -mBg+NB=0

For car B, on the horizontal axis, the equation is: T=mBa

We need to solve these equations to find force T, knowing that Ffr=μmAg, where

After the transformations, the equations for acceleration and force in the coupling will be:

a=(μmAg)/(mA+mB)=6.43 ft/s2- note, that the given answer is not correct for the given numerical values;

and force T: T=μmAmBg/(mA+mB)=6.0 kips- note, that the force answer is in line with the given numerical value

5 0
3 years ago
In multi-grade oil what is W means?
irga5000 [103]

Answer:

winter viscosity grades

Explanation:

The “W”/winter viscosity grades describe the oil's viscosity under cold temperature engine starting conditions. There's a Low Temperature Cranking Viscosity which sets a viscosity requirement at various low temperatures to ensure that the oil isn't too thick so that the starter motor can't crank the engine over.

4 0
3 years ago
What test should be performed on abrasive wheels
Svet_ta [14]

Answer:

before wheel is put on it should be looked at for damage and a sound or ring test should be done to check for cracks, to test the wheel it should be tapped with a non metallic instrument (I looked it up)

3 0
3 years ago
Read 2 more answers
You want to find all files on your server that have either the SGID or SUID permission set. Which command should you use to obta
aalyn [17]

Answer:

For SGID you type this

$ find . -perm /4000

For SUID you type this

$ find . -perm /2000

Explanation:

Auxiliary file permissions, that are commonly referred to as “special permissions” in Linux are needed in order to easily find files which have SUID (Setuid) and SGID (Setgid) set.

After typing

$ find directory -perm /permissions

Then type the commands in the attachment below to obtain a list of these files with SGID and SUID.

3 0
3 years ago
Sometimes, steel studs may not be used on outside walls because they are?
Helen [10]

Answer:

We can describe 15×-10 as an expression. we would describe 6×-2< 35 as an...

Explanation:

We can describe 15×-10 as an expression. we would describe 6×-2< 35 as an...

6 0
3 years ago
Other questions:
  • The pressure ratio of gas turbine power plant cycle, operating with air, corresponding to maximum work for a given temperature l
    14·1 answer
  • Which pendulum will.mobe faster​
    13·1 answer
  • A water jet jump involves a jet cross-sectional area of 0.01 m2 , and a jet velocity of 30 m/s. The jet is surrounded by entrain
    6·1 answer
  • What is the relationship between orifice diameter and pipe diameter​
    15·1 answer
  • How many kg / day of NaOH must be added to neutralize a waste stream generated by an industry producing 90,800 kg / day of sulfu
    6·2 answers
  • Why does an aeroplane smoke in the air​
    14·1 answer
  • ) If the blood viscosity is 2.7x10-3 Pa.s, length of the blood vessel is 1 m, radius of the blood vessel is 1 mm, calculate the
    13·1 answer
  • Component of earthing and reasons why each material is being used<br><br>​
    5·1 answer
  • Using the tables for water, determine the specified property data at the indicated states. In each case, locate the state on ske
    10·1 answer
  • Analyze the example of this band saw wheel and axle. The diameter of the wheel is 14 inches. The diameter of the axle that drive
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!