 A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

#### Important Notice!

Dear users, compscibits.com is now permanently moved to compsciedu.com. Please update all your links and bookmarks accordingly. Soon, the site will be accessible through URL compsciedu.com only.

 1. Given the following expressions of a grammarE --> E * F / F + E / FF --> F - F / idWhich of the following is true ? a. * has higher precedence than + b. - has higher precedence than * c. + and  - have same precedence d. + has higher precedence than *

 2. Which of the following is true while converting CFG to LL(1) grammar ? a. Remove left recursion alone b. Factoring grammar alone c. Both of the above d. None of the above

 3. Let L be a set accepted by a non deterministic finite automaton. The number of states in non-deterministic finite automaton is |Q|. The maximum number of states in equivalent finite automaton that accepts L is a. |Q| b. 2|Q| c. 2^|Q| – 1 d. 2^|Q|

 4. The grammar ‘G1’S ---> OSO| ISI | 0|1|∈and the grammar  ‘G2’ isS ---> as |asb| X,X -----> Xa | a.Which is the correct statement ? a. G1 is ambiguous, G2 is unambiguous b. G1 is unambiguous, G2 is ambiguous c. Both G1 and G2 are ambiguous d. Both G1 and G2 are unambiguous

 5. Which of the following regular expression identities are true ? a. (r + s)* = r* s* b. (r + s)* = r* + s* c. (r + s)* = (r*s*)* d. r* s* = r* + s*

 6. The minimum number of states of the non-deterministic finite automation which accepts the language{a b a bn| n  ≥  0} ∪ {a b an|n  ≥ 0} is a. 3 b. 4 c. 5 d. 6

 7. Which of the following definitions generates the same Language as L, whereL = {WWR | W ∈ {a, b}*} a. S ∈ asb|bsa|∈ b. S ∈ asa|bsb|∈ c. S ∈ asb|bsa|asa|bsb|∈ d. S ∈ asb|bsa|asa|bsb