Explore topic-wise MCQs in General Awareness.

This section includes 1698 Mcqs, each offering curated multiple-choice questions to sharpen your General Awareness knowledge and support exam preparation. Choose a topic below to get started.

1.

What is the output of this program?
 import java.io.*; public class filesinputoutput { public static void main(String[] args) { String obj = "abc"; byte b[] = obj.getBytes(); ByteArrayInputStream obj1 = new ByteArrayInputStream(b); for (int i = 0; i < 2; ++ i) { int c; while ((c = obj1.read()) != -1) { if(i == 0) { System.out.print((char)c); } } } } } 

A. Abc
B. ABC
C. Ab
D. AB
Answer» B. ABC
2.

In which addressing mode the operand is given explicitly in the instruction ?

A. Absolute mode
B. Immediate mode
C. Indirect mode
D. Index mode
Answer» C. Indirect mode
3.

Which of the following are language processors

A. Assembler
B. Compilers
C. Interpreter
D. All of these
Answer» B. Compilers
4.

An assembly program contains

A. Imperative statements and assembler directives
B. Imperative and declarative statement
C. Imperative and declarative statement as well as assembler directive
D. Declarative statements and assembler directive
Answer» D. Declarative statements and assembler directive
5.

Assembly language uses

A. Hex code
B. Binary code
C. Mnemonics
D. ASCII code
Answer» C. Mnemonics
6.

The length of the one-byte machine language instruction is

A. 2 bytes
B. 1 byte
C. 3 bytes
D. 4 bytes
Answer» C. 3 bytes
7.

A system program that combines the separately compiled modules of a program into a form suitable for execution ?

A. Assembler
B. Linking loader
C. Cross compiler
D. Load and Go
Answer» C. Cross compiler
8.

Which of the following is not a feature of compiler ?

A. Scans the entire program first and then translate it into machine code
B. When all the syntax errors are removed execution takes place
C. Slow for debugging
D. Execution time is more
Answer» E.
9.

Input of Lex is ?

A. Set to regular expression
B. Statement
C. Numeric data
D. ASCII data
Answer» B. Statement
10.

Yacc semantic action is a sequence of ?

A. Tokens
B. Expression
C. C statement
D. Rules
Answer» D. Rules
11.

Which of the following software tool is parser generator ?

A. Lex
B. Yacc
C. Both a and b
D. None of these
Answer» C. Both a and b
12.

A Lex compiler generates ?

A. Lex object code
B. Transition tables
C. C Tokens
D. None of above
Answer» C. C Tokens
13.

Analysis which determines the meaning of a statement once its grammatical structure becomes known is termed as

A. Semantic analysis
B. Syntax analysis
C. Regular analysis
D. General analysis
Answer» B. Syntax analysis
14.

Symbolic names can be associated with

A. Information
B. Data or instruction
C. Operand
D. Mnemonic operation
Answer» C. Operand
15.

Storage mapping is done by ?

A. Loader
B. Linker
C. Operating system
D. Compiler
Answer» E.
16.

A compiler bridges the semantic gap between

A. PL domain and storage domain
B. Execution domain and syntax domain
C. PL domain and execution domain
D. None of the above
Answer» D. None of the above
17.

The operations perform by compiler to determine the data item designated by the use of name in the source program are

A. Structural analysis
B. Scope analysis and name resolution
C. Syntax analysis
D. Semantic analysis
Answer» C. Syntax analysis
18.

A compiler that runs on one machine and produces code for a different machine is called

A. Cross compilation
B. One pass compilation
C. Two pass compilation
D. None of these
Answer» B. One pass compilation
19.

In a two pass assembler the object code generation is done during the ?

A. Second pass
B. First pass
C. Zeroeth pass
D. Not done by assembler
Answer» B. First pass
20.

Which of the following is not a type of assembler ?

A. One pass
B. Two pass
C. Three pass
D. Load and go
Answer» D. Load and go
21.

In a two pass assembler, adding literals to literal table and address resolution of local symbols are done using ?

A. First pass and second respectively
B. Both second pass
C. Second pass and first respectively
D. Both first pass
Answer» E.
22.

In a two pass assembler the pseudo code EQU is to be evaluated during ?

A. Pass 1
B. Pass 2
C. Not evaluated by the assembler
D. None of above
Answer» B. Pass 2
23.

Which of the following system program foregoes the production of object code to generate absolute machine code and load it into the physical main storage location from which it will be executed immediately upon completion of the assembly ?

A. Macro processor
B. Load and go assembler
C. Two pass assembler
D. Compiler
Answer» C. Two pass assembler
24.

Consider a program with a linked origin of 5000. Let the memory area allocated to it have the start address of 70000. Which amongst the following will be the value to be loaded in relocation register?

A. 20000
B. 50000
C. 70000
D. None of the above
Answer» E.
25.

Translator for low level programming language were termed as

A. Assembler
B. Compiler
C. Linker
D. Loader
Answer» B. Compiler
26.

An assembler is

A. Programming language dependent
B. Syntax dependant
C. Machine dependant
D. Data dependant
Answer» D. Data dependant
27.

An imperative statement

A. Reserves areas of memory and associates names with them
B. Indicates an action to be performed during execution of assembled program
C. Indicates an action to be performed during optimization
D. None of the above
Answer» C. Indicates an action to be performed during optimization
28.

Assembler is a machine dependent, because of?

A. Macro definition table(MDT)
B. Pseudo operation table(POT)
C. Argument list array(ALA)
D. Mnemonics operation table(MOT)
Answer» E.
29.

Assembler is ?

A. A program that places programs into memory an prepares them for execution
B. A program that automate the translation of assembly language into machine language
C. A program that accepts a program written in high level language and produces an object program
D. Is a program that appears to execute a source program as if it were machine language
Answer» C. A program that accepts a program written in high level language and produces an object program
30.

Forward reference table(FRT) is arranged like ?

A. Stack
B. Queue
C. Linked list
D. Double linked list
Answer» D. Double linked list
31.

Which of the following is not an intermediate code form?

A. Postfix notation
B. Syntax trees
C. Three address codes
D. Quadruples
Answer» E.
32.

Which of the following parser is most powerful?

A. Operator precedence
B. Canonical LR
C. LALR
D. SLR
Answer» C. LALR
33.

The ultimate goal of a compiler is to,

A. Reduce the clock cycles for a programming task.
B. Reduce the size of the object code.
C. Be versatile.
D. Be able to detect even the smallest of errors.
Answer» B. Reduce the size of the object code.
34.

Which of the following is used for grouping of characters into tokens (in a computer)

A. A parser
B. Code optimizer
C. Code generator
D. Scanner
Answer» E.
35.

Assembler is a program that

A. Places programs into memory and prepares then for execution
B. Automates the translation of assemble language into machine language
C. Accepts a program written in a high level language and produces an object program
D. Appears to execute a resource as if it were machine language
Answer» C. Accepts a program written in a high level language and produces an object program
36.

A single two pass assembler does which of the following in the first pass

A. It allicates space for the literals
B. It computes the total length of the program
C. It builds the symbol table for the symbols and their values
D. All of the above
Answer» E.
37.

Convert the ASLA assembly language instructions into hexadecimal machine language:

A. 40
B. 0111EF
C. 9001E6
D. DA000F
Answer» B. 0111EF
38.

Instructions performing actions in assembly language are called

A. Imperative statements
B. Declarative statements
C. Directive statements
D. None of the above
Answer» B. Declarative statements
39.

Assembly language programs are written using

A. Hex code
B. Mnenonics
C. ASCII code
D. None of these
Answer» C. ASCII code
40.

The instruction DEC N inform the assembler to

A. Decrement the content of N
B. Decrement the data addressed by N
C. Convert signed decimal number to binary
D. None of these
Answer» B. Decrement the data addressed by N
41.

To overcome the problems of the assembler in dealing with branching code we use _____ .

A. Interpreter
B. Debugger
C. Op-Assembler
D. Two-pass assembler
Answer» E.
42.

The utility program used to bring the object code into memory for execution is ______.

A. Loader
B. Fetcher
C. Extractor
D. Linker
Answer» B. Fetcher
43.

_____ directive is used to specify and assign the memory required for the block of code .

A. Allocate
B. Assign
C. Set
D. Reserve
Answer» E.
44.

The directive used to perform initialization before the execution of the code is ______ .

A. Reserve
B. Store
C. Dataword
D. EQU
Answer» D. EQU
45.

The purpose of the ORIGIN directive is,

A. To indicate the starting position in memory, where the program block is to be stored
B. To indicate the starting of the computation code
C. To indicate the purpose of the code
D. To list the locations of all the registers used
Answer» B. To indicate the starting of the computation code
46.

The assembler directive EQU, when used in the instruction : Sum EQU 200 does,

A. Finds the first occurrence of Sum and assigns value 200 to it
B. Replaces every occurrence of Sum with 200
C. Re-assigns the address of Sum by adding 200 to its original address
D. Assigns 200 bytes of memory starting the location of Sum
Answer» C. Re-assigns the address of Sum by adding 200 to its original address
47.

In Assembly language programming, minimum number of operands required for an instruction is/are

A. Zero
B. One
C. Two
D. Both b and c
Answer» B. One
48.

Advantage of using assembly language rather than machine language is that

A. It is mneomonic and easy to read
B. Addresses any symbolic not absolute
C. Introduction of data to program is easier
D. All of these
Answer» E.
49.

A = {x: x x }represents

A. {0}
B. {1}
C. {}
D. {x}
Answer» D. {x}
50.

If A, B, C be three sets such that A B = A C and A B = A C, then

A. A=B
B. A=C
C. B=C
D. A=B=C
Answer» D. A=B=C