Saturday 7 September 2013

BEL (Bharat Electronics Limited) Model question Papers


BEL (Bharat Electronics Limited) Model question Papers

BEL Question Papers Technical :

Question from Java   :


What is the final keyword denotes?

Answer: final keyword denotes that it is the final implementation for that method or variable or class. You can’t override that method/variable/class any more. 

What is the significance of List Iterator?

Answer: You can iterate back and forth.

What is the major difference between LinkedList and ArrayList?

Answer: Linked List are meant for sequential accessing. ArrayList are meant for random accessing. 

What is nested class?

Answer: If all the methods of a inner class is static then it is a nested class. 

What is inner class?

Answer: If the methods of the inner class can only be accessed via the instance of the inner class, then it is called inner class. 

What is composition?

Answer: Holding the reference of the other class within some other class is known as composition. 

What is aggregation?

Answer: It is a special type of composition. If you expose all the methods of a composite class and route the method call to the composite method through its reference, then it is called aggregation. 

What are the methods in Object?

Answer: clone, equals, wait, finalize, getClass, hashCode, notify, notifyAll, toString 

Can you instantiate the Math class?

Answer: You can’t instantiate the math class. All the methods in this class are static. And the constructor is not public.

What is singleton?

Answer: It is one of the design pattern. This falls in the creational pattern of the design pattern.

There will be only one instance for that entire JVM. You can achieve this by having the private constructor in the class. For eg., public class Singleton { private static final Singleton s = new Singleton(); private

Singleton() { } public static Singleton getInstance() { return s; } // all non static methods … }

     1.What is the difference between C and Java?

     Answer: JAVA is Object-Oriented while C is procedural.
Java is an Interpreted language while C is a compiled language.
C is a low-level language while JAVA is a high-level language.
C uses the top-down approach while JAVA uses the bottom-up approach.
Pointer go backstage in JAVA while C requires explicit handling of pointers.
The Behind-the-scenes Memory Management with JAVA & The User-Based Memory Management in C.
JAVA supports Method Overloading while C does not support overloading at all.
Unlike C, JAVA does not support Preprocessors, & does not really them.
The standard Input & Output Functions--C uses the printf & scanf functions as its standard input & output while JAVA uses the System.out.print & System.in.read functions.
Exception Handling in JAVA And the errors & crashes in C.

2.What is the difference between array and pointer?

         Answer:  Pointer is a variable in a program is something with a name, the value of which can vary. 
         The way the compiler and linker handles this is that it assigns a specific block of memory within the computer to hold the value of that variable.
         An array is a conceptual data representation consisting of a list of more than one item  of a particular scalar type (int, float, char, structure, etc.)  where each element is accessed by its index.

          3. What is the difference between Strings and Arrays?
            Answer: String can hold only char data. Where as an array can hold any data type.
           An array size cannot be changed. Where as a string size can be changed if it is a char                                        pointer
          The last element of an array is an element of the specific type. The last character of a string is a null – ‘\0’character.
         The length of an array is to specified in [] at the time of declaration (except char[]). The                                         length of the string is the number of characters + one (null character).


4.What is Recursion Function?
Answer: a) A recursive function is a function which calls itself.
b) The speed of a recursive program is slower because of stack overheads. (This attribute is evident if
you run above C program.)
c) A recursive function must have recursive conditions, terminating conditions, and recursive expressions.
5. Diffrence between default and copy constructor?


6.What are abstract class?

Answer: An abstract class is a class which does not fully represent an object. Instead, it represents a broad range of different classes of objects. However, this representation extends only to the features that those classes of objects have in common. Thus, an abstract class provides only a partial description of its objects

7.Define Deadlock?

Answer: In an operating system, a deadlock is a situation which occurs when a process enters a waiting state because a resource requested by it is being held by another waiting process, which in turn is waiting for another resource. If a process is unable to change its state indefinitely because the resources requested by it are being used by other waiting process, then the system is said to be in a deadlock.

8.What is linked list?

Answer: Linked list is one of the fundamental data structures, and can be used to implement other data structures.
In a linked list there are different numbers of nodes. Each node is consists of two fields. The first field holds the value or data and the second field holds the reference to the next node or null if the linked list is
empty.

9.What is the difference bet do loop & do while loop?
Answer: The difference between a "do ...while" loop and a "while {} " loop is that the while loop tests its condition before execution of the contents of the loop begins; the "do" loop tests its condition after it's been executed at least once. 
As noted above, if the test condition is false as the while loop is entered the block of code is never executed. 
Since the condition is tested at the bottom of a do loop, its block of
code is always executed at least once.

10.What is polymorphism & inheritance property?

Answer: Polymorphism is the ability to use an operator or function in different ways. Polymorphism gives different
meanings or functions to the operators or functions. Poly, referring to many, signifies the many uses of
these operators and functions. A single function usage or an operator functioning in many ways can be
called polymorphism. Polymorphism refers to codes, operations or objects that behave differently in
different contexts.

11.What is the difference between DBMS and RDBMS?12.What is OOPS concept?

Answer: Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures
consisting of data fields and methods together with their interactions – to design applications and
computer programs. Programming techniques may include features such as data abstraction,
encapsulation, messaging, modularity, polymorphism, and inheritance. Many modern programming
languages now support OOP, at least as an option.


13.What are dynamic and static memory location?

Answer: The allocation of memory for the specific fixed purposes of a program in a predetermined fashion controlled by the compiler is said to be static memory allocation.
The allocation of memory (and possibly its later deallocation) during the running of a program and under
the control of the program is said to be dynamic memory allocation.

14.Write a program in C to sort a list of numbers in ascending order?

Answer: #include <stdio.h>
#include <conio.h>
int main()
{
int a[10],i,j,temp=0;
printf("Enter all the 10 numbers");
for(i=0;i<10;i++)
scanf("%d",&a[i]);
for(i=0;i<10;i++) //This loop is for total array elements (n)
{
for(j=0;j<9;j++) //this loop is for total combinations (n-1)
{
if(a[j]>a[j+1]) //if the first number is bigger then swap the two numbers
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
printf("The ordered array is");
for(j=0;j<10;j++) //Finally print the ordered array
printf("%d \t",a[j]);
getch();
return 0;
}

16.What is the differentiate b/w analog and digital communication?

Answer: 1. Ease of multiplexing. Multiplexing is used in both digital and analog systems to reduce the cost of wiring between two ends. However, FDM in analog systems is expensive and TDM suffers the effects of noise, distortion, and cross-talk. TDM in digital systems is simple and economical.
2. Ease of signalling. Call set-up establishment and other control information such as (on hook/off hook) are digital in nature and can be integrated easily into the digital system. In analog systems, this information needs a special attention.information needs a special attention.
3. Use of digital technology. The implementation of digital equipment is cheaper than its analog counterpart and more efficient. Digital processing of voice signals is also more effective in areas such as tone generation/detection, echo control, amplification, filtering, compounding, and format conversion.
4. Integration of transmission and switching. Traditionally, transmission and switching functions have been separate. In digital systems, these functions are integrated. As a result, the voice signals are digitized near the source and remain as such until delivered to the destination. Thus, eliminating the multiplexing/demultiplexing stages at each switch and improving the overall voice quality.
Advantages of a digital communication system over its analog:
Operability at low signal-to-noise
Signal regeneration
Accommodation of other services.
Performance monitorability
Ease of encryption

17.What is the difference between Truncate and Delete?

Answer: Truncate an Delete both are used to delete data from the table. These both command will only delete data
of the specified table, they cannot remove the whole table data structure.Both statements delete the data
from the table not the structure of the table.
TRUNCATE is a DDL (data definition language) command whereas DELETE is a DML (data manipulation
language) command.
You can use WHERE clause (conditions) with DELETE but you can't use WHERE clause with TRUNCATE .
You cann't rollback data in TRUNCATE but in DELETE you can rollback data. TRUNCATE removes
(delete) the record permanently.
A trigger doesn’t get fired in case of TRUNCATE whereas Triggers get fired in DELETE command.
If tables which are referenced by one or more FOREIGN KEY constraints then TRUNCATE will not work.
TRUNCATE resets the Identity counter if there is any identity column present in the table where delete not
resets the identity counter.
Delete and Truncate both are logged operation.But DELETE is a logged operation on a per row basis and
TRUNCATE logs the deallocation of the data pages in which the data exists.
TRUNCATE is faster than DELETE.

18.What are the advantages of SQL?

Answer: These are the advantages of PL/SQL.
Block Structures: PL SQL consists of blocks of code, which can be nested within each other. Each block
forms a unit of a task or a logical module. PL/SQL Blocks can be stored in the database and reused.
Procedural Language Capability: PL SQL consists of procedural language constructs such as conditional
statements (if else statements) and loops like (FOR loops).
Better Performance: PL SQL engine processes multiple SQL statements simultaneously as a single
block, thereby reducing network traffic.
Error Handling: PL/SQL handles errors or exceptions effectively during the execution of a PL/SQL
program. Once an exception is caught, specific actions can be taken depending upon the type of the
exception or it can be displayed to the user with a message.
Hide data complexity

19.What is the difference between Dbms and OODbms?

Answer: DBMS: Database Management System
OODBMS: Object Oriented Database Management System
An object-relational database (ORD), or object-relational database management system (ORDBMS), is a
database management system (DBMS) similar to a relational database, but with an object-oriented
database model: objects, classes and inheritance are directly supported in database schemas and in the
query language. In addition, just as with proper relational systems, it supports extension of the data model
with custom data-types and methods.
Difference between SQL and PL /SQL?
Structured query language (SQL) is a database computer language designed for managing data
in relational database management systems (RDBMS), and originally based upon relational algebra. Basic
scope of SQL is to insert data and perform update, delete, schema creation, schema modification and
data access control against databases.PL SQL (Procedural Language/Structured Query Language) is a procedural extension
language for data entry and manipulation by Oracle.
SQL is data oriented language for selecting and manipulating data but PL SQL is a procedural language to
create applications.
SQL executes one statement at a time whereas in PL SQL block of code could be executed.
SQL is declarative where as PL SQL is procedural.
SQL is used to write Queries, Data Manipulation Language (DML) and Data Definition Language (DDL)
whereas PL SQL is used to write Program blocks, Triggers, Functions, Procedures, and Packages.
Difference between DBMS and File System
In File System, files are used to store data while, collections of databases are utilized for the storage of
data in DBMS.
Although File System and DBMS are two ways of managing data, DBMS clearly has many advantages
over File Systems.
Typically when using a File System, most tasks such as storage, retrieval and search are done manually
and it is quite tedious whereas a DBMS will provide automated methods to complete these tasks.
Because of this reason, using
a File System will lead to problems like data integrity, data inconsistency and data security, but these
problems could be avoided by using a DBMS.
Unlike File System, DBMS are efficient because reading line by line is not required and certain control
mechanisms are in place.

20.What is the basic difference between a Join and a Union?

Answer: Union:
It combines the results of two or more queries into a single result set consisting of all the rows belonging
to all queries in the union.
Basic Rules:
The number and the order of the columns must be the same in all queries.
The data types must be compatible.
Join:
To retrieve data from two tables or more than two tables then use joins.
Types: Inner Join, Outer Join(Right outer join, left outer join), cross join, Equi join, Self join.
The number and the order of the columns need not be the same in all queries.

21.what is a root?

Answer: "root" refers to the top-level directory of a file system. The word is derived from a tree root, since it
represents the starting point of a hierarchical tree structure. The folders within the tree represent the
branches, while the actual files are considered the leaves. However, unlike a real life tree, a data tree can
be visualized upside down, with the root at the top and directories and subdirectories spanning
downward.
The root node of a file system is also called the root directory. On a Windows-based PC, "C:\" represents
the root directory of the C drive.
If you ever use a terminal program to view files and folders on a computer, you can use the command "cd
/" (change directory to root) to navigate to the root directory.
"Root" is also the name of the user who has administrative privleges on a Unix or Linux server.

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More