Sie sind auf Seite 1von 69

PYRAMID FINISHING SCHOOL,NIET Gr NOIDA COMPUTER APPLICATION BASIC QUESTIONS

1 What is C language? C is a middle C level is a programming Structured, language.

procedural programming language. It is widely used both for operating systems and Applications. 2 What is an argument? formal Differentiate between

arguments and actual arguments? Using argument we can pass the data from calling function to the called
1|Confidential

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:
2|Confidential

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:
3|Confidential

Static memory allocation: The compiler allocates the required memory space for a declared variable. Using the address of operator, the reserved the address is obtained have and static assigned to a pointer variable. Most of declared variables memory; this way is called as static memory allocation. In the memory is assign during compile time.

Dynamic memory allocation: For getting memory dynamically It uses functions such as malloc ( ) or calloc ( ).the values returned by these
4|Confidential

functions variables,

are this

assigned way is

to

pointer as

called

dynamic memory allocation. In this memory is assigned during run time. 6 What is difference between static and global static variable? Main difference between static and global static variables is given below: In context of memory it allocated to static variables only once. Static global variable has scope only in the file in which they are declared. outside the file it can not be accessed. but its value remains intact if code is running in some other file
5|Confidential

7 What is a function and built-in function? function is that when large program is divided into sub programs. where as each one done one or more actions to be performed for a large program. Those subprograms are called functions. they support only static and extern storage classes. Built-in that functions are (Library function) and which predefined

supplied with the compiler called as built-in functions.

6|Confidential

8 Difference between arrays and pointers? Arrays automatically allocate space with fixed in size and location, but in pointers above are dynamic. array is referred directly to the elements. but a pointer refers to address of the elements. 9 what are storage variable? A storage class changes the behavior of a variable. It use to controls the lifetime, scope and linkage. There classes:
7|Confidential

are

five

types

of

storage

1. auto 2. static 3. extern 4. register 5. typedef 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-

8|Confidential

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:
9|Confidential

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
10 | C o n f i d e n t i a l

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

11 | C o n f i d e n t i a l

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
12 | C o n f i d e n t i a l

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 A while statement statement and checks a at do the statement? beginning of a loop to see whether the next loop iteration should occur. A do statement checks at the end of a loop
13 | C o n f i d e n t i a l

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.

14 | C o n f i d e n t i a l

18

Which

method collect

is an

used

to

garbage finalize ().

object?

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.

15 | C o n f i d e n t i a l

* Package is both naming and a visibility control mechanism 20 What do you understand by package can be access accessed Anything from specifier? anywhere in the public: Anything declared as public private: class. default: It is visible to subclasses as well as to other classes in the same package. 21What is difference between declared

private cant be seen outside of its

interface and an abstract class?


16 | C o n f i d e n t i a l

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
17 | C o n f i d e n t i a l

itself.

If

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

18 | C o n f i d e n t i a l

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.

28What is component diagrams?

19 | C o n f i d e n t i a l

A component diagram is particularly useful with teams of larger size......... 29What components diagrams? Actor: Actor represents an external user / end user who interact with the system. 30What are the parts of a are in the various sequence

deployment diagram? Nodes: hardware configuration represented nodes..........


20 | C o n f i d e n t i a l

node of by

represents hardware attributes

any The is of

component.

31. What is database?


A database is a logically coherent collection of data with some inherent meaning, representing some aspect of real world and which is designed, built and populated with data for a specific purpose. 32. What is DBMS? It is a collection of programs that enables user to create and maintain a database. In other words it is generalpurpose software that provides the users with the processes of defining, constructing and manipulating the database for various applications.
21 | C o n f i d e n t i a l

33. Define the "integrity rules"? There are two Integrity rules.
1.

Entity value"

Integrity:

States

that

"Primary key cannot have NULL 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,
22 | C o n f i d e n t i a l

2.

there is no stored file that direct represents the view instead a definition of view is stored in data dictionary.

35. What is E-R model? This data model is based on real world that consists of basic objects called entities and of relationship among these objects. Entities are described in a database by a set of attributes. 36. What is DDL (Data Definition Language)?

23 | C o n f i d e n t i a l

A data base schema is specifies by a set of definitions expressed by a special language called DDL. 37. What is DML (Data

Manipulation Language)? This language that enable user to access or manipulate data as organized by appropriate data model.
1.

Procedural DML or Low level: DML requires a user to specify what data are needed and how to get those data. Non-Procedural specify what DML are or High needed

2.

level: DML requires a user to data

24 | C o n f i d e n t i a l

without specifying how to get those data. 38. What is normalization? It is a process of analyzing the given relation schemas based on their Functional Dependencies (FDs) and primary key to achieve the properties (1).Minimizing Minimizing update anomalies. 39. What is BCNF (Boyce-Codd Normal Form)? A relation schema R is in BCNF if it is in 3NF and satisfies an additional redundancy, deletion (2). and insertion,

25 | C o n f i d e n t i a l

constraint that for every FD X A, X must be a candidate key. 40. What do you mean by

atomicity and aggregation?


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. Aggregation: A concept which is used to model a relationship between a collection of entities and relationships. It is used when we

2.

26 | C o n f i d e n t i a l

need

to

express

relationship

among relationships. 41.What is data structure? A data structure is a way of organizing data that considers not only the items stored, but also their relationship to each other. Advance knowledge about the relationship between data items allows designing of efficient algorithms for the manipulation of data. 42. What is the data structures

used to perform recursion? Stack. Because of its LIFO (Last In First Out) property it remembers its 'caller' so knows whom to return when
27 | C o n f i d e n t i a l

the function has to return. Recursion makes use of system stack for storing the return addresses of the function calls. Every recursive function has its

equivalent iterative

iterative procedures

(non-recursive) are written,

function. Even when such equivalent explicit stack is to be used. 43. using Sorting is not possible by which of the following Selection, (Insertion,

methods?

Exchange, Deletion) Sorting Deletion.


28 | C o n f i d e n t i a l

is Using

not

possible we

in can

insertion

perform insertion sort, using selection we can perform selection sort, using exchange we can perform the bubble sort (and other similar sorting methods). But no sorting method can be done just using deletion. 44. In an AVL tree, at what

condition the balancing is to be done? If the 'pivotal value' (or the 'Height factor') is greater than 1 or less than -1.

45. In tree construction which is the suitable efficient data

29 | C o n f i d e n t i a l

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

30 | C o n f i d e n t i a l

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 a linear one. According to Storage Linked List is a Non-linear one. 49. Which is the simplest file

structure? (Sequential, Indexed, Random) Sequential structure. is the simplest file

31 | C o n f i d e n t i a l

50.

What

are

the

types

of

Collision the type?


1.

Resolution

Techniques

and the methods used in each of

Open

addressing The

(closed used (open used

hashing), Closed hashing),

methods

include: Overflow block.


2.

addressing The methods

include: Linked list, Binary tree. 51. Explain Beladys anomaly? Also called FIFO anomaly. Usually, on increasing the to number a the of frames virtual
32 | C o n f i d e n t i a l

allocated memory,

process process

execution is faster, because fewer page faults occur. Sometimes, the reverse execution the happens, time i.e., the even increases This is

when more frames are allocated to process. 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 and mutual exclusion synchronize

concurrent processes.
33 | C o n f i d e n t i a l

53 It

hat is thrashing? is a phenomenon schemes pages, in when rather virtual the than

memory swapping

processor spends most of its time executing instructions. This is due to an inordinate number of page faults. 54 List the Coffman's conditions a. Mutual may Exclusion: use a one critical

that lead to a deadlock. process b.

resource at a time. Hold and wait: A process be allocated some may


34 | C o n f i d e n t i a l

resources others. c. No

while

waiting

for No

pre-emption: can be

resource it.
d.

forcible

removed from a process holding Circular wait: A closed chain of processes exists such that each process resource What is holds at least by one needed short, another and

process in the chain.


55

long

medium-term scheduling? Long term scheduler determines which programs are admitted to the system for processing. It

35 | C o n f i d e n t i a l

controls

the

degree

of

multiprogramming. Once admitted, a job becomes a process. Medium term scheduling is part of the swapping function. This relates to processes that are in a blocked or suspended state. They are swapped out of real-memory until they are ready to execute. The swapping-in decision is based on memory-management criteria. Short term scheduler, also know as a dispatcher executes most frequently, and makes the finestgrained decision of which process
36 | C o n f i d e n t i a l

should event

execute occurs. of It

next. may lead

This to by

scheduler is invoked whenever an interruption preemption.


56

one

process

What

are

turnaround

time

and

response time? Turnaround time is the interval between the submission of a job and its completion. Response time is the interval between submission of a request, and the first response to that request. 57 When is a system in safe

state?
37 | C o n f i d e n t i a l

The set of dispatchable processes is in a safe state if there exists at least one temporal order in which all processes can be run to completion without resulting in a deadlock. 58 What is cycle stealing?

We encounter cycle stealing in the context of Direct Memory Access (DMA). Either the DMA controller can use the data bus when the CPU does not need it, or it may force the CPU to temporarily suspend operation. The latter technique is called
38 | C o n f i d e n t i a l

cycle

stealing.

Note

that

cycle stealing can be done only at specific break points in an instruction cycle. 59 What is a trap and trapdoor?

Trapdoor is a secret undocumented entry point into a program used to grant access without normal methods of access authentication. A trap is a software interrupt, usually the result of an error condition.
60

Define I/O.

latency,

transfer

and

seek time with respect to disk

39 | C o n f i d e n t i a l

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.


40 | C o n f i d e n t i a l

network

is

recursively

is

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 hoe determining to forward is

systematically nodes

messages toward the destination based on its address called routing.


63

Define Bandwidth and Latency? Network performance is measured in Bandwidth (throughput) and Latency (Delay). Bandwidth of a

41 | C o n f i d e n t i a l

network is given by the number of bits that can be transmitted over the network in a certain period of time. Latency corresponds to how long it t5akes a message to travel from one end off a network to the other. It is strictly measured in terms of time.
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?

42 | C o n f i d e n t i a l

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.
66

Define

the

terms

Uncasting,

Multicasting and Broadcasting? If the message is sent from a source to a single destination node, it is called Unicasting. If the message is sent to some
43 | C o n f i d e n t i a l

subset of other nodes, it is called Multicasting. If the message is sent to all the m nodes in the network it is called Broadcasting. 67 What is multiplexing? is that the set of the of

Multiplexing techniques simultaneous data link. 68

allows

transmission

multiple signals across a single

Which layers are network

support layers? a.Physical layer

44 | C o n f i d e n t i a l

b.Data link layer c.Network layer 69 What is Error Detection?

What are its methods? Data can be corrupted For errors the Corrected. during reliable must concept be of Error

transmission. communication deducted Detection and uses

redundancy, which means adding extra bits for detecting errors at the destination. 70 Define Encoder?

45 | C o n f i d e n t i a l

A device or program that uses predefined algorithms to encode, or compress audio or video data for storage circuit video. 71.What is Polymorphism? Polymorphism is phenomena by which we can make make a method for reuse. Polymorphism is an object oriented term. Polymorphism may be defined as the ability of related objects to respond to the same message with different, but appropriate actions. In other words,
46 | C o n f i d e n t i a l

or that

transmission is used to

use.

convert

between digital video and analog

polymorphism means taking more than one form. Polymorphism leads to two important aspects in Object Oriented terminology - First one is function Overloading and second is function Overriding. Overloading is the practice of supplying more than one definition for a given function name in the same scope. The compiler is left to pick the appropriate version of the function or operator based on the arguments with which it is called. Overriding refers to the modifications made in the sub class to the inherited methods from the base class to change their behavior
47 | C o n f i d e n t i a l

72 What is the difference between "overloading" and "overriding"? Differences are thereOverloading a method (or function) in C++ is the ability for functions of the same name to be defined as long as these methods have different set of signatures (different

parameters). Method overriding is the ability of the inherited class rewriting the virtual method of the base class.

48 | C o n f i d e n t i a l

overriding is runtime polymorphism while overloading is compile time polymorphism. 73 What is the advantage of function overloading according to users point of view? We know that function name is same. But each time we are writing code for each function. In this case it is advantageous than normal function. 74 What is Operator overloading? When an operator is overloaded, it takes on an additional meaning relative to a certain class. But it can still retain all of its old meanings.
49 | C o n f i d e n t i a l

Examples: 1) The operators >> and << may be used for I/O operations because in the header, they are overloaded. 2) In a stack class it is possible to overload the + operator so that it appends the contents of one stack to the contents of another. But the + operator still retains its original meaning relative to other types of data. 75 What is the difference between an object and a class? Class and Objects are diff but related concepts. Every objects belongs to the

50 | C o n f i d e n t i a l

class and very class has a one or more related objects. Classes are: > A Class is static. > A class combination of data(called data members)and functions(called member functions). > Class is a user defined data type with data members and member functions. > Classes defines object. > One class can define any no of Object.

51 | C o n f i d e n t i a l

> Class is a template(type) or blue print its state how objects should be and behave. Objects are: > Object is an instance of a class while a class can have many objects. > Object is a dynamic. > Objects are the basic runtime entities in an object oriented system. > Data and function which combine into a single entity is called object. > Objects are instances of classes which identifies the class properties. > Object can't define classes. > Object can created and destroyed as your necessity.
52 | C o n f i d e n t i a l

> Object is defined as a 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
53 | C o n f i d e n t i a l

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 are single valid. underscore In addition, characters

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
54 | C o n f i d e n t i a l

for

compiler

specific

keywords or external identifiers, as well as identifiers containing two successive with a digit 79 what is the difference between parameter and argument? Diff b/w parameter and argument is : Argument following > > An A Expression sequence of in the one commaor more separated list in a function call. preprocessor tokens in the commaseparated list in a macro call.
55 | C o n f i d e n t i a l

underscore

characters

anywhere. In no case they can begin

basically

is

one

of

the

> Its represent the value which you pass to a procedure parameter when you call the procedure. The calling code supplies the arguments when it calls the procedure. > It is something passed into a function(value), whereas a parameter is the type of data plus the name. Parameter following > An object that is declared in a function declaration or definition. > An identifier b/w the parentheses immediately following the macro name in a macro definition. basically is one of the

56 | C o n f i d e n t i a l

> It is represent a value that the procedure expects you to pass when you call it. The procedure's declaration defines its parameters. This example explains the difference b/w a parameter and an argument: 80)What is the difference between class and structure? Diff b/w Class and Structure is : Class is defined as>Class is a successor of Structure. By default all the members inside the class are private.

57 | C o n f i d e n t i a l

>Class

is

the

advanced

and

the

secured form of structure. >Classes are reference typed. >Class can be inherited. >In Class we can initials the variable during the declaration. >Class can not be declared without a tag at the first time. >Class support polymorphism. Structures define as : > In C++ extended the structure to contain functions also. All declarations inside public. a structure are by default

58 | C o n f i d e n t i a l

> Structures contain only data while class binds both data and member functions. > Structure doesnt support the and polymorphism, initialization. > Structure is a collection of the different data type. > Structure is overloaded. > Structures are value type. > Structure can be declared without a tag at the first time inheritance

81What is .NET? .NET is essentially a framework for


59 | C o n f i d e n t i a l

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?
60 | C o n f i d e n t i a l

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 83 How is .NET able to support multiple languages? A language should comply with the Common Language Runtime standard to become a .NET language. In .NET, code is compiled to Microsoft Intermediate Language (MSIL for short). This is called as Managed Code. This Managed code is run in .NET environment. So after
61 | C o n f i d e n t i a l

compilation to this IL the language is not a barrier. A code can call or use a function written in another language. 84 How ASP .NET different from ASP? Scripting is separated from the HTML, Code is compiled as a DLL, and these DLLs can be executed on the server. 85 What is smart navigation? The cursor position is maintained when the page gets refreshed due to the server side validation and the page gets refreshed. 86 What is view state? The web is stateless. But in ASP.NET,
62 | C o n f i d e n t i a l

the state of a page is maintained in the in the 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?
63 | C o n f i d e n t i a l

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 ADO.NET? ADO.NET is stateless mechanism. I can treat the ADO.Net as a separate
64 | C o n f i d e n t i a l

between

ADO

and

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?

65 | C o n f i d e n t i a l

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?
66 | C o n f i d e n t i a l

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 technique instructions are overlapped in execution. It takes advantage of parallelism that exists among actions needed to execute an instruction. 96 What are timing signals? is an implementation multiple

whereby

67 | C o n f i d e n t i a l

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


68 | C o n f i d e n t i a l

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)

69 | C o n f i d e n t i a l

Das könnte Ihnen auch gefallen