All in One
All in One
13: What is an exception in Java? Give an example of a checked and unchecked exception.
A: An exception in Java is an event that disrupts the normal flow of a program. An example of a checked
exception is IOException, while an unchecked exception is NullPointerException.
3: What is a database?
A: A database is a structured collection of data that is organized and managed by a DBMS.
8: What is DML?
A: DML (Data Manipulation Language) is a set of SQL statements used to manipulate data within the
database. It includes commands like INSERT, UPDATE, and DELETE.
13: How do you update data in a table using the UPDATE statement in DML?
A: The UPDATE statement is used to modify existing data in a table by specifying the columns to be
updated and the new values.
15: What is the difference between the TRUNCATE TABLE and DELETE statements?
A: The TRUNCATE TABLE statement is used to delete all rows from a table in a single operation, whereas
the DELETE statement allows for selective row deletion based on specified conditions.
Data can be directly accessed by the processing Firstly, data is transferred to primary memory and after
unit. then routed to the processing unit.
It is temporary because data is stored temporarily. It is permanent because data is stored permanently.
In this memory, data can be lost whenever there is In this memory, data is stored permanently and
a power failure. therefore cannot be lost even in case of power failure.
It is much faster than secondary memory and saves It is slower as compared to primary memory and saves
data that is currently used by the computer. different kinds of data in different formats.
7.What is a parser?
A: A parser for grammar G is a program that takes as input a string w and produces as output either a parse
tree for w ,if w is a sentence of G or an error message indicating that w is not a sentence of G.
13.The set of all strings over the alphabet S = {a, b} (including e) is denoted by?
A:(a + b)*
14.What is the purpose of converting a context-free grammar (CFG) into Chomsky normal form (CNF)?
A:Chomsky normal form is a specific form of a context-free grammar. Converting a CFG into CNF has
several purposes:
It simplifies the grammar by eliminating unnecessary productions and ambiguity.
It allows for more efficient parsing algorithms.
It provide
15. What are the components of cfg?
A: Terminals, non-terminals, production rules, and start symbol
9. What is an interrupt?
- Answer: An interrupt is a signal generated by hardware or software to interrupt the normal execution of a
program. It allows the operating system to handle events, such as hardware device requests or error
conditions.
1. What is a microprocessor?
- Answer: A microprocessor is an integrated circuit that serves as the central processing unit (CPU) of a
computer system, capable of executing instructions and performing arithmetic and logic operations.
8. What is the difference between synchronous and asynchronous serial communication in microcontrollers?
- Answer: Synchronous serial communication requires a clock signal to synchronize the data transmission
between the microcontroller and external devices, while asynchronous serial communication uses start and
stop bits to delimit data packets.
10. What is the difference between parallel and serial data transmission in microcontrollers?
- Answer: Parallel data transmission sends multiple bits simultaneously on separate lines, while serial data
transmission sends bits one at a time on a single line.
5. Which of the compiler allows the only modified sections of source code to be recompiled?
Incremental compiler
Dynamic compiler
Reconfigurable compiler
Subjective compiler
Answer: Incremental compiler
6. Identify the data structure which has minimum access time in case of symbol table implementation?
Self-organizing list
Hash table
Search tree
Linear
Answer: Hash table
12.
Identify the technique used to replace run-time computations with compile-time computations.
Code hoisting
Pee hole optimization
Invariant computation
Constant folding
Answer: Constant folding
13.
Identifying the class of statement when compiled does not produce any executable code.
Structural statement
I/O statement
Assignment statement
Declaration
Answer: Structural statement
3. What is a pixel?
- Answer: A pixel is the smallest unit of an image, representing a single point and holding color or
intensity information.
8. What is the difference between O(1), O(n), O(log n), and O(n^2) time complexities?
O(1) represents constant time complexity, indicating that the algorithm's running time remains constant
regardless of the input size. O(n) represents linear time complexity, where the running time grows
proportionally with the input size. O(log n) represents logarithmic time complexity, where the running time
grows slowly as the input size increases. O(n^2) represents quadratic time complexity, where the running
time grows quadratically with the input size.
10. What is the difference between stable and unstable sorting algorithms?
A stable sorting algorithm preserves the relative order of elements with equal keys during the sorting
process, while an unstable sorting algorithm does not guarantee the preservation of relative order.