C Subjective Question

Share Embed Donate


Short Description

Download C Subjective Question...

Description

COMPUTER APPLICATION BASIC QUESTIONS 1 What is C language? C is a middle level programming programming

language.

It is

language. C is a Structured, procedural

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.

Dynamic memory allocation: For getting memory dynamically It uses functions such as malloc ( ) or calloc ( ).the values returned by these functions are assigned to pointer variables, this way is called as 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 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 functions (Library function) that which are predefined and supplied with the compiler called as built-in functions. 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 are five types of storage classes: 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-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 can’t 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 it’s 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.

28What is component diagrams? A component diagram is particularly useful with teams of larger size......... 29What are the various components in sequence diagrams? Actor: Actor represents an external user / end user who interact with the system. 30What are the parts of a deployment diagram? Nodes: A node represents any hardware component. The configuration of hardware is represented by attributes of nodes..........

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 general-purpose software that provides the users with the processes of defining, constructing and manipulating the database for various applications. 33. Define the "integrity rules"? There are two Integrity rules.

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

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)? 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.

2. Non-Procedural DML or High level: DML requires a user to specify what data are needed 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 redundancy, (2). Minimizing insertion, deletion and 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 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.

2. Aggregation: A concept which is used to model a relationship between a collection of entities and relationships. It is used when we need to express a 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 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 (non-recursive) function. Even when such equivalent iterative procedures are written, explicit stack is to be used. 43.

Sorting is not possible by using which of the following methods?

(Insertion, Selection, Exchange, Deletion) Sorting is not possible in Deletion. Using insertion we can 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 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

a

linear

one.

According to Storage Linked List is a Non-linear one. 49. Which is the simplest file structure? (Sequential, Indexed, Random) Sequential is the simplest file structure. 50. What are the types of Collision Resolution Techniques and the methods used in each of the type?

1. Open addressing (closed hashing), The methods used include: Overflow block.

2. Closed addressing (open hashing), The methods used include: Linked list, Binary tree. 51. Explain Belady’s 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.

d. Circular wait: A closed chain of processes exists such that each process holds at least one resource needed by another process in the chain.

55 What is short, long and medium-term scheduling? Long term scheduler determines which programs are admitted to the system for processing. It 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 finest-grained decision of which process should execute next.

This scheduler is invoked whenever an event occurs. It may lead to interruption of one process by preemption.

56 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? 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 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 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.

63 Define Bandwidth and Latency? Network performance is measured in Bandwidth (throughput) and Latency (Delay). Bandwidth of a 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? 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 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? Multiplexing

is

the

set

of

techniques

that

allows

the

simultaneous

transmission of multiple signals across a single data link. 68 Which layers are network support layers? a.Physical layer b.Data link layer c.Network layer 69 What is Error Detection? What are its methods? Data can be corrupted during transmission. For reliable communication errors must be deducted and Corrected. Error Detection uses the concept of redundancy, which means adding extra bits for detecting errors at the destination. 70 Define Encoder? A device or program that uses predefined algorithms to encode, or compress audio or video data for storage or transmission use. A circuit that is used to convert between digital video and analog 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, 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 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 signatures (different set of parameters). Method overriding is the ability of the inherited class rewriting the virtual method of the base class. 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. Examples: 1) The operators >> and 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. > 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. >

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

79 what is the difference between parameter and argument? Diff b/w parameter and argument is : Argument basically is one of the following > An Expression in the comma-separated list in a function call. > A sequence of one or more preprocessor tokens in the comma-separated list in a macro call. > 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 basically is one of the 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. > 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. >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 a structure are by default public. > Structures contain only data while class binds both data and member functions. > Structure doesn’t support the polymorphism, inheritance and 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

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

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 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, 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? 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)

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF