Computer Application Basic Questions: 1 What Is C Language?
Computer Application Basic Questions: 1 What Is C Language?
1 What is C language?
C is a middle level programming
programming
language.
It is
widely
used
both
for
operating
systems
and
Applications.
2 What is an argument? Differentiate between formal arguments and actual
arguments?
Using argument we can pass the data from calling function to the called function.
Arguments available in the function definition are called formal arguments. Can be
preceded by their own data types.
We use Actual arguments in the function call.
3 What is the purpose of main ( ) function?
Main function is to be called when the program is getting started.
1. It is the first started function.
2. Returns integer value.
3. Recursive call is allowed for main () also.
4. It is user-defined function
5. It has two arguments:
5.1) argument count
5.2) argument vector (strings passed)
6. We can use any user defined name as parameters for main (), behalf of argc and
argv.
4 What is a pointer variable?
A pointer variable is used to contain the address of another variable in the memory.
5 What is static memory allocation and dynamic memory allocation?
Information regarding static memory allocation and dynamic memory allocation are
given below:
Static memory allocation:
The compiler allocates the required memory space for a declared variable. Using the
address of operator, the reserved address is obtained and assigned to a pointer
variable. Most of the declared variables have static memory; this way is called as
static memory allocation. In the memory is assign during compile time.
10 what are header files? Can we run program without using header file?
Basically header files are the library functions. Header files have definitions of
functions. These are required to execute the specific operation of function. we write
header file with .h extension. Generally these are pre-defined fuctions, But we can
also generate our own header file.
Example:
stdio.h header file is use to perform function like prinf and scanf.
conio.h header file is use to perform function like clrscr and getch.
11 What is macro?
Macros are the fragment of code. That is used to given a name. When we want to
used threw name it is being replaced by content of macros. we can differentiate
macros in terms of what they look like & when they are used. Macros are of two
types:
1. Object-like macros.
2. Function-like macros.
When we used Object-like macros It resembles data objects. Where as when we
using function-like macros it resembles function calls
12 What are the three OOPS principles and define them?
Encapsulation, Inheritance and Polymorphism are the three OOPs
Principles.
Encapsulation:
Is the Mechanism that binds together code and the data it manipulates, and keeps
both safe from outside interference and misuse.
Inheritance:
Is the process by which one object acquires the properties of another object.
Polymorphism:
Is a feature that allows one interface to be used for a general class of actions.
13 What is the use of bin and lib in JDK?
Bin contains all tools such as javac, applet viewer, awt tool etc., whereas Lib
contains all packages and variables.
14 What are the kinds of variables in Java? What are their uses?
Java has three kinds of variables namely, the instance variable, the local variable
and the class variable. Local variables are used inside blocks as counters or in
methods as temporary variables and are used to store information needed by a
single method.
Instance variables are used to define attributes or the state of a particular object and
are used to store information needed by multiple methods in the objects.
Class variables are global to a class and to all the instances of the class and are
useful for communicating between different objects of all the same class or keeping
track of global states.
15 What is the difference between while statement and a do statement?
A while statement checks at the beginning of a loop to see whether the next loop
iteration should occur. A do statement checks at the end of a loop to see whether the
next iteration of a loop should occur. The do statement will always execute the body
of a loop at least once.
16
Which
method
is
used
to
determine
the
class
of
an
object?
get Class ( ) method can be used to find out what class the belongs to. This class is
defined in the object class and is available to all objects.
17 Which keyword is used to create an instance of a class?
new.
18
Which
method
is
used
to
garbage
collect
an
object?
finalize ().
19 What are packages? what is use of packages?
The package statement defines a name space in which classes are stored. If you
omit the package, the classes are put into the default package.
Signature... package pkg;
Use: * It specifies to which package the classes defined in a file belongs to. *
Package is both naming and a visibility control mechanism
20
What
public:
do
Anything
you
declared
understand
as
public
by
package
can
be
access
accessed
from
specifier?
anywhere
private: Anything declared in the private cant be seen outside of its class.
default: It is visible to subclasses as well as to other classes in the same package.
21What
is
difference
between
interface
and
an
abstract
class?
All the methods declared inside an Interface are abstract. Where as abstract class
must have at least one abstract method and others may be concrete or abstract.
In Interface we need not use the keyword abstract for the methods
22 What is the difference between throw and throws? And its application?
Exceptions that are thrown by java runtime systems can be handled by Try and
catch blocks. With throw exception we can handle the exceptions thrown by the
program itself. If a method is capable of causing an exception that it does not
handle, it must specify this behavior so the callers of the method can guard
against that exception
23 When can subclasses not access super class members?
When super class is declared as private.
24Which class does begin Java class hierarchy?
Object class
25 What are the three types of modeling in UML?
Structural, behavioral, and architectural.
26 What is OOPS Architecture?
Takes care structural and behavioral aspect of a software system.
Includes software usage, functionality, performance, reuse, economic and technology
constraints.
27 What are Messages?
Specification of a communication.
1. Entity Integrity: States that "Primary key cannot have NULL value"
2. Referential Integrity: States that "Foreign Key can be either a NULL value
or should be Primary Key value of other relation.
34. What is view?
A view may be thought of as a virtual table, that is, a table that does not really exist
in its own right but is instead derived from one or more underlying base table. In
other words, there is no stored file that direct represents the view instead a
1. Procedural DML or Low level: DML requires a user to specify what data are
needed and how to get those data.
(FDs)
and
primary
key
to
achieve
the
properties
1. Atomicity: Either all actions are carried out or none are. Users should not
have to worry about the effect of incomplete transactions. DBMS ensures this
by undoing the actions of incomplete transactions.
45. In tree construction which is the suitable efficient data structure? (Array,
Linked list, Stack, Queue)
Linked list is the suitable efficient data structure.
46. What is the type of the algorithm used in solving the 8 Queens problem?
Backtracking
47. What is a spanning Tree?
A spanning tree is a tree associated with a network. All the nodes of the graph
appear on the tree once. A minimum spanning tree is a spanning tree organized so
that the total edge weight between nodes is minimized.
48. Whether Linked List is linear or Non-linear data structure?
According
to
Access
strategies
Linked
list
is
linear
one.
2. Closed addressing (open hashing), The methods used include: Linked list,
Binary tree.
51. Explain Beladys anomaly?
Also called FIFO anomaly. Usually, on increasing the number of frames
allocated to a process virtual memory, the process execution is faster,
because fewer page faults occur. Sometimes, the reverse happens, i.e., the
execution time increases even when more frames are allocated to the
process. This is Belady's Anomaly. This is true for certain page reference
patterns.
52 hat is a binary semaphore? What is its use?
A binary semaphore is one, which takes only 0 and 1 as values. They are
used to implement mutual exclusion and synchronize concurrent processes.
53 hat is thrashing?
It is a phenomenon in virtual memory schemes when the processor spends
most of its time swapping pages, rather than executing instructions. This is
due to an inordinate number of page faults.
54 List the Coffman's conditions that lead to a deadlock.
a. Mutual Exclusion: one process may use a critical resource at a time.
b. Hold and wait: A process may be allocated some resources while
waiting for others.
c. No pre-emption: No resource can be forcible removed from a process
holding it.
60 Define latency, transfer and seek time with respect to disk I/O.
Seek time is the time required to move the disk arm to the required track.
Rotational delay or latency is the time it takes for the beginning of the
required sector to reach the head. Sum of seek time (if any) and latency is
the access time. Time taken to actually transfer a span of data is transfer
time.
61.Define Network?
A network is a set of devices connected by physical media links. A network is
recursively is a connection of two or more nodes by a physical link or two or
more networks connected by one or more nodes.
62. Define Routing?
The process of determining systematically hoe to forward messages toward
the destination nodes based on its address is called routing.
64 what is protocol?
A protocol is a set of rules that govern all aspects of information
communication.
65 When a switch is said to be congested?
It is possible that a switch receives packets faster than the shared link can
accommodate and stores in its memory, for an extended period of time, then
the switch will eventually run out of buffer space, and some packets will have
to be dropped and in this state is said to congested state.
is
the
set
of
techniques
that
allows
the
simultaneous
What
is
the
difference
between
an
object
and
class?
Class and Objects are diff but related concepts. Every objects belongs to the class
and very class has a one or more related objects.
Classes are:
Object
is
defined
as
s/w
construct
which
binds
data
and
logic
or
methods(functions) both.
76 What are the advantages of inheritance?
It permits code reusability. Reusability saves time in program development. It
encourages the reuse of proven and debugged high-quality software, thus reducing
problem after a system becomes functional.
77Explain the scope resolution operator.
It permits a program to reference an identifier in the global scope that has been
hidden by another identifier with the same name in the local scope.
78 What are Identifiers
A valid identifier is a sequence of one or more letters, digits or underscores
characters (_). Neither spaces nor punctuation marks or symbols can be part of an
identifier. Only letters, digits and single underscore characters are valid. In addition,
variable identifiers always have to begin with a letter. They can also begin with an
underline character (_ ), but in some cases these may be reserved for compiler
specific keywords or external identifiers, as well as identifiers containing two
successive underscore characters anywhere. In no case they can begin with a digit
81What is .NET?
.NET is essentially a framework for software development. It is similar in nature to
any other software development framework (J2EE etc) in that it provides a set of
runtime containers/capabilities, and a rich set of pre-built functionality in the form of
class libraries and APIs
The .NET Framework is an environment for building, deploying, and running Web
Services and other applications. It consists of three main parts: the Common
Language Runtime, the Framework classes, and ASP.NET.
82 How many languages .NET is supporting now?
When .NET was introduced it came with several languages. VB.NET, C#, COBOL and
Perl, etc. The site DotNetLanguages.Net says 44 languages are supported
page itself automatically. How? The values are encrypted and saved in hidden
controls. this is done automatically by the ASP.NET. This can be switched off / on for
a single control
87 How do you validate the controls in an ASP .NET page?
Using special validation controls that are meant for this. We have Range Validator,
Email Validator.
88 Can the validation be done in the server side? Or this can be done only in
the Client side?
Client side is done by default. Server side validation is also possible. We can switch
off the client side and server side can be done.
89 How to manage pagination in a page?
Using pagination option in Data Grid control. We have to set the number of records
for a page, then it takes care of pagination by itself.
90 What is ADO .NET and what is difference between ADO and ADO.NET?
ADO.NET is stateless mechanism. I can treat the ADO.Net as a separate in-memory
database where in I can use relationships between the tables and select insert and
updates to the database. I can update the actual database as a batch.
91 What is computer architecture?
It is the art of assembling logical elements into a computing device; the specification
of the relation between parts of a computer system.
92 What are the basic functional units of a computer?
Input, memory, arithmetic and logic unit, output and control units are the basic
functional units of a computer
93 Define Response time and Throughput.
Response time is the time between the start and the completion of the event. Also
referred to as execution time or latency. Throughput is the total amount of work
done in a given amount of time.
94 What is the function of memory unit? how will you classify it?
The function of the memory unit is to store programs and data, there are two
classes of storage, called primary and secondary.
95 Explain the concept behind pipelining.
Pipelining is an implementation technique whereby multiple instructions
are overlapped in execution. It takes advantage of parallelism that exists among
actions needed to execute an instruction.
96 What are timing signals?
Timing signals are signals that determine when a given action is to take place. the
actual timing signals that govern the transfers are generated by control circuits.
97 Which memory is non-volatile and may be written only once?
PROM
98 What is flip flop?
A flip flop is 1 bit memory.
99 What is addressing modes?
Each instruction of a computer specifies an operation on certain data. The are
various ways of specifying address of the data to be operated on. These different
ways of specifying data are called the addressing modes
100. What is the time complexity of Merge Sort?
O (long)