0 оценок0% нашли этот документ полезным (0 голосов)
165 просмотров11 страниц
This document contains 50 questions with multiple choice answers related to computer science topics such as algorithms, data structures, programming, databases, operating systems, networks and software engineering. The questions cover concepts like function overloading, data flow diagrams, cyclomatic complexity, binary search trees, finite automata, context-free grammars, regular expressions, scheduling algorithms and more.
This document contains 50 questions with multiple choice answers related to computer science topics such as algorithms, data structures, programming, databases, operating systems, networks and software engineering. The questions cover concepts like function overloading, data flow diagrams, cyclomatic complexity, binary search trees, finite automata, context-free grammars, regular expressions, scheduling algorithms and more.
This document contains 50 questions with multiple choice answers related to computer science topics such as algorithms, data structures, programming, databases, operating systems, networks and software engineering. The questions cover concepts like function overloading, data flow diagrams, cyclomatic complexity, binary search trees, finite automata, context-free grammars, regular expressions, scheduling algorithms and more.
2. OLAP is an acronym for Ans. Online Analytical Processing
3. Architectural design involves in SE Ans. DFD- Data Flow Diagrams
4. An EDP auditor must be an expert in Ans. Computerised Business Systems
5. If no exception is thrown Ans. All catch blocks coded will be bypassed
6. Consider the following pseudo-code : IF ((A > B) AND (C > D)) THEN A = A + 1 B = B + 1 ENDIF The cyclomatic complexity of the pseudo-code is Ans. 3
7. Which of the following testing methods is normally used as the acceptance test for a software system ? Ans. Functional testing
8. Match the following I. The beginning of the function code 1. ( ) II. The preprocessor directive always starts with 2. & III. The symbol for the address operator 3. { IV. The name of a function s ends with 4. # I II III IV Ans. 3 4 2 1
9. Match the following : 1. Data Link Layer i. The lowest layer whose function is to activate, deactivate and maintain the circuit between DTE and DCE 2. Physical Layer ii. Perform routing 3. Presentation iii. Detection and Layer recovery of errors in the transmitted data 4. Network Layer iv. Provides syntax for the data Ans. 1 iii, 2 i, 3 iv, 4 ii
10. Match the following : I. 0 (log n) 1. Heap sort II. 0 (n) 2. DFS III. 0 (n log n) 3. Binary search IV. 0 (n 2 ) 4. Bubble sort Ans. I 3, II 2, III 1, IV 4
11. The string accepted by the following finite Automaton
where a, b are alphabets, q0, q1, and q2 are states and q2 is final state Ans. ab (a + b)*
12. What is the maximum number of different Boolean functions involving n Boolean variables ? Ans. 2 2n
Choose the category of following SQL operations INSERT, DELETE and UPDATE Ans. DML
14. Let G be a simple graph all of whose vertices have degree 3 and |E| = 2 |V| - 3 what can be said about G ? (A) G has 6 vertices and 9 edges
15. Which of the following graph is isomorphic to given below graph ?
16. Consider the join of a relation R with a relation S. If R has m tuples and S has n tuples, then the maximum and minimum sizes of the join respectively are Ans. mn and 0
17. Assertion A : The technique of building new classes from the existing classes is called polymorphism. Reason R : Polymorphism requires postponement of binding of a function call to the member function until runtime. Ans. Only (R) is true and (A) is false
18. Suppose a tree has d1 vertices of degree 1, 2 vertices of degree 2, 4 vertices of degree 3 and 3 vertices of degree 4 then d1 value is Ans. 12
19. A Binary Search Tree (BST) stores values on the range 37 to 573. Consider the following sequence of keys i. 81, 537, 102, 439, 285, 376, 305 ii. 52, 97, 121, 195, 242, 381, 472 iii. 142, 248, 520, 386, 345, 270, 307 iv. 550, 149, 507, 395, 463, 402, 270 Which of the following statements is TRUE ? Ans. ii is an inorder sequence of some BST where 121 is the root and 52 in a leaf
20. Assertion A : Implicit type conversion in C++ can lead to errors keeping into the program, if adequate care is not taken. Reason R : Use of explicit type conversion is recommend in mixed mode expression. Ans. Both (A) and (R) are true and (R) is the reason for (A)
21. If X is a Boolean variable, then among following what are the statements true according to Idempotent law ? I. X + X = X II. X . X = X III. X . 1 = X IV. X + 1 = 1 Ans. I and II are correct
22. Exterior Gateway Protocol is Ans. To exchange routing information between gateway hosts
23. Find the following statements in the context of software testing are TRUE or FALSE S1 : Statement coverage cannot guarantee execution of loops in a program under test. S2 : Use of independent path testing criterion guarantees execution of each loop in a program under test more than once. Ans. True, False
24. Match the following : I. To add 2 bits 1. Full adder II. To add 3 bits 2. Left shift by 1 bit III. To multiply by 2 3. Right shift by 1 bit IV. To divide by 2 4. Half adder I II III IV Ans. 4 1 2 3
25. A medium access control technique for multiple access transmission media is Ans. ALOHA
26. In a software project, COCOMO (Constructive Cost Model) is used to estimate Ans. Effort and duration based on the size of the software
27. The gray code for decimal 7 is Ans. 1011
28. Error detection at the data link level is achieved by Ans. Cyclic redundancy codes
29. In Unix, the file descriptor returned by open system call is of type Ans. Integer
30. The string 1101 does not belong to the set represented by Ans. (10)* (01)* (00 + 11)*
31. Which of the following tool is known as parser generator ? Ans. YAAC
32. The task of the Lexical Analysis phase is (A) To parse the source program into the basic elements or tokens of the language (B) To build a literal table and an identifiertable (C) To build a uniform symbol table Ans. All of the above
33. Match the following : I. The processes ID 1. grep II. Editor 2. ps III. Searching in files 3. cat IV. Printing a file 4. vi I II III IV Ans. 2 4 1 3
34. Consider this C code to swap two integers and these five statements: void swap (int * px, int * py) { * px = *px *py ; *py = *px + *py; *px = *py *px; } S1 : Will generate a compilation error S2 : May generate a segmentation fault at runtime depending on the arguments passed S3 : Correctly implement the swap procedure for all input pointers referring to integers stored in memory locations accessible to the process S4 : Implements the swap procedure correctly for some but not all valid input pointers. S5 : May add or subtract integers and pointers. Ans. S2 and S3
35. A compiler for a high level language that runs on one machine and produces code for a different machine is called Ans. Cross compiler
36. Match the following : I. Deadlock avoidance 1. Shortest job first algorithm II. CPU scheduling 2. LRU algorithm III. Mutual exclusion 3. Bankers algorithm IV. Page replacement 4. Petersons algorithm I II III IV Ans. 3 1 4 2
37. Match the following: P. Regular expression 1. Syntax analysis Q. Pushdown automata 2. Code generation R. Dataflow analysis 3. Lexical analysis S. Register allocation 4. Code optimization Ans. P 3, Q 1, R 4, S 2
38. Reasoning with uncertain knowledge can be dealt with Ans. Non-monotonic reasoning
39. Which of the following eliminates transitive dependency? Ans. BCNF
40. Electronic credit cards can be in (A) Unencrypted (B) Encrypted Ans. Both A and B
41. Consider the following two statements i. A Hash function is an injective function which is often used for computing digital signature ii. An encryption technique DES performs a permutation on the elements of its input alphabet Which of the following is valid for the above two statements? Ans. Both are true
42. Select A, B, C from loan table consisting of fields A, B, C, D, E, F ABC(loan)
43. The number of flipflops required in a decade counter is Ans. 4
44. Which of the following is a non-linear data structure? i. Stack ii. Queue iii. Tree iv. Graph v. Doubly linked list Ans. iii&iv
45. Consider the following statements : P : A page fault occurs when the required page is not available in the main memory. Q : There exists a situation that, there is no space available in the main memory. Which of the following is true ? Ans. Both P and Q are true, and Q is also a reason for P
46. Which of the following propositions is a tautology ? Ans. pv (p->q)
47. Fense Register is used for Ans. File protection
48. SQL stands for (A) Structured Query Language
49. Active X control can be added to a webpage by using Ans. < OBJECT> tag
50. Consider 4 processes P1, P2, P3 and P4 Process Arrival time Time units required P1 0 5 P2 1 7 P3 3 4 P4 4 6 Find the completion order of the 4 processes if round robin policy applies (round robin with the quantum of 2 time units)
Ans. P3P1P4P2
1. The grammar G1 S OSO| ISI | 0|1| and the grammar G2 is S as |asb| X, X Xa | a. Which is the correct statement ? [Paper III December 2012] (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
2. Which of the following regular expression identities are true? [Paper III December 2012] (A) (r + s)* = r* s* (B) (r + s)* = r* + s* (C) (r + s)* = (r*s*)* (D) r* s* = r* + s*
3. The minimum number of states of the non-deterministic finite automation which accepts the language [Paper III December 2012] {a b a b n | n 0} U {a b a n |n 0} is (A) 3 (B) 4 (C) 5 (D) 6
4. Which of the following definitions generates the same Language as L, where L = {WWR | W {a, b}*} [Paper III December 2012] (A) S asb|bsa| (B) S asa|bsb| (C) S asb|bsa|asa|bsb| (D) S asb|bsa|asa|bsb
5. If the parse tree of a word w generated by a Chomsky normal form grammar has no path of length greater than i, then the word w is of length [Paper III December 2012] (A) no greater than 2 i+1
(B) no greater than 2 i
(C) no greater than 2 i1
(D) no greater than i
6. Given the following statements: [Paper III December 2012] (i) Recursive enumerable sets are closed under complementation. (ii) Recursive sets are closed under complementation. Which is/are the correct statements ? (A) only (i) (B) only (ii) (C) both (i) and (ii) (D) neither (i) nor (ii)
7. Which one of the following statement is false? [Paper II December 2011] (A) Context-free languages are closed under union. (B) Context-free languages are closed under concatenation (C) Context-free languages are closed under intersection.
(D) Context-free languages are closed under Kleene closure.
1. B A context-free grammar is said to be an ambiguous grammar if there exists a string which can be generated by the grammar in more than one way (i.e. the string admits more than one parse tree or, equivalently, more than one leftmost derivation). Any grammar can be proved ambiguous if we are able to find at least one string with more than one left-most derivation accepted by the grammar. In the given question we cannot find any such strings for G1. Consider G2, take the case of aaa, two possible derivations are: (1) S aS (2) S aS aX // Using S X aaS // Using S aS aXa // Using X Xa aaX // Using S X aaa // Using X a aaa // Using S a So G1 is unambiguous and G2 is ambiguous
2. C (r + s)* should be understood as any number of repetitions of r OR s. It can be thought of as a bag containing r and s, and we taking out any of these one by one. r* s* says 0 or more r followed by 0 or more s, there is no scope or any r after any s. So they are not equivalent. r* + s* says either r* OR s*, so this is also not equivalent. (r*s*)* says a bag containing string with 0 or more r followed by 0 or more s. we can take out 0 or more strings one by one. Using this we can construct any string defined by (r + s)*. So this is the answer.
3. B (But UGC says C!!) The regular expressions corresponding to the given language is { abab* U aba*} = aba*b* The NFA can be drawn as
So we need only 4 states to represent this language.
4. B
5. C
6. B
7. C Context-free languages are not closed under: intersection and complement. Context-free languages are closed under: union, concatenation, star, string reversal, homomorphism and intersection with a regular language
11. The equivalent grammar corresponding to the grammar G : S aA, A BB, B aBb | is [Paper III June 2012] (A) S aA, A BB, B aBb (B) S a | aA, A BB, B aBb | ab (C) S a | aA, A BB | B, B aBb (D) S a | aA, A BB | B, B aBb | ab
14. The regular expression for the following DFA is [Paper III June 2012]
15. Match the following: [Paper III June 2012] (i) Regular Grammar (a) Pushdown automaton (ii) Context free Grammar (b) Linear bounded automaton (iii) Unrestricted Grammar (c) Deterministic finite automaton (iv) Context Sensitive Grammar (d) Turing machine (i) (ii) (iii) (iv) (A) (c) (a) (b) (d) (B) (c) (a) (d) (b) (C) (c) (b) (a) (d) (D) (c) (b) (d) (a)
16. Consider the following statements: [Paper II June 2012] I. Recursive languages are closed under complementation. II. Recursively enumerable languages are closed under union. III. Recursively enumerable languages are closed under complementation. Which of the above statements are true? (A) I only (B) I and II
(C) I and III (D) II and I
11. D Strings that are legal according to the given grammar is a, aab, aabab etc Out of the options the grammar that can produce all these strings is D Option B seems to be correct in first look, but fails to produce aab.
14. D
15. B Grammar Type Language machine Type 0 Recurssively Enumerable/ Un restricted/ Phase structured/ Semithus Turing Machine Type 1 Context Sensitive Linear Bounded Automata Type 2 Context Free Pushdown Automata Type 3 Regular Finite Automata
16. B Recursively enumerable languages are closed under the following operations: Kleene star L* concatenation of L and P union of L and P intersection L and P. Recursive languages are closed under the following operations: Kleene star L* Concatenation L and P Union L and P Intersection L and P Complement of L Set difference L - P So only Statements I and II are true.
1.Recursive descent parsing is an example of a)top-down parsing b)bottom-up c)predictive d)none
2.Which of the following is the most powerful parser a)SLR b)LALR c)Canonical LR d)operator-precedence
3.Choose the incorrect statement a)LL(k) grammar has to be CFG. b)LL(k) grammar has to be unambiguous c)There are LL(k) grammars that are not context-free d)LL(k) grammars can't have left recursive non-terminals.
4.The grammar E -->E+E| E*E | a,is a)ambiguous c)ambiguous or not depends on the given sentence. b)unambiguous d)none
1.a 2.c 3.c 4.a 1. Which of the following derivations does a top- down parser use while parsing an input string? The input is assumed to be scanned in left to right order (GATE CS 2000). (a) Leftmost derivation (b) Leftmost derivation traced out in reverse (c) Rightmost derivation (d) Rightmost derivation traced out in reverse Answer (a) Top-down parsing (LL) In top down parsing, we just start with the start symbol and compare the right side of the different productions against the first piece of input to see which of the productions should be used. A top down parser is called LL parser because it parses the input from Left to right, and constructs aLeftmost derivation of the sentence. Algorithm (Top Down Parsing)
a) In the current string, choose leftmost nonterminal. b) Choose a production for the chosen nonterminal. c) In the string, replace the nonterminal by the right-hand-side of the rule. d) Repeat until no more nonterminals. LL grammars are often classified by numbers, such as LL(1), LL(0) and so on. The number in the parenthesis tells the maximum number of terminals we may have to look at at a time to choose the right production at any point in the grammar. The most common (and useful) kind of LL grammar is LL(1) where you can always choose the right production by looking at only the first terminal on the input at any given time. With LL(2) you have to look at two symbols, and so on. There exist grammars that are not LL(k) grammars for any fixed value of k at all, and they are sadly quite common. Let us see an example of top down parsing for following grammar. Let input string be ax.
S -> Ax A -> a A -> b An LL(1) parser starts with S and asks which production should I attempt? Naturally, it predicts the only alternative of S. From there it tries to match A by calling method A (in a recursive-descent parser). Lookahead a predicts production
A -> a The parser matches a, returns to S and matches x. Done. The derivation tree is:
S / \ A x | a References: http://www.garshol.priv.no/download/text/bnf.html http://en.wikipedia.org/wiki/Top-down_parsing http://www.cs.wm.edu/~noonan/animations/lderive.ht ml http://en.wikipedia.org/wiki/LL_parser
2. The process of assigning load addresses to the various parts of the program and adjusting the code and data in the program to reflect the assigned addresses is called (GATE CS 2001) a) Assembly b) Parsing c) Relocation d) Symbol resolution Answer: (c) Relocation is the process of replacing symbolic references or names of libraries with actual usable addresses in memory before running a program. It is typically done by the linker during compilation (at compile time), although it can be done at runtime by a relocating loader. Compilers or assemblers typically generate the executable with zero as the lower-most starting address. Before the execution of object code, these addresses should be adjusted so that they denote the correct runtime addresses. Relocation is typically done in two steps: 1. Each object code has various sections like code, data, .bss etc. To combine all the objects to a single executable, the linker merges all sections of similar type into a single section of that type. The linker then assigns runtime addresses to each section and each symbol. At this point, the code (functions) and data (global variables) will have unique runtime addresses. 2. Each section refers to one or more symbols which should be modified so that they point to the correct runtime addresses. References: http://en.wikipedia.org/wiki/Relocation_(computer_sci ence)
3. Which of the following statements is false? (GATE CS 2001) a) An unambiguous grammar has same leftmost and rightmost derivation b) An LL(1) parser is a top-down parser c) LALR is more powerful than SLR d) An ambiguous grammar can never be LR(k) for any k Answer: (a) If a grammar has more than one leftmost (or rightmost) derivation for a single sentential form, the grammar is ambiguous. The leftmost and rightmost derivations for a sentential form may differ, even in an unambiguous grammar
4. Which of the following grammar rules violate the requirements of an operator grammar? P, Q, R are nonterminals, and r,s,t are terminals (GATE CS 2004). (i) P -> QR (ii) P -> QsR (iii) P -> (iV) P -> QtRr a) (i) only b) (i) and (iii) only c) (ii) and (iii) only d) (iii) and (iv) only Answer: (b) Explanation: An operator precedence parser is a bottom-up parser that interprets an operator-precedence grammar. For example, most calculators use operator precedence parsers to convert from the human-readable infix notation with order of operations format into an internally optimized computer-readable format like Reverse Polish notation (RPN). An operator precedence grammar is a kind of context- free grammar that can be parsed with an operator- precedence parser. It has the property that no production has either an empty ( ) right-hand side or two adjacent nonterminals in its right-hand side. These properties allow the terminals of the grammar to be described by a precedence relation, and the a parser that exploits that relation is considerably simpler than more general-purpose parsers such as LALR parsers. References: http://en.wikipedia.org/wiki/Operator- precedence_grammar http://en.wikipedia.org/wiki/Operator- precedence_parser
5. Consider the grammar with the following translation rules and E as the start symbol. E -> E1 #T {E.value = E1.value * T.value} | T {E.value = T.value} T -> T1 & F {T.value = T1.value + F.value} |F {T.value= F.value} F -> num {F.value = num.value} Compute E.value for the root of the parse tree for the expression:2 # 3 & 5 # 6 &4. (GATE CS 2004) a) 200 b) 180 c) 160 d) 40 Answer: (c) Explanation: We can calculate the value by constructing the parse tree for the expression 2 # 3 & 5 # 6 &4. Alternatively, we can calculate by considering following precedence and associativity rules. Precedence in a grammar is enforced by making sure that a production rule with higher precedence operator will never produce an expression with operator with lower precedence. In the given grammar & has higher precedence than #. Left associativity for operator * in a grammar is enforced by making sure that for a production rule like S -> S1 * S2 in grammar, S2 should never produce an expression with *. On the other hand, to ensure right associativity, S1 should never produce an expression with *. In the given grammar, both # and & are left-associative. So expression 2 # 3 & 5 # 6 &4 will become ((2 # (3 & 5)) # (6 & 4)) Let us apply translation rules, we get ((2 * (3 + 5)) * (6 + 4)) = 160.
6. Given the following expression grammar: E -> E * F | F+E | F F -> F-F | id which of the following is true? (GATE CS 2000) (a) * has higher precedence than + (b) has higher precedence than * (c) + and have same precedence (d) + has higher precedence than * Answer(b) Precedence in a grammar is enforced by making sure that a production rule with higher precedence operator will never produce an expression with operator with lower precedence. In the given grammar - has higher precedence than *
7. Consider a program P that consists of two source modules M1 and M2 contained in two different files. If M1 contains a reference to a function defined in M2 the reference will be resolved at (GATE CS 2004) a) Edit time b) Compile time c) Link time d) Load time Answer (c) Compiler transforms source code into the target language. The target language is generally in binary form known as object code. Typically, an object file can contain three kinds of symbols: * defined symbols, which allow it to be called by other modules, * undefined symbols, which call the other modules where these symbols are defined, and * local symbols, used internally within the object file to facilitate relocation. When a program comprises multiple object files, the linker combines these files into a unified executable program, resolving the symbols as it goes along. http://en.wikipedia.org/wiki/Compiler http://en.wikipedia.org/wiki/Linker_%28computing%2 9
8. Which of the following suffices to convert an arbitrary CFG to an LL(1) grammar? (GATE CS 2003) (a) Removing left recursion alone (b) Factoring the grammar alone (c) Removing left recursion and factoring the grammar (d) None of the above Answer(d) Removing left recursion and factoring the grammar do not suffice to convert an arbitrary CFG to LL(1) grammar. http://pages.cpsc.ucalgary.ca/~robin/class/411/LL1.3.ht ml
9. Assume that the SLR parser for a grammar G has n1 states and the LALR parser for G has n2 states. The relationship between nl and n2 is (GATE CS 2003) (a) n1 is necessarily less than n2 (b) n1 is necessarily equal to n2 (c) n1 is necessarily greater than n2 (d) none of the above Answer (b)
1. Which code is known as machine code that is processed or executed by the processor? A. Source code B. Object code C. MSIL code D. Byte Code Answer Option : B 2. Low level language is also called as __________. A. Machine language B. Binary language C. A and B are same D. High level language Answer Option : C 3. Which programming language use symbolic codes called MNEMONICS for developing the program? A. Machine language B. Low level language C. High level language D. Assembly language Answer Option : D 4. Which programming language uses constraint rather than algorithm? A. SQL B. C++ C. Assembly D. PROLOG Answer Option : D 5. Which program allows text to be entered and changed? A. Editor B. Translator C. Compiler D. Interpreter Answer Option : A 6. Which program is known as translator , which read the whole code written in high level language at once and then convert it into machine language? A. Editor B. Linker C. Compiler D. Interpreter Answer Option : C 7. Which is a translator program, which read the code written in high level language line by line convert it into machine language? A. Linker B. Editor C. Compiler D. Interpreter Answer Option : D 8. Which program combine two or more object modules into a single object module or into an executable file? A. Linker B. Interpreter C. Assembler D. Compiler Answer Option : A 9. Which program is also called as loader? A. Interpreter B. Linker C. Javac D. Compiler Answer Option : B 10. A __________ is responsible for the task of collecting different modules of a skeletal source program. A. linker B. loader C. preprocessor D. processor Answer Option : C
11. Which code have extension "O" in unix system? A. Source code B. C language program C. Object code D. Binary code Answer Option : C 12. Machine language belong to __________ generation of computer language. A. First B. Third C. Fourth D. Fifth Answer Option : A 13. Which program is used to translates from low level language to higher one? A. Parse generator B. Decompiler C. Cross compiler D. Scanner Answer Option : B 14. __________ refer to program that translate machine code to corresponding assembly code. A. Parse generator B. Scanner C. Disassembler D. Cross compiler Answer Option : C 15. Which compiler is used to convert high level code into machine level code? A. General compiler B. Cross compiler C. Native code compiler D. JIT compiler Answer Option : A 16. Which compiler is used to test new hardware platform? A. Cross compiler B. Native code compiler C. Source to source compiler D. JIT compiler Answer Option : A 17. Which compiler comes with the virtual machine and it is optional? A. Cross compiler B. Multipass compiler C. One pass compiler D. JIT compiler Answer Option : D 18. Native code is also called __________. A. C-code B. O-code C. P-code D. Byte Code Answer Option : C 19. Which compiler is the compiler that passes through the source code of each compilation unit only once? A. One pass compiler B. Narrow compiler C. A and B is same D. Multipass compiler Answer Option : C 20. Which compiler is faster? A. Single pass B. Multipass C. Narrow D. None Answer Option : A ome
Subjects
Compiler Design 21. __________ accept the stream of character as input and produces stream of token as output. A. Parser B. Lexical analyzer C. Scanner D. B and C are same Answer Option : D 22. The sequences of character that give rise to token are called __________. A. Intermediate code B. Stream C. Lexemes D. Semantic Answer Option : C 23. The syntactical analyzer is also called __________. A. lexemes B. parser C. lexical analyzer D. scanner Answer Option : B 24. What is refer to checking context dependent datatype? A. Lexical analysis B. Parser C. Semantic analysis D. Syntactical analyzer Answer Option : C 25. What is responsible to produce faster and smaller object program by performing some improvements over intermediate code? A. Intermediate code generator B. Code generator C. Interpreter D. Code optimizer Answer Option : D 26. What is responsible for generation of final machine code tailored to target system? A. Interpreter B. Semantic analyzer C. Code generator D. Code optimizer Answer Option : C 27. Which programming language use compiler as well as interpreter to produce output? A. C language B. C++ C. Cobol D. Java Answer Option : D 28. Which data structure is used for book keeping? A. Lookup table B. Symbol table C. Inode table D. Tree Answer Option : B 29. Which tool is used to construct compiler? A. Compiler - Compiler B. Compiler - generator C. NELIAC D. A and B is same Answer Option : D 30. __________ is used to construct compiler. A. Context - free grammer B. Pragmas C. Significant comments D. Lexical analyzer Answer Option : A
31. In ADA programming language compiler directives are called __________. A. pregmas. B. preprocessor directives C. linker D. loader Answer 32. Bootstrapping technique is also called as __________. A. parser B. self-hosting C. NELIAC D. none of these Answer Option : B 33. The process of modifying an existing compiler to work on a new machine is often known as __________. A. bootstrap B. translation C. porting D. transformation Answer Option : C 34. Which program is used collect statistics on the behavior of an object program during execution? A. Profilers B. Debugger C. Loader D. Preprocessor Answer Option : A 35. The lexical analyzer produce tokens, which are stored in a buffer until they are consumed by the __________. A. linker B. loader C. parser D. preprocessor Answer Option : C 36. What is called lexical analysis? A. Parallel analysis B. Linear analysis C. Parser D. Token Answer Option : B 37. __________ expressions are widely used to specify lexical pattern. A. Regular B. Mathematical C. String D. Prefix Answer Option : A 38. Which operation is used for searching a lexical entry in the symbol table? A. Insert B. Lookup C. Select D. Scanner Answer Option : B 39. The additional information along with a token is called its __________. A. lexeme B. keyword C. attributes D. subset Answer Option : C 40. A lexical analyzer filter out __________ and __________. A. comment, keyword B. whitespace, comment C. character, number D. operator, operand Answer Option : B 41. Token refer to a set of __________. A. string B. keyword C. pattern D. lexeme Answer Option : A 42. Which kind of relationship exists between lexical analyzer and parser? A. Producer - Consumer B. Teacher - Student C. Has - a D. Association Answer Option : A 43. What is sequence of characters that gives rise to token? A. Keyword B. Word C. Pattern D. Lexem Answer Option : D 44. Lexer is implemented as a __________, which in turn is called by the parser. A. lexical analyzer B. function C. processor D. scanner Answer Option : B 45. A __________ is finite sequence of symbol. A. string B. word C. A and B are same D. language Answer Option : C 46. An alphabet is a __________ set of symbol. A. finite B. infinite C. large D. none Answer Option : A 47. How many type of formal language according to Noam Chomsky? A. Two B. Three C. Four D. Five Answer Option : C 48. The process of discovering a handle and reducing it to the appropriate left hand side is called __________. A. parse generator B. handle pruning C. bottom parsing D. handle Answer Option : B 49. Which is parse generator? A. Yacc B. Visual parse++ C. Grammatica D. All of the above Answer Option : D