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
Steam at 6 MPa and 5008C enters a two-stage adiabatic turbine at a rate of 15 kg/s. 10 percent of the steam is extracted at the
loris [4]

Answer:

Bubblebutt

Explanation:

4 0
3 years ago
Air-conditioning principles are being discussed. Technician A states that heat always
Sunny_sXe [5.5K]

Answer: C.

Explanation:

7 0
3 years ago
Determine whether or not each of the following signals is periodic.
Sloan [31]

Answer:

a) periodic (N = 1)

b) not periodic

c) not periodic

d) periodic (N = 8)

e) periodic (N = 16)

Explanation:

For function to be a periodic: f(n) = f(n+N)

a) x[n]=sin(\frac{8\pi}{2}n+1)\\\\sin(\frac{8\pi}{2}n+1)=sin(4\pi n+1)

It is periodic with fundamental period N = 1

b) x[n]=cos(\frac{n}{8} -\pi)\\\\\frac{1}{8} N=2\pi k

N must be integer. So it is nor periodic

c) x[n]=cos(\frac{\pi}{8} n^2)\\\\cos(\frac{\pi}{8} (n+N)^2)=cos(\frac{\pi}{8} (n^2+N^2+2nN)\\\\N^2 = 16 \:\:or\:\:2nN=16

Since N is dependent to n. So it is not periodic.

d) x[n]=cos(\frac{\pi }{2}  n) cos(\frac{\pi }{4}  n)\\\\x[n] = \frac{1}{2} cos(\frac{3\pi }{4} n) + \frac{1}{2} cos(\frac{\pi }{4} n)\\\\N_1=8\:\:and\:\:N_2=8\\

So it is periodic with fundamental period N = 8.

e) x[n]=2cos(\frac{\pi }{4}  n)+sin(\frac{\pi }{8} n)-2cos(\frac{\pi }{2} n+\frac{\pi }{6} )\\\\N_1=8\:\:and\:\:N_2=16\:\:and\:\:N_3=4

So it is periodic with N = 16.

3 0
3 years ago
Consider a very long, cylindrical fin. The temperature of the fin at the tip and base are 25 °C and 50 °C, respectively. The dia
Mrrafil [7]

Answer:

The fin temperature in °C at a distance of 10 cm from the base = 33.78°C

Explanation:

The following assumptions will be made to solve this problem

- The heat transfer coefficient does not change with the time or distance.

- The temperature of the fins varies just in only one direction.

The temperature of the fin at x = 10 cm = 0.10 m from the base can be calculated from the temperature variation with distance formula for a very long fin.

(T - T∞) = (T₀ - T∞)e⁻ᵐˣ

T = T(x) = temperature at any point along the fin

T∞ = temperature at the tip of the fin = ambient temperature = 25°C

T₀ = temperature at the base of thw fin = 50°C

x = any distance along the length of the fin from the base of the fin = 0.1 m

m = √(hP/KA)

h = Heat transfer coefficient = 123 W/m².K

P = perimeter in contact with the base = πD = π × 0.03 = 0.0943 m

K = thermal conductivity = 150 W/m.K

A = surface area in contact with the base = πD²/4 = π(0.03)²/4 = 0.0007071 m²

m = √(123 × 0.0943)/(150 × 0.0007071)

m = 10.46

mx = 10.46 × 0.1 = 1.046

(T - 25) = (50 - 25) e⁻¹•⁰⁴⁶

T = 25 + 25 e⁻¹•⁰⁴⁶ = 25 + 8.78 = 33.78°C

8 0
3 years ago
A 4 cm diameter sphere of copper is initially at a temperature of 95 °C. It is placed in a very large water bath at time t- 0. T
avanturin [10]

Answer:112.376 s

Explanation:

Given

T_i=95^{\circ}C

T_f=35^{\circ}C

T_\infty \left ( ambient\right )=25^{\circ}C

h=400 watts/\left ( m^{2}^{\circ}C\right )

c=0.385 J/\left ( m^2^{\circ}C\right )

\rho =9 gm/cm^{3}

Using Newton's law of cooling

\frac{T_i-T_{\infty}}{T-T_{\infty}}=e^{\frac{ht}{\rho L_{c}c}}

\frac{95-25}{35-25}=e^{\frac{400\times 3\times 10^{-4}\times t}{9\times 2\times 0.385}}

7=e^{1.7316\times 10^{-2}\times t}

Taking log both side

t=112.376sec

4 0
3 years ago
Other questions:
  • A Capacitor is a circuit component that stores energy and can be charged when current flows through it. A current of 2A flows th
    15·1 answer
  • Calculate the availability of a system where the mean time between failures is 900 hours and the mean time to repair is 100 hour
    15·1 answer
  • F1 or MotoGP which one do u guys prefer.
    9·1 answer
  • An offshore oil rig will drill into the ocean floor which is located 1 mile below the water surface. Determine the pressure at t
    11·1 answer
  • Which of the following activities could be considered unethical?
    7·1 answer
  • Which of the following relationship types most closely resembles the relationship between the national importance of residential
    15·1 answer
  • 1. ¿Cómo esta simbolizada la Cena en el Antiguo testamento?
    11·1 answer
  • Why is it important to have knowledge on abbreviations, sign and symbols in masonry servicing job in the construction business s
    10·1 answer
  • 2. A F-22 Raptor has just climbed through an altitude of 9,874 m at 1,567 kph when a disk
    8·1 answer
  • More and more companies are discarding the traditional superior-subordinate performance feedback process and replacing it with:
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!