Quiz Electronics Engineering
Exam: NIC
Topic: Miscellaneous
Date: 04/05/2020
Each Question carries 1 Mark
Negative Marking: 1/4
Time: 10 Minutes
Q1. In K-Map, the adjacent squares represent minterms that differ by-
(a) One variable
(b) Two variable
(c) Three variable
(d) All of these
Q2. Which of the following operator is used to access the value of structure pointer?
(a) .
(b) &
(c) *
(d) →
Q3. What is Applet?
(a) It is an application that run inside a rectangular region on the web page
(b) It can display animation, sound, games and general utilities
(c) Its application is calculator and search engine
(d) all of the above
Q4. Which of the following is used to interconnect two IP classes, class A and C networks?
(a) a bridge needed
(b) a class B network is needed
(c) a router is needed
(d) Can’t say
Q5. Fetch and decode cycle is not required in-
(a) Direct addressing
(b) immediate addressing
(c) Indirect addressing
(d) All of the above
Q6. If initialization is a part of declaration of a structure, then the storage class can be?
(a) static
(b) register
(c) automatic
(d) anything
Q7. Which technique stores a program on disk and then transfers the program into main storage as and when they are needed, is known as
(a) Spooling
(b) Swapping
(c) Thrashing
(d) All of the above
Q8. Parsing is also known as –
(a) Lexical analysis
(b) Semantic analysis
(c) Syntax analysis
(d) Code generation
Q9. Let X be a random variable with PDF given by
fX(x) = {█(a; -1 ≤x ≤1@0; otherwise)┤
Find the value of constant ‘a’.
(a) 1/2
(b) 1/3
(c) 2
(d) 3
Q10. Which of the following types of coupling has the weakest coupling?
(a) Pathological coupling
(b) Control coupling
(c) Data coupling
(d) Message coupling
SOLUTIONS
S1. Ans. (a)
Sol. In K-Map in SOP form, each square represents a min-term. This K-Map is constructed using gray code and we know that in Gray code at one time only one value changes. So, Adjacent squares always differ by just one literal i.e. 1 Variable.
S2. Ans. (d)
Sol.
“ → ” (arrow) operator is used to access class, structure or union member using a pointer.
S3. Ans. (d)
Sol. An applet is a small application designed to run within another application. While the term “applet” is sometimes used to describe small programs included with a computer’s operating system, it usually refers to Java applets, or small applications written in the Java programming language. An applet can be a fully functional Java application because it has the entire Java API at its disposal. An applet is embedded in an HTML page using the APPLET or OBJECT tag and hosted on a web server. Applets are used to make the web site more dynamic and entertaining.
S4. Ans. (c)
Sol. Router is used to connect two different IP class networks.
S5. Ans. (b)
Sol. Fetch decode cycle consists of following 4 steps – fetch, Decode, Read the effective address and execute.
But in Immediate Addressing Mode, data is directly present in the instruction itself. So no need to Fetch and decode. It follows Step 3 of instruction cycle (i.e. reading effective address) which decides what operation it is. If this is a memory operation – then the computer, check if it is a direct memory operation or indirect memory operation (i.e. the effective address is being read from the memory). After that it is executed.
S6. Ans. (a)
Sol. Identifiers declared with the storage class have static storage duration and either internal or no linkage. If the identifiers are initialized, the initialization is performed once before the beginning of execution and exist till the termination of the program . If no explicit initialization is performed, static objects are by default initialized to zero. Their scope is local to the function to which they were defined.
S7. Ans. (b)
Sol.
Swapping is a technique which is used for program larger than the main memory. The operating system copies data as much main memory can accommodate and leaves the rest on the disk. When the operating system needs data from the disk, it exchanges (swaps) a portion of data (called a page or segment) in main memory with a portion of required data from the disk. This process is called as Swapping.
Spooling is the process of sending data to a spool, or temporary storage area in the computer’s memory. This data may contain files or processes. It is executed by a device, program or the system like a printer. Spool means simultaneous operations of online peripherals.
Thrashing occurs when a computer’s virtual memory resources are overused, leading to a constant state of paging and page faults. This affects the performance of the computer leading to degradation or collapse of system. The system can detect thrashing by evaluating the level of CPU utilization as compared to the level of multi-programming. It can be prevented by running fewer programs and using memory more efficiently, adding RAM to the system, or maybe even by increasing the swap size.
S8. Ans. (c)
Sol. Parsing is also known as Syntactic / syntax analysis. It is the process of analyzing a string of symbols, either in natural language or in computer languages, according to the rules of a formal grammar. It can break the data into smaller elements coming from lexical analysis phase and produces output in the form of parse tree.
S9. Ans.(a)
Sol.
S10. Ans.(d)
Sol. Coupling between two modules is a measure of the degree of interdependence or interaction between the two modules. A module having high cohesion and low coupling is said to be functionally independent of other modules. Lower is the coupling, better the program.
Message coupling: weakest type of coupling. It is achieved by state decentralization and component communication is done via parameters or message passing.