Set of multiple choice questions for programming with prizes

In the article below we will try to do the programming related exercises offline.

  1. Question 1. Let the grammar G = {Σ, ∆, P, S}, analyze the string according to the analysis method LL (1), the success state is:
    1. Stack: $ S, Input: $

    2. Stack: $, Input: $
    3. Stack: $ S, Input: S $
    4. Stack: $ S, Input: a $
  2. Question 2. Give grammar G = {E → EE * | EE + | a | b} ∑ = {a, b, *, +} ∆ = {E} Which of the following is generated by G
    1. a ++ b *

    2. ab ++ a *

    3. ab + three *

    4. No sentence correctly
  3. 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)
    1. 7
    2. 8
    3. 9
    4. ten
  4. 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:
    1. abE + E * +

    2. aEE * +

    3. aEE + + E *
    4. Abb + E * +

  5. 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)
    1. abE + E * +

    2. aEE * +

    3. aEE + E * +

    4. Abb + E * +

  6. Question 6. For grammar G = {S → aSb | bSa | SS | a |} ∑ = {a, b} ∆ = {S} Which of the following strings is generated by G:
    1. abbaa

    2. aaba

    3. bbaaaa

    4. All right
  7. Question 7. For grammar G = {S → aSb | bSa | SS | a |} ∑ = {a, b} ∆ = {S} Which of the following is NOT generated by G:
    1. abbaab

    2. baabab

    3. abbaabb

    4. babbaaa

  8. Question 8. Which of the following grammar does NOT perform analysis by topdown analysis method?
    1. G = {S ® aaA | abA;A®bA | A®bA |a} a}

    2. G = {S ® Aa | b;A®Ab | A®Ab |Sa} Sa}

    3. G = {S ® Aa | b;A® aA | A® aA |a} a}

    4. G = {S ® Aa | b;A®bA | A®bA |b} b}

  9. Question 9. Which of the following grammar is analyzed by analytical method LL (1)?
    1. G = {S ® aaA | abA;A®bA | A®bA |a} a}

    2. G = {S ® Aa | b;A®Ab | A®Ab |Sa} Sa}

    3. G = {S ® Aa | b;A® aA | A® aA |a} a}

    4. G = {S ® Aa | b;A®bA | A®bA |b} b}

  10. Question 10. Given the grammar G = {,, P, S}, analyze the string according to the bottom-up analysis method, the success state is:
    1. Stack: $ S, Input: $

    2. Stack: $, Input: $

    3. Stack: $ S, Input: S $
    4. Stack: $ S, Input: a $

Update 24 May 2019
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile