Data Structures Typical Questions and Answers
The Free download links of Data Structures Typical Questions and Answers Papers enclosed below. Candidates who are going to start their preparation for the Data Structures Typical papers can use these links. Download the Data Structures Typical Papers PDF along with the Answers. Data Structures Typical Papers are updated here. A vast number of applicants are browsing on the Internet for the Data Structures Typical Question Papers & Syllabus. For those candidates, here we are providing the links for Data Structures Typical Papers. Improve your knowledge by referring the Data Structures Typical Question papers.
Typical Questions and Answers on Data Structures
1. In compilers, the syntax analysis is done by
(a) lexical analyzer
(b) parser
(c) scanner
(d) code generator
2. Which of the following parsing methods handle left-recursive grammars?
(a) Top-down parsing
(b) both top-down and bottom-up
(c) bottom-up parsing
(d) none of the above
3. Which of the following statements is incorrect?
(a) LR parsers can be constructed to recognize virtually all programming language constructs which context free grammar can be written.
(b) the LR parsing method is the most general non backtracking shift-reduce parsing method known.
(c) An LR parser can detect syntactic error as soon as it is possible to do so on a left-to-right scan of the input.
(d) the class of grammars that can be parsed using LR methods is a subset of the class of grammars that can be parsed with predictive parsers.
4. Which of the following tool is known as the Parser generator?
(a) Yaac
(b) Emacs
(c) Lex
(d) Tex
5. Which of the following statements is wrong?
(a) no left- recursive grammar can be LL (1)
(b) no LL (1) grammar can be ambiguous
(c) every LR (1) grammar is an LL (1) grammar
(d) every grammar can be converted into an equivalent operator grammar
6. Which of the following type expressions are equivalent?
I. e real -> e
II. f real -> (real f)
III. f real -> (real c)
(a) I and II
(b) I and III
(c) II and III
(d) I, II and III
7. Search tables used by compilers for efficient searching generally use
(a) linear lists of records
(b) binary search trees
(c) hash tables
(d) binary search tables
8. FORTRAN implementations do not permit recursion because
(a) they use static allocation for variables
(b) they use dynamic allocation for variables
(c) stacks are not available on all machines
(d) it is not possible to implement recursion on all machines
9. An unrestricted use of the “goto” statement is harmful because
(a) it makes it more difficult to verify programs
(b) it increases the running time of the programs
(c) it increases the memory required for the programs
(d) it results in compiler generating longer machine code
10. Which of the following features of Pascal cannot be captured by context-free grammars
(a) syntax of if- then-else statements
(b) syntax of recursive procedures
(c) whether variable has been declared before its use
(d) variable names of arbitrary length.
11. YACC generates parsers based on
(a) LALR (1) grammars
(b) operator-precedence grammars
(c) LL (1) grammars
(d) general context-free grammars
12. Which of the following conversions is not possible (algorithmically)?
(a) NFA to DFA
(b) NPDA to DPDA
(c) regular grammar to context-free grammar
(d) nondeterministic Turing machine (TM) to deterministic TM
13. Which of the following languages is not well suited for computation?
(a) Pascal
(b) C
(c) FORTRAN
(d) COBOL
14. Pascal is a
(a) natural language
(b) machine language
(c) assembly language
(d) high level language
15. A language developed to assist children in learning geometric shapes and computing aspect
(a) COBOL
(b) LOGO
(c) BASIC
(d) LISP
16. The preliminary evaluation of a top-down design before programs are written is referred to as a (an)
(a) informal design review
(b) formal design review.
(c) structured walk through.
(d) scheduled review
17. Which of the following is not an example of program documentation?
(a) source code
(b) object code
(c) specification
(d) identifier names
18. Which of the following is (are) among the legitimate purposes of software?
I. to assist in maintaining and modification
II. to describe the capabilities of the program
III. to provide the user with instructions
(a) II only
(b) III only
(c) II and III only
(d) I, II and III only
19. Which of the following is non-essential to stepwise refinement?
I. refining the subprograms
II. decomposing the problem into subproblems
III. declaring all variables
IV. stating the problem simply
V. inputting the data
(a) II
(b) IV and V
(c) III and IV
(d) V
20. A top-down approach to programming calls for
I. working from the general to the specific
II. postponing the minor decisions
III. a systematic approach
IV. immediate coding of the problem
(a) I
(b) I, II and III
(c) I and II
(d) I, II and IV
Practice Question | Objective Papers |
Quiz | Important Papers |
Mock Tests | Previous Papers |
Typical Question | Sample Question |
MCQs | Model Papers |
21. Top-down programming facilitates
I. implementing a complex problem in stages
II. readability
III. maintenance of the program
IV. testing of individual modules
(a) I and II
(b) II. III and IV
(c) I, II and III
(d) I, II, III and IV
22. Repeated execution of simple computation may cause compounding of
(a) round-off errors.
(b) run- time errors.
(c) syntax errors
(d) logic errors
23. Through testing of a program ensures that it performs as expected. A program should be tested
I. for each module in the program
II. with sample data
III. for every path through the program
(a) I and III
(b) II and III
(c) I and II
(d) I, II and III
24. Modular programming involves
I. proceeding from the particular to general
II. modules that solve individual tasks
III. problems decomposed into logical subproblems
(a) I and II
(b) II and III
(c) I and III
(d) I, II and III
25. In Pascal, which of the following evaluates to 1?
(a) 6-4 div 10
(b) 2-5 div 4
(c) 8-3 mod 2
(d) 1 + 5 mod 4
26. In Pascal, which of the following is equivalent to trunc (-2.6)
(a) trunc (-1.2)
(b) trunc (- 3.9)
(c) round (-1.5)
(d) round (-2.70)
27. Assuming that the alphabets are stored in ascending order with ‘A’ as the 65th character, what is the correct evaluation of the following Pascal expression? Pred (succ(pred(chr(ord (‘A’)+4))))
(a) ‘A’
(b) ‘E’
(c) ‘D’
(d) ‘B’
28. A Pascal procedure with the heading Procedure find (var x: integer; y: integer) can not be called by
(a) find (time, distance)
(b) find (time, 100)
(c) find (time + 5, distance + 10)
(d) find (time, distance + 25)
29. A Pascal procedure may be
I. assigned a value
II. used alone as a statement
III. referenced in an expression
(a) I
(b) III
(c) II
(d) I and II
30. Which of the following is true when a text file (in Pascal) is opened for reading?
I. eof is set to false
II. eoln is set to false
III. eof is undefined
(a) I
(b) III
(c) II
(d) I and II
31. Which of the following boolean expression is true ?
(a) 2* 2 + 3 = 10
(b) (5*6) or (3 div 3 = 1)
(c) (2*4) and not (4-3)
(d) -7*2+2*7 = 1
32. Which of the following expression (in Pascal) evaluates to zero?
(a) 4 mod 2-2
(b) 1-5 mod 3
(c) 5 mod 2-1
(d) 6 div 2-2
33. In Pascal, each of the elements in the array var A: array [-6..6] of boolean can have
(a) one value
(b) one of the two values
(c) 12 values
(d) 13 values
34. In C programming language, which of the following type of operators have the highest precedence
(a) relational operators
(b) logical operators
(c) equality operators
(d) arithmetic operators
35. In C programming language, which of the following operators has the highest precedence
(a) unary+
(b) ≥
(c) *
(d) = =
36. In C programming language, if the first and the second operands of operator + are of types int and float, respectively, the result will be of type
(a) int
(b) char
(c) float
(d) long int
37. What will be the value of x and y after execution of the following statement (C language)
n == 5; x=n++; y = -x;
(a) 5, 4
(b) 6, 6
(c) 6, 5
(d) 5, 5
38. In C language, the bitwise operators can be applied to which of the following operands
(a) char
(b) int
(c) short, long
(d) all of the above
39. In C, how many parameters can be passed to a function?
(a) One
(b) Two
(c) Zero
(d) as many parameters as are defined in the function definition
40. In C, what would be the effect of passing a parameter of type float to a function whose dummy parameter is declared to be of type int
(a) automatic conversion from float to int
(b) automatic conversion from float to long
(c) automatic conversion from int to float
(d) utter chaos
41. Which of the following statements provide a means of immediately terminating the execution of a loop?
(a) Else
(b) Return
(c) Break
(d) goto
42. What is the maximum number of dimensions an array in C may have?
(a) Two
(b) Eight
(c) Sixteen
(d) theoretically no limit. The only practical limits are memory size and compilers.
43. C programming language provides operations which deal directly with objects such as
(a) strings and sets
(b) lists and arrays
(c) characters, integers, and floating-point numbers
(d) all the above
44. C programming language by itself provides
(a) input facility
(b) both input and output facilities
(c) output facility.
(d) no input and output facilities
45. Which of the following are not provided in C?
(a) tests and loops
(b) grouping and subprograms
(c) synchronization, coroutines, and parallel operations
(d) all the above
46. Which of the following relational operators in C means” not equal to” ?
(a) = =
(b) ! =
(c) > =
(d) < =
47. What function enables a user to input information (in C) while the program is in execution
(a) printf
(b) scanf
(c) strcpy
(d) &&
48. In C language, if numeric or single character information is being entered by means of the scanf function, what symbols must precede the corresponding variable name?
(a) !
(b) &&
(c) &
(d) None of above
49. What is the minimum number of times the body of do… while loop is executed?
(a) Zero
(b) One
(c) Two
(d) three
50. In C, what is the effect of a negative number in a field width specijier?
(a) the values are displayed right justified
(b) the values are displayed centered
(c) the values are displayed left justified
(d) the values are displayed as, negative numbers