LanguageMCQ
LanguageMCQ
a) Machine
b) C
c) BASIC
d) High level
Answer: a
Explanation: The language made up of binary coded instructions built into the
hardware of a particular computer and used directly by the computer is machine
language.
What is a compiler?
a) system program that converts instructions to machine language
b) system program that converts machine language to high-level language
c) system program that writes instructions to perform
d) None of the mentioned
Answer: a
Explanation: A compiler is a system program that converts instructions in form of
code to machine understandable language.
Answer: d
Explanation: The phases of a compiler are:
1. Lexical analysis
2. Syntax analysis
3. Semantic analysis
4. Intermediate code generator
5. Code optimizer
6. Code generator
Answer: d
Explanation: Both the analysis and synthesis components of a compiler use the
symbol table.
i) To keep all of the names of all entities in one place in a systematic format.
ii) To determine whether or not a variable has been declared.
iii) Type checking is implemented by ensuring that assignments and expressions in
source code are semantically accurate.
iv) To figure out what a name’s scope is (scope resolution).
Answer: a
Explanation: Logic flaws can never be checked by a compiler.
Answer: d
Explanation: This is a logical error that can’t be detected by any compiler or
interpreter.
Answer: d
Explanation: A loader that combines the functionality of a relocation loader with the
ability to combine a number of independently compiled program segments.
Answer: a
Explanation: A compiler is a software (or combination of programs) that converts
source code written in one programming language (the source language) into code
written in another programming language (the target language) (the target language,
often having a binary form known as object code).
Answer: c
Explanation: Only syntactical errors can be detected by the compiler.
Which of the following can detect an error if a programmer by mistake
writes multiplication instead of division?
a) Interpreter
b) Compiler or interpreter test
c) Compiler
d) None of the mentioned
Answer: d
Explanation: No Logical errors can’t be detected.
Answer: b
Explanation: The statement is false. Binary as the word suggests contains only 2
digits : 0 and 1.
0 denotes false and 1 denotes a truth value.
Answer: b
Explanation: PC stands for program counter (It contains the address of the next
instruction to be executed).
A document that specifies how many times and with what data the program
must be run in order to thoroughly test it.
a) addressing plan
b) test plan
c) validation plan
d) verification plan
Answer: b
Explanation: Test plan is the A document that specifies how many times and with
what data the program must be run in order to thoroughly test it. It comes under
testing.
Answer: b
Explanation: Syntax determines the grammatical rules in a code. Semantics give
meaning to the instructions.
Answer: b
Explanation: Assembler does this job. A language that uses mnemonic codes for the
representation of machine-language instructions is called assembly language.
Answer: a
Explanation: Microprocessor handles all these activities. Each family of processors
has its own set of instructions for handling various operations like getting input from
keyboard, displaying information on a screen and performing various other jobs.
Answer: a
Explanation: The statement is true.
Advantages of using assembly language are:
• It requires less memory and execution time.
• It allows hardware-specific complex jobs in an easier way.
• It is suitable for time-critical jobs.
Answer: b
Explanation: There are two kinds of memory addresses:
• An absolute address – a direct reference of specific location.
• The segment address (or offset) – starting address of a memory segment with the
offset value.
Answer: b
Explanation: Tasm is the borland turbo assembler. Nasm is used with linux
generally. Gas is the GNU assembler.
Answer: a
Explanation: The executable instructions or simple instructions tell the processor
what to do. Each instruction consists of an operation code (opcode). Each executable
instruction generates one machine language instruction.
Answer: c
Explanation: The stack segment contains data values passed to functions and
procedures within the program. The code segment defines an area in memory that
stores the instruction codes.
Answer: d
Explanation: The processor has some internal memory storage locations, known as
registers. The registers stores data elements for processing without having to access
memory.
Answer: a
Explanation: Assembly language deals with hexadecimal values only. Each decimal
value is automatically converted to its 16-bit binary equivalent and stored as a
hexadecimal number.
Answer: a
Explanation: Prolog stands for Programming in Logic. The options mentioned are the
four categories of programming. Prolog is a type of logic programming.
Answer: b
Explanation: The statement is false. Java is a type of object oriented programming
language. It involves solving real-life problems as well.
Answer: b
Explanation: Interpreter is a program that can execute high-level language
programs “directly,” without first being translated into machine language.
Executables might be called ________
a) native code
b) executable code
c) complex code
d) machine code
Answer: a
Explanation: The executables are sometimes called native code. HLL are translated
to Machine language called the native code.
Answer: a
Explanation: The Source program is compiled to an intermediate form called byte
code. For each supported platform, write a “virtual machine” emulator that reads byte
code and emulates its execution.
Answer: a
Explanation: Source program is compiled to an intermediate form – byte code. Byte
code is the assembly language for an imaginary architecture.
Answer: a
Explanation: JIT stands for Just in time. JVMs actually compile each bytecode
instruction to native code the first time it is used.
JVM stands for?
a) Java virtual machine
b) Java visual machine
c) JRE virtual machine
d) JRE visual machine
Answer: a
Explanation: JVM stands for Java Virtual Machine. Other related terms are JRE which
is java runtime environment and JDK which is java development kit.
Answer: d
Explanation: C# is supported by MS. Net platform. JAVA was originally designed for
web purposes.
Answer: a
Explanation: HLL isn’t in machine language. It is converted to machine language for
further processing.
a. Low-level Language
b. High-Level Language
c. Decimal-Format
d. Middle-Level Language
a. Interpreter
b. Linker
c. Assembler
d. Compiler
Answer: d. Compiler
Does the compiler program translate the whole source code in one step?
a. No
c. Don't Know
d. Yes
Answer: d. Yes
Explanation: The compiler is that program which translates the whole high-level
code into the machine code at once.
a. Program file
b. Object file
c. Data File
d. Task File
Explanation: The object file contains the object code, which is an output of an
assembler.
a. Parser
b. Code optimizer
c. Code generator
d. Scanner
Answer: d. Scanner
a. three types
b. four types
c. two types
d. five types
Explanation: In the compiler design, the parser is mainly categorized into top-down
parsing and bottom-up parsing.
In which parsing, the parser constructs the parse tree from the start symbol
and transforms it into the input symbol.
a. Bottom-up parsing
b. Top-down parsing
d. Both a and b
Explanation: Top-down parsing is a technique which constructs the parse tree from
the start symbol and transforms it to the input symbol. This type of parsing is also
referred to as predictive or recursive parsing.
c. Right-most derivation
d. Left-most derivation
c. Right-most derivation
d. Left-most derivation
a. Operator Precedence
b. SLR
c. Canonical LR
d. LALR
Answer: c. Canonical LR
Explanation: Canonical LR (CLR) is the most powerful parser than LALR and SLR.
a. string character
b. a syntax tree
c. a set of RE
d. a set of tokens
a. Lexical Grammar
b. Context-free Grammar
c. Syntactic Grammar
d. Regular Grammar
Which grammar gives multiple parse trees for the same string?
a. Unambiguous
b. Regular
c. Ambiguous
Answer: c. Ambiguous
a. removing comments
b. removing whitespace
Explanation: Lexical analyzer is used in the compiler for removing the Whitespace
and comments. It is also used in breaking the syntaxes into the set of tokens.
Which is considered as the sequence of characters in a token?
a. Mexeme
b. Lexeme
c. Texeme
d. Pattern
Answer: b. Lexeme
a. Code optimization
b. Code generation
c. Parser
d. Lexical Analysis
Answer: c. Parser
Explanation: The concept of grammar is much used in the parser phase of the
compiler.
The parser phase is next to the lexical analysis phase in the compiler. Parser
generated the parse tree using the predefined grammar. The parser has two different
techniques for creating a different parse tree.
Which phase of the compiler checks the grammar of the programming?
a. Code Optimization
b. Semantic Analysis
c. Code Generation
d. Syntax Analysis
Explanation: Syntax Analysis is the 2nd phase of the compiler, which checks the
given input string is the correct syntax of the programming language.
a. Yacc
b. Lex
c. Symbol Table
d. Type Checking
a. Syntax Analysis
b. Lexical Analysis
c. Semantic Analysis
d. Code generation
Explanation: The first part of the compiler (lexical analysis) is also known as a
scanner. It scans the characters from the source program and implements them to
produce tokens.
Which phase of the compiler is also known as Parser?
a. Code Optimization
b. Semantic Analysis
c. Syntax Analysis
d. Lexical Analysis
Explanation: The phase of the compiler next to the lexical analysis phase is also
known as Parser.
Syntax analysis or parser accepts the tokens produced by the lexical analysis and
gives the parse tree in the output.
a. An LALR parser
b. A LR parser
Explanation: Keywords are firstly recognized during the lexical analysis of the
program in the compiler.
a. sub-terminals
b. half-terminals
c. non-terminals
d. terminals
Answer: d. terminals.
Explanation: All the leaf nodes in the parse tree indicate the terminals. And all the
interior nodes indicate non-terminals.
a. Control graph
b. DAG
c. Flow graph
d. Hamilton graph
Explanation: A flow graph is a graph of the compiler which describes the basic
blocks and how the program control is passed between the blocks.
Explanation: After semantic analysis, the intermediate code increases the chances
of reusing the machine-independent code optimizer in other compilers.
a. two types
b. three types
c. four types
d. five types
Which compiler runs on one machine and generates code for multiple
machines?
a. Multipass compiler
b. Cross compiler
c. Optimizing compiler
d. Onepass compiler
Explanation: Cross compiler is a compiler which runs on one machine and generates
code for more than one machine.
Which of the following is not a characteristic of the compiler?
c. The execution takes place after the removal of all syntax errors
d. Firstly scans the entire program and then transforms it into machine-
understandable code
Explanation: The compiler does not take more time to execute. So, more execution
time is not a characteristic of the compiler.
a. End symbol
b. Start symbol
c. Non-terminal symbol
d. Terminal symbol
Answer: a. End symbol
a. Turing language
b. Context-sensitive language
c. Context-free language
d. Regular language
Explanation: None
a. Records
b. Program
c. Symbol Table
d. Table
Explanation: A symbol table is simply a table which is created and maintained by the
compiler and used in various phases of the compiler.
Answer: b
Explanation: The errors that occur in an application need to be located and
corrected so that the application runs correctly that is without any error. Such a
process of locating and correcting errors is known as debugging.
Answer: a
Explanation: Errors are called bugs in a program. Program bugs typically are caused
by two types of errors that is syntax errors or logical errors.
Answer: b
Explanation: The term syntax refers to the set of rules you must follow when using a
programming language. A syntax error occurs when you break one of the language’s
rules. Most syntax errors are a result of typing errors that occur when entering the
instructions, such as typing Me.cle() instead of Me.close(). The code editor detects
most of the syntax errors as you enter the instructions.
Answer: a
Explanation: Logical errors are much more difficult to find because they are not
detected by the code editor. A logical error can occur for a variety of reasons such as
forgetting to enter an instruction or entering the instruction in wrong order. Some
logical errors occur as a result of calculation statements that are correct syntactically
but incorrect mathematically.
Answer: c
Explanation: Assembling the documentation refers to putting the documentation and
the print out of the application’s interface and code in a safe place, so you can refer to
them, if you need to change the application in future. Your planning tools include the
TOE chart, a sketch of the interface, and either the flowcharts or the pseudocode.
Answer: c
Explanation: A function is a predefined procedure that performs a specific task and
returns the value for after completing the task. If a function does not return anything
its return type is void. A function can return an integer, a character a string etc.
What is testing process’ first goal?
a) Bug prevention
b) Testing
c) Execution
d) Analyses
Answer: a
Explanation: Its better to prevent a bug rather than putting time in its testing and
removal.
Answer: c
Explanation: A software bug is an error, flaw, failure, or fault in a computer program
or system that causes it to produce an incorrect or unexpected result.
Answer: d
Explanation: It increases the scope for code inspection.
Answer: c
Explanation: Equivalence partitioning is a software testing technique that divides the
input data of a software unit into partitions of equivalent data from which test cases
can be derived.
Answer: a
Explanation: Remaining options are a part of development process.
A. Testing Phase
B. Requirement Phase
C. Deployment phase
D. Testing closure
Answer: (d) Testing Closure
Explanation: SDLC defines various phases of software development and the order of
execution of phases. Software development life cycle is a process that creates a
structure for the development of software.
A. Structural testing
Explanation: Structural testing is also known as a White box or Clear box, or Glass
box testing. In structural testing, we can understand what is happening inside the
application or the software.
B. White-box testing
Explanation: Boundary value analysis is one of the widely used case design
techniques for black-box testing. It is used to test boundary values because the input
values near the boundary have higher chances of error. Boundary values are those
that contain the upper and lower limit of a variable.
B. Test level
C. SDLC Model
D. Test type
A. Integration testing
B. Unit testing
C. System testing
Explanation: Integration, Unit and System testing are various testing levels where
the Unit testing is used to test each unit or an individual component of the software
application.
The integration testing is used only after the functional testing is completed on
each module of the application. And system testing is end-to-end testing, where the
testing environment is similar to the production environment.
Which of the following is not a part of STLC (Software Testing Life Cycle)?
A. Testing Planning
B. Requirement Gathering
C. Test Design
D. Testing closure
Explanation: The software testing procedure is also known as Software Testing Life
Cycle (STLC), which contains various phases of the testing process. And all activities
are done to improve the quality of the software product.
White box testing techniques are?
A. User's end
B. Developer's end
A. Product is old
A. Function testing
B. System testing
C. Statement testing
D. Database testing
A. White-box testing
B. Grey box testing
C. Black Box testing
D. Combination of all
Explanation: Usability testing is used to checks the defect in the end-user interaction
of software or the product. It makes sure that the developed software is easy while
using the system without facing any problem and makes end-user life easier.
b. Developer's end
c. User's end
Explanation: When there is no specific method for identifying the error, we go for the
Error guessing technique. It is totally based on the experience of the test analyst,
where the tester uses the experience to guess the problematic areas of the software.
A. Structural testing
B. Behavioral testing
Explanation: White box testing is known as glass box testing, structural testing,
clear box testing, open box testing and transparent box testing.
Explanation: The Test levels can always be restructured or combined based on n the
nature of a project or system planning.
A. Regression Testing
B. Adhoc Testing
C. Unit Testing
Explanation: The Black box testing is testing where we examine the software's
functionality without looking into its internal structure or coding. And the boundary
value analysis is used to test boundary values as the input values near the boundary
have higher chances of error. And it is one of the widely used case design techniques
for black-box testing.
A. Beta testing
B. White-box testing
D. Alpha testing
Explanation: The user acceptance testing is done once the application is bug-free
because no customer accepts the application blindly before using it. Hence, they
perform one round of testing for their satisfaction. And Beta testing is one essential
part of Acceptance Testing, which is performed before releasing the software.
-------- testing is used to check the code?
Explanation: The white box testing is testing where the developer will test every line
of the program's code. To perform the white box testing, his/her aware of
programming skills to design test cases.
Explanation: Once the application's functionality is stable, the risk is resolved, when
the time is less, we test the necessary features, and when the essential feature itself
is not working correctly, we can stop the testing.
---------- are those software mistakes that occurred during the coding phase?
a. Defects
b. Failures
c. Errors
d. Bugs
a. Inspections
c. Error guessing
d. Walkthrough
a. White-box testing
d. Both a & c