Published by Roma Rahul Gupta for Jobs_For_Everyone
Notes Bel Sample Paper|preparation material for computer Science students-Part 1
Let's Start prepartion for BEL_Exam26 june 2011_CS
Let's Start prepartion for BEL_Exam26 june 2011_CS
Guys, As we all know that BEL is going to take test on 26 june 2011.
There are 150 questions...120 for technical and 30 for Aptitude.
Time duration is 2:30.Negative marking is also there.
Questions with solutions on the following subjects:-
1.Operating System
2.Computer Network
3.Compiler Design
4.Theory of computation & Automata
5.Database management system
6.Programming skills
7.Data structure
8.Computer Architecture and Organisation(CAO)
9.Digital Electronics.
Bel Sample Paper|Compiler Design
i)Which Compiler is used for transporting a compiler of a language to a new machine?
a)Compiler-compiler b)Incremental Compiler
c)Cross Compiler d)Booting Compiler
Answer: Cross Compiler
Explanation:
Compilers are of two kinds: native and cross .
Native compilers are written in the same language as the target language. For example, SMM is a compiler for the language S that is in a language that runs on machine M and generates output code that runs on machine M.
Cross compilers are written in different language as the target language. For example, SNM is a compiler for the language S that is in a language that runs on machine N and generates output code that runs on machine M.
ii) The number of tokens in the Fortran statement DO 10 to I=1.25 is
a)3 b)4 c)5 d)None of these
Answer: c)5
Explanation:There are 5 tokens
"DO", "10" , "I", "=", "1.25"
iii)Which one of the following is a top-down parser?
a)Recursive descent parser b)Operator precedence parser
c)LR(k) parser d)LALR(k) parser
Answer: a)Recursive Descent parser
Explanation:
Top-down parser:
# Recursive descent parser
# LL parser (Left-to-right, Leftmost derivation)
# Earley parser
Bottom-Up parser:
* Precedence parser
a) Operator-precedence parser
b)Simple precedence parser
* BC (bounded context) parsing
* LR parser (Left-to-right, Rightmost derivation)
a) Simple LR (SLR) parser
b)LALR parser
c)Canonical LR (LR(1)) parser
d)GLR parser
* CYK parser
iv)Incremental Compiler
a)is written in same language as source language
b)is written in different language as source language
c)generate object code on its host machine
d)that allows modified portion of program to recompile.
Answer:d)that allows modified portion of program to recompile.
Explanation:The Incremental compiler operates on an incremental basis, line-by-line, so if only one line is changed in an edit session, then only that line need be recompiled so that no other code is affected.
v)Which of the following is most general phase structured grammar?
(A) Context – Sensitive B) Regular
(C) Context – Free (D) None of the above
Ans: (A)Context – Sensitive
Vi)Recognition of basic syntactic constructs through reductions, this task is performed
by
A)Lexical Analysis B)Semantic Analysis C)Syntax Analysis D)Structure Analysis
Answer:C)Syntax Analysis
Explanation:
Lexical analysis is the process of identifying the words from an input string of characters, which may be handled more easily by a parser. These words must be separated by some predefined delimiter or there may be some rules imposed by the language for breaking the sentence into tokens or words which are then passed on to the next phase of syntax analysis.
Semantic analysis is the process of examining the statements and to make sure that they make sense. During the semantic analysis, the types, values, and other required information about statements are recorded, checked, and transformed appropriately to make sure the program makes sense. Ideally there should be no ambiguity in the grammar of the language. Each sentence should have just one meaning.
Syntax analysis (also called as parsing) is a process of imposing a hierarchical (tree like) structure on the token stream. It is basically like generating sentences for the language using language specific grammatical rules as we have in our natural language
Vii)A grammar for a programming language is a formal description of
A) Syntax (B) Semantics
(C) Structure (D) Code
Answer:C)Structure
Viii)Which of the following are language processors?
(A) Assembler (B) Compiler
(C) Interpreter (D) All of the above
Answer: (D)All of the above
Ix)Relocation bits used by relocating loader are specified by
(A) Relocating loader itself (B) Assembler or Translator
(C) Macro processor (D) Both (A) and (B)
Answer: (B)
x)An assembler is
(A) programming language dependent.
(B) syntax dependant.
(C) machine dependant.
(D) data dependant.
Answer: (C)
KEEP READING !!!!
MORE QUESTIONS FROM DIFFERENT SUBJECTS WILL POST IN ANOTHER POST.
If you like my work please don't forget to give comments.
Questions with solutions on the following subjects:-
1.Operating System
2.Computer Network
3.Compiler Design
4.Theory of computation & Automata
5.Database management system
6.Programming skills
7.Data structure
8.Computer Architecture and Organisation(CAO)
9.Digital Electronics.
Bel Sample Paper|Compiler Design
i)Which Compiler is used for transporting a compiler of a language to a new machine?
a)Compiler-compiler b)Incremental Compiler
c)Cross Compiler d)Booting Compiler
Answer: Cross Compiler
Explanation:
Compilers are of two kinds: native and cross .
Native compilers are written in the same language as the target language. For example, SMM is a compiler for the language S that is in a language that runs on machine M and generates output code that runs on machine M.
Cross compilers are written in different language as the target language. For example, SNM is a compiler for the language S that is in a language that runs on machine N and generates output code that runs on machine M.
ii) The number of tokens in the Fortran statement DO 10 to I=1.25 is
a)3 b)4 c)5 d)None of these
Answer: c)5
Explanation:There are 5 tokens
"DO", "10" , "I", "=", "1.25"
iii)Which one of the following is a top-down parser?
a)Recursive descent parser b)Operator precedence parser
c)LR(k) parser d)LALR(k) parser
Answer: a)Recursive Descent parser
Explanation:
Top-down parser:
# Recursive descent parser
# LL parser (Left-to-right, Leftmost derivation)
# Earley parser
Bottom-Up parser:
* Precedence parser
a) Operator-precedence parser
b)Simple precedence parser
* BC (bounded context) parsing
* LR parser (Left-to-right, Rightmost derivation)
a) Simple LR (SLR) parser
b)LALR parser
c)Canonical LR (LR(1)) parser
d)GLR parser
* CYK parser
iv)Incremental Compiler
a)is written in same language as source language
b)is written in different language as source language
c)generate object code on its host machine
d)that allows modified portion of program to recompile.
Answer:d)that allows modified portion of program to recompile.
Explanation:The Incremental compiler operates on an incremental basis, line-by-line, so if only one line is changed in an edit session, then only that line need be recompiled so that no other code is affected.
v)Which of the following is most general phase structured grammar?
(A) Context – Sensitive B) Regular
(C) Context – Free (D) None of the above
Ans: (A)Context – Sensitive
Vi)Recognition of basic syntactic constructs through reductions, this task is performed
by
A)Lexical Analysis B)Semantic Analysis C)Syntax Analysis D)Structure Analysis
Answer:C)Syntax Analysis
Explanation:
Lexical analysis is the process of identifying the words from an input string of characters, which may be handled more easily by a parser. These words must be separated by some predefined delimiter or there may be some rules imposed by the language for breaking the sentence into tokens or words which are then passed on to the next phase of syntax analysis.
Semantic analysis is the process of examining the statements and to make sure that they make sense. During the semantic analysis, the types, values, and other required information about statements are recorded, checked, and transformed appropriately to make sure the program makes sense. Ideally there should be no ambiguity in the grammar of the language. Each sentence should have just one meaning.
Syntax analysis (also called as parsing) is a process of imposing a hierarchical (tree like) structure on the token stream. It is basically like generating sentences for the language using language specific grammatical rules as we have in our natural language
Vii)A grammar for a programming language is a formal description of
A) Syntax (B) Semantics
(C) Structure (D) Code
Answer:C)Structure
Viii)Which of the following are language processors?
(A) Assembler (B) Compiler
(C) Interpreter (D) All of the above
Answer: (D)All of the above
Ix)Relocation bits used by relocating loader are specified by
(A) Relocating loader itself (B) Assembler or Translator
(C) Macro processor (D) Both (A) and (B)
Answer: (B)
x)An assembler is
(A) programming language dependent.
(B) syntax dependant.
(C) machine dependant.
(D) data dependant.
Answer: (C)
KEEP READING !!!!
MORE QUESTIONS FROM DIFFERENT SUBJECTS WILL POST IN ANOTHER POST.
If you like my work please don't forget to give comments.
nice post..please post some of full paper of bel so that i got full idea and solve some of paper before exam. thanks
ReplyDeletegood job ,which books are you referring ?
ReplyDelete@Abhishek:First of All Thanks a lot for visiting my blog and for giving suggestion.
ReplyDeleteKeep visiting for updates.
@Cyrus:Thanks a lot for visiting my blog and commenting.Keep visiting for updates.
I am referring Gate Material for CSE.