-
Stack: $ S, Input: $
-
Stack: $, Input: $
-
Stack: $ S, Input: S $
-
Stack: $ S, Input: a $
Set of multiple choice questions for programming with prizes
In the article below we will try to do the programming related exercises offline.
-
Question 1. Let the grammar G = {Σ, ∆, P, S}, analyze the string according to the analysis method LL (1), the success state is:
-
Question 2. Give grammar G = {E → EE * | EE + | a | b} ∑ = {a, b, *, +} ∆ = {E} Which of the following is generated by G
-
a ++ b *
-
ab ++ a *
-
ab + three *
-
No sentence correctly
-
-
Question 3. Give grammar G = {E → EE * | EE + | a | b} ∑ = {a, b, *, +} ∆ = {E} Sequence of abb ++ a * in G includes many steps of deduction (how many times apply the law of birth)
-
7
-
8
-
9
-
ten
-
-
Sentence 4. Give grammar G = {E → EE * | EE + | a | b} ∑ = {a, b, *, +} ∆ = {E} 5th sentence form (the first sentence is E) in The most left-out sequence of the abb ++ a * string in G is:
-
abE + E * +
-
aEE * +
-
aEE + + E *
-
Abb + E * +
-
-
Question 5. For grammar G = {E → EE * | EE + | a | b} ∑ = {a, b, *, +} ∆ = {E} Sequence of abb ++ a * in G includes many leads (how many times apply the law of birth)
-
abE + E * +
-
aEE * +
-
aEE + E * +
-
Abb + E * +
-
-
Question 6. For grammar G = {S → aSb | bSa | SS | a |} ∑ = {a, b} ∆ = {S} Which of the following strings is generated by G:
-
abbaa
-
aaba
-
bbaaaa
-
All right
-
-
Question 7. For grammar G = {S → aSb | bSa | SS | a |} ∑ = {a, b} ∆ = {S} Which of the following is NOT generated by G:
-
abbaab
-
baabab
-
abbaabb
-
babbaaa
-
-
Question 8. Which of the following grammar does NOT perform analysis by topdown analysis method?
-
G = {S ® aaA | abA;A®bA | A®bA |a} a}
-
G = {S ® Aa | b;A®Ab | A®Ab |Sa} Sa}
-
G = {S ® Aa | b;A® aA | A® aA |a} a}
-
G = {S ® Aa | b;A®bA | A®bA |b} b}
-
-
Question 9. Which of the following grammar is analyzed by analytical method LL (1)?
-
G = {S ® aaA | abA;A®bA | A®bA |a} a}
-
G = {S ® Aa | b;A®Ab | A®Ab |Sa} Sa}
-
G = {S ® Aa | b;A® aA | A® aA |a} a}
-
G = {S ® Aa | b;A®bA | A®bA |b} b}
-
-
Question 10. Given the grammar G = {,, P, S}, analyze the string according to the bottom-up analysis method, the success state is:
-
Stack: $ S, Input: $
-
Stack: $, Input: $
-
Stack: $ S, Input: S $
-
Stack: $ S, Input: a $
-
Similar Post
- Set of multiple choice questions on award winning P4 programming
- Set of multiple choice questions on programming with P14 prize
- Set of multiple choice questions on programming with P16 prize
- Set of multiple choice questions on programming with P9
- Set of multiple choice questions about programming with P17 prize
- Set of multiple choice questions on programming with P3 prize