Which of the following derivations does a top-down parser use while parsing an input string ? The input is scanned from left to right. (A) Leftmost derivation (B) Leftmost derivation traced out in reverse (C) Rightmost derivation traced out in reverse (D) Rightmost derivation

1 Answer

Answer :

(A) Leftmost derivation

Related questions

Description : Which one from the following is false ? (A) LALR parser is Bottom - Up parser (B) A parsing algorithm which performs a left to right scanning and a right most deviation is RL (1). (C) LR parser is Bottom - Up parser. (D) In LL(1), the 1 indicates that there is a one - symbol look - ahead.

Last Answer : (B) A parsing algorithm which performs a left to right scanning and a right most deviation is RL (1).

Description : Given a grammar : S1→Sc, S→SA|A, A→aSb|ab, there is a rightmost derivation S1=>Sc =>SAC=>SaSbc. Thus, SaSbc is a right sentential form, and its handle is (A) SaS (B) be (C) Sbe (D) aSb 

Last Answer : (D) aSb

Description : Which of the following is FALSE ? (A) The grammar S ⟶ aSb|bSa|SS|∈, where S is the only non-terminal symbol and ∈ is the null string, is ambiguous. (B) SLR is powerful than LALR. (C) An LL(1) parser is a top-down parser. (D) YACC tool is an LALR(1) parser generator.

Last Answer : (B) SLR is powerful than LALR.

Description : Which is the correct statement(s) for Non Recursive predictive parser? S1: First(α) = {t | α => * t β for some string β } => *tβ S2: Follow(X) = { a | S => * αXa β for some strings ... and S2 is correct. (C) S1 is correct and S2 is incorrect. (D) Both statements S1 and S2 are correct. 

Last Answer : (D) Both statements S1 and S2 are correct.

Description : Given the following statements : S1 : SLR uses follow information to guide reductions. In case of LR and LALR parsers, the look-aheads are associated with the items and they make use of the left context available to ... (C) S1 is correct and S2 is not correct. (D) S1 is correct and S2 is correct.

Last Answer : (D) S1 is correct and S2 is correct.

Description : Which of the following is true ? (A) Canonical LR parser is LR (1) parser with single look ahead terminal (B) All LR(K) parsers with K > 1 can be transformed into LR(1) parsers. (C) Both (A) and (B) (D) None of the above

Last Answer : (C) Both (A) and (B)

Description : Which of the following is not an inherent application of stack? (A) Implementation of Stack (B) Evaluation of a postfix expression (C) Job Scheduling (D) Reverse a string

Last Answer : (C) Job Scheduling

Description : The full form of DDL is (A Dynamic Data Language (B) Detailed Data Language (C) Data Definition Language (D) Data Derivation Language

Last Answer : C) Data Definition Language

Description : 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 .................. (A) Symbol resolution (B) Parsing (C) Assembly (D) Relocation

Last Answer : (D) Relocation

Description : Pick out the correct option about the types of parsing. a) Top-down and bottom-up parsing b) Interpretation and communication c) Roll-up and roll-down d) None of the mentioned

Last Answer : a) Top-down and bottom-up parsing

Description : What is a top-down parser? a) Begins by hypothesizing a sentence (the symbol S) and successively predicting lower level constituents until individual pre-terminal symbols are written b) ... d) Begins by hypothesizing upper level constituents and successively predicting a sentence (the symbol S)

Last Answer : a) Begins by hypothesizing a sentence (the symbol S) and successively predicting lower level constituents until individual pre-terminal symbols are written

Description : What is a top-down parser? a) Begins by hypothesizing a sentence (the symbol S) and successively predicting lower level constituents until individual preterminal symbols are written b) Begins ... ) Begins by hypothesizing upper level constituents and successively predicting a sentence (the symbol S)

Last Answer : a) Begins by hypothesizing a sentence (the symbol S) and successively predicting lower level constituents until individual preterminal symbols are written

Description : Define Top down parsing. 

Last Answer :  It starts with root node S and search for a tree that has the words as it leaves. 

Description : Soils in the Mahanadi delta are less fertile than those in the Godavari delta because of: (A) erosion of top soils by annual floods (B) inundation of land by sea water (C) traditional agriculture practices (D) the derivation of alluvial soil from red-soil hinterland

Last Answer : Answer: A  The Mahanadi was notorious for its devastating floods for much of recorded history. Thus it was called 'the sorrow of Orissa'. However the construction of the Hirakud Dam has greatly ... matter of great concern. Indiscriminate damming along the river has been cited as an obvious reason.

Description : Where did the term "batshit crazy" and its' various derivations come from?

Last Answer : Think it came from “bats in the belfry”.

Description : Which one of the following statements best defines the purpose of a Product Breakdown Structure (PBS)? a. To define the hierarchy of deliverables that are required to be produced on the project. ... . d. To identify the health and safety strategies and procedures to be used on the project

Last Answer : a. To define the hierarchy of deliverables that are required to be produced on the project.

Description : Which one of the following statements best defines the purpose of a Product Breakdown  Structure(PBS)?  a. To define the hierarchy of deliverables that are required to be produced on the project.  b. ... .  d. To identify the health and safety strategies and procedures to be used on the project.

Last Answer : a. To define the hierarchy of deliverables that are required to be produced on the project.

Description : The ..................... is essentially used to search for patterns in target string. A) Like Predicate B) Null Predicate C) In Predicate D) Out Predicate

Last Answer : A) Like Predicate

Description : Consider the following JAVA program: public class First { public static int CBSE (int x) { if (x < 100) x = CBSE (x +10); return (x - 1); } public static void main (String[] args){ System.out.print(First.CBSE(60)); } } What does this program print? (1) 59 (2) 95 (3) 69 (4) 99

Last Answer : (2) 95 

Description : To remove string “hello” from list1, we use which command ? a) list1.remove(“hello”) b) list1.remove(hello) c) list1.removeAll(“hello”) d) list1.removeOne(“hello”)

Last Answer : d) list1.removeOne(“hello”)

Description : In what way is a file more flexible than a String?

Last Answer : Ans: A file is stored permanently in a storage device.It is easy to access a file whenever required. On the other hand, a string is stored temporarily in RAM, and the contents of a string will be erased automatically when the power is switched off or when the program execution is terminated.

Description : Why is the ‘S’ of String capital?

Last Answer : A: Since String is a class.

Description : Is it compulsory to write String args[] when running a program in BlueJ?

Last Answer : A: No it is not compulsory when we are running it in BlueJ. But normally (in all other cases) it is always better to have it, as the JVM looks for the main method with a String array as a parameter.

Description : Which command is used to concatenate all files beginning with the string 'emp' and followed by a non-numeric characters? A. cat emp[!0-9] B. more [emp][!0-9] C. cat emp[x-z]

Last Answer : A. cat emp[!0-9]

Description : Which command is used to change protection mode of files starting with the string emp and ending with 1,2, or 3? A. chmod u+x emp[l-3] B. chmod 777 emp* C. chmod u+r ??? emp D. chmod 222 emp? E. None of the above

Last Answer : A. chmod u+x emp[l-3]

Description : Which command is used to copy all files having the string chap and any two characters after that to the progs directory? A. cp chap?? progs B. cp chap* progs C. cp chap[12] /progs/*.*

Last Answer : A. cp chap?? progs

Description : In java, string is a ............. A) primitive data type B) abstract data type C) combination of boolean D) None of the above

Last Answer : B) abstract data type

Description : Which of the following methods belong to the string class? A) length( ) B) compare To ( ) C) equals ( ) D) All of them

Last Answer : D) All of them

Description : Which of the following methods belong to the string class? A) length( ) B) compare To ( ) C) equals ( ) D) All of them

Last Answer : D) All of them

Description : The class string belongs to ................... package. A) java.awt B) java.lang C) java.applet D) java.string

Last Answer : B) java.lang

Description : What would happen if "String[]args" is not included as argument in the main method. A) No error B) Compilation error C) Program won't run D) Program exit

Last Answer : C) Program won't run

Description : ………… function writes a string of text to a window. A) cputs () B) put () C) gets () D) tputs ()

Last Answer : A) cputs ()

Description : Data items grouped together for storage purposes are called a A) record B) title C) list D) string

Last Answer : A) record

Description : The output of executing string.ascii_letters can also be achieved by: a) string.ascii_lowercase_string.digits b) string.ascii_lowercase+string.ascii_upercase c) string.letters d) string.lowercase_string.upercase

Last Answer : d) string.lowercase_string.upercase

Description : Consider a program that consists of 8 pages (from 0 to 7) and we have 4 page frames in the physical memory for the pages. The page reference string is :  1 2 3 2 5 6 3 4 6 3 7 3 1 5 3 6 3 4 2 4 3 4 5 ... to fill available page frames with pages): (A) 9 and 6 (B) 10 and 7 (C) 9 and 7 (D) 10 and 6

Last Answer : (B) 10 and 7

Description : The control string in C++ consists of three important classifications of characters (A) Escape sequence characters, Format specifiers and Whitespace characters (B) Special characters, White-space ... and Non-white space characters (D) Special characters, White-space characters and Format specifiers

Last Answer : (C) Format specifiers, White-space characters and Non-white space characters

Description : The Servlet Response interface enables a servlet to formulate a response for a client using the method ............... (A) void log(Exception e, String s) (B) void destroy() (C) int getServerPort() (D) void setContextType(String Type)

Last Answer : (D) void setContextType(String Type)

Description : The process of dividing an analog signal into a string of discrete outputs, each of constant amplitude, is called: (A) Strobing (B) Amplification (C) Conditioning (D) Quantization

Last Answer : (D) Quantization

Description : What does the following command do? grep −vn abc x (A) It will print all of the lines in the file x that match the search string abc (B) It will print all of the lines in file x that do not ... (D) It will print the specific line numbers of the file x in which there is a match for string abc

Last Answer : (A) It will print all of the lines in the file x that match the search string “abc”

Description : A LRU page replacement is used with four page frames and eight pages. How many page faults will occur with the reference string 0172327103 if the four frames are initially empty? (A) 6 (B) 7 (C) 5 (D) 8

Last Answer : (B) 7

Description : Consider the reference string 0 1 2 3 0 1 4 0 1 2 3 4 If FIFO page replacement algorithm is used, then the number of page faults with three page frames and four page frames are .......... and ........... respectively. (A) 10, 9 (B) 9, 9 (C) 10, 10 (D) 9, 10

Last Answer : (D) 9, 10

Description : The number of strings of length 4 that are generated by the regular expression (0|∈) 1+2* (3|∈), where | is an alternation character, {+, *} are quantification characters, and ∈ is the null string, is: (A) 08 (B) 10 (C) 11 (D) 12

Last Answer : (D) 12

Description : In how many ways can the string A ∩ B - A ∩ B - A be fully parenthesized to yield an infix expression? (A) 15 (B) 14 (C) 13 (D) 12

Last Answer : (B) 14

Description : In a relational database model, NULL values can be used for all but which one of the following? (A) To allow duplicate tuples in the table by filling the primary key column(s) with NULL. (B) To ... D) To fill a column in a tuple when that column does not really exist for that particular tuple.

Last Answer : (A) To allow duplicate tuples in the table by filling the primary key column(s) with NULL.

Description : In Data mining, .............. is a method of incremental conceptual clustering. (A) STRING (B) COBWEB (C) CORBA (D) OLAD

Last Answer : (B) COBWEB

Description : Suppose that the virtual Address space has eight pages and physical memory with four page frames. If LRU page replacement algorithm is used, .............. number of page faults occur with the reference string. 0 2 1 3 5 4 6 3 7 4 7 3 3 5 5 3 1 1 1 7 2 3 4 1 (A) 11 (B) 12 (C) 10 (D) 9

Last Answer : (A) 11

Description : What is the probability that a randomly selected bit string of length 10 is a palindrome? (A) 1/64 (B) 1/32 (C) 1/8 (D) ¼

Last Answer : (B) 1/32

Description : If the electricity represented by the wave form in 'B' were applied to the left side of the illustrated circuit, the output on the right side would be ____________. EL-0064 A. direct current with the ... lower lead D. clipped to a value equal to the square root of 3 times the input voltage value

Last Answer : Answer: C

Description : They were traditionally made from bone, quill, ivory or gold and silver, if you could afford such ostentation. Mass production is traced to the American entrepreneur Charles Forster who noticed young ... white birch as raw material because it was tasteless. What business did Forster thus begin?

Last Answer : Toothpicks.