0% found this document useful (0 votes)
113 views77 pages

Interview Questions

C is a mid-level procedural programming language developed in 1972. It is known as a "mother language" as many modern languages are based on its concepts like arrays, functions, and file handling. C is called a mid-level language as it can be used for both low-level system programming and high-level application development. Key features of C include being simple, portable, structured, and providing memory management capabilities. Functions and arrays are commonly used data types in C.

Uploaded by

Aradhana Mehra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
113 views77 pages

Interview Questions

C is a mid-level procedural programming language developed in 1972. It is known as a "mother language" as many modern languages are based on its concepts like arrays, functions, and file handling. C is called a mid-level language as it can be used for both low-level system programming and high-level application development. Key features of C include being simple, portable, structured, and providing memory management capabilities. Functions and arrays are commonly used data types in C.

Uploaded by

Aradhana Mehra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 77

Interview questions

1) What is C language?

C is a mid-level and procedural programming language. The Procedural programming


language is also known as the structured programming language is a technique in which large
programs are broken down into smaller modules, and each module uses structured code. This
technique minimizes error and misinterpretation. 

2) Why is C known as a mother language?

C is known as a mother language because most of the compilers and JVMs are written in C
language. Most of the languages which are developed after C language has borrowed heavily
from it like C++, Python, Rust, javascript, etc. It introduces new core concepts like arrays,
functions, file handling which are used in these languages.

3) Why is C called a mid-level programming language?

C is called a mid-level programming language because it binds the low level and high -level
programming language. We can use C language as a System programming to develop the
operating system as well as an Application programming to generate menu driven customer
driven billing system. 

4) Who is the founder of C language?

Dennis Ritchie. 

5) When was C language developed?

C language was developed in 1972 at bell laboratories of AT&T. 

6) What are the features of the C language?

The main features of C language are given below:

o Simple: C is a simple language because it follows the structured approach, i.e., a


program is broken into parts
o Portable: C is highly portable means that once the program is written can be run on
any machine with little or no modifications.
o Mid Level: C is a mid-level programming language as it combines the low- level
language with the features of the high-level language.
o Structured: C is a structured language as the C program is broken into parts.
o Fast Speed: C language is very fast as it uses a powerful set of data types and
operators.
o Memory Management: C provides an inbuilt memory function that saves the
memory and improves the efficiency of our program.
o Extensible: C is an extensible language as it can adopt new features in the future.

7) What is the use of printf() and scanf() functions?

printf(): The printf() function is used to print the integer, character, float and string values on
to the screen.

Following are the format specifier: 

o %d: It is a format specifier used to print an integer value.


o %s: It is a format specifier used to print a string.
o %c: It is a format specifier used to display a character value.
o %f: It is a format specifier used to display a floating point value.

scanf(): The scanf() function is used to take input from the user.

8) What is the difference between the local variable and global variable in C?

Following are the differences between a local variable and global variable:

Basis for comparison Local Global variable


variable

Declaration A variable which is declared inside A variable which is declared


function or block is known as a local outside function or block is
variable. known as a global variable.

Scope The scope of a variable is available The scope of a variable is


within a function in which they are available throughout the
declared. program.

Access Variables can be accessed only by those Any statement in the entire
statements inside a function in which program can access variables.
they are declared.

Life Life of a variable is created when the Life of a variable exists until
function block is entered and destroyed the program is executing.
on its exit.

Storage Variables are stored in a stack unless The compiler decides the
specified. storage location of a variable.

9) What is the use of a static variable in C?

Following are the uses of a static variable:

o A variable which is declared as static is known as a static variable. The static variable
retains its value between multiple function calls.
o Static variables are used because the scope of the static variable is available in the
entire program. So, we can access a static variable anywhere in the program.
o The static variable is initially initialized to zero. If we update the value of a variable,
then the updated value is assigned.
o The static variable is used as a common value which is shared by all the methods.
o The static variable is initialized only once in the memory heap to reduce the memory
usage.

10) What is the use of the function in C?

Uses of C function are:

o C functions are used to avoid the rewriting the same code again and again in our
program.
o C functions can be called any number of times from any place of our program.
o When a program is divided into functions, then any part of our program can easily be
tracked.
o C functions provide the reusability concept, i.e., it breaks the big task into smaller
tasks so that it makes the C program more understandable.

11) What is the difference between call by value and call by reference in C?

Following are the differences between a call by value and call by reference are:

Call by value Call by reference

Description When a copy of the value is When a copy of the value is


passed to the function, then the passed to the function, then the
original value is not modified. original value is modified.

Memory Actual arguments and formal Actual arguments and formal


location arguments are created in separate arguments are created in the
memory locations. same memory location.

Safety In this case, actual arguments In this case, actual arguments


remain safe as they cannot be are not reliable, as they are
modified. modified.

Arguments The copies of the actual The addresses of actual


arguments are passed to the arguments are passed to their
formal arguments. respective formal arguments.

Example of call by value:

1. #include <stdio.h>  
2. void change(int,int);  
3. int main()  
4. {  
5.     int a=10,b=20;  
6.     change(a,b); //calling a function by passing the values of variables.  
7.     printf("Value of a is: %d",a);  
8.     printf("\n");  
9.     printf("Value of b is: %d",b);  
10.     return 0;  
11. }  
12. void change(int x,int y)  
13. {  
14.     x=13;  
15.     y=17;  
16. }  

Output:

Value of a is: 10
Value of b is: 20

Example of call by reference:

1. #include <stdio.h>  
2. void change(int*,int*);  
3. int main()  
4. {  
5.     int a=10,b=20;  
6.     change(&a,&b); // calling a function by passing references of variables.  
7.     printf("Value of a is: %d",a);  
8.     printf("\n");  
9.     printf("Value of b is: %d",b);  
10.     return 0;  
11. }  
12. void change(int *x,int *y)  
13. {  
14.     *x=13;  
15.     *y=17;  
16. }  

Output:

Value of a is: 13
Value of b is: 17

12) What is recursion in C?

When a function calls itself, and this process is known as recursion. The function that calls
itself is known as a recursive function.

Recursive function comes in two phases:

1. Winding phase
2. Unwinding phase

Winding phase: When the recursive function calls itself, and this phase ends when the
condition is reached.

Unwinding phase: Unwinding phase starts when the condition is reached, and the control
returns to the original call.

Example of recursion

1. #include <stdio.h>  
2. int calculate_fact(int);  
3. int main()  
4. {  
5.  int n=5,f;  
6.  f=calculate_fact(n); // calling a function  
7.  printf("factorial of a number is %d",f);  
8.   return 0;  
9. }  
10. int calculate_fact(int a)  
11. {  
12.   if(a==1)  
13.   {  
14.       return 1;  
15.   }  
16.   else  
17.   return a*calculate_fact(a-1); //calling a function recursively.  
18.    }  
Output:

factorial of a number is 120

13) What is an array in C?

An Array is a group of similar types of elements. It has a contiguous memory location. It


makes the code optimized, easy to traverse and easy to sort. The size and type of arrays
cannot be changed after its declaration.

Arrays are of two types:

o One-dimensional array: One-dimensional array is an array that stores the elements


one after the another.

Syntax:

1. data_type array_name[size];  
o Multidimensional array: Multidimensional array is an array that contains more than
one array.

Syntax:

1. data_type array_name[size];  

Example of an array:

1. #include <stdio.h>  
2. int main()  
3. {  
4.    int arr[5]={1,2,3,4,5}; //an array consists of five integer values.  
5.    for(int i=0;i<5;i++)  
6.    {  
7.        printf("%d ",arr[i]);  
8.    }  
9.     return 0;  
10. }  

Output:

12345

14) What is a pointer in C?

A pointer is a variable that refers to the address of a value. It makes the code optimized and
makes the performance fast. Whenever a variable is declared inside a program, then the
system allocates some memory to a variable. The memory contains some address number.
The variables that hold this address number is known as the pointer variable.

For example:

1. Data_type *p;  

The above syntax tells that p is a pointer variable that holds the address number of a given
data type value.

Example of pointer

1. #include <stdio.h>  
2. int main()  
3. {  
4.    int *p; //pointer of type integer.  
5.    int a=5;  
6.    p=&a;  
7.    printf("Address value of 'a' variable is %u",p);  
8.     return 0;  
9. }  

Output:

Address value of 'a' variable is 428781252

15) What is the usage of the pointer in C?

o Accessing array elements: Pointers are used in traversing through an array of


integers and strings. The string is an array of characters which is terminated by a null
character '\0'.
o Dynamic memory allocation: Pointers are used in allocation and deallocation of
memory during the execution of a program.
o Call by Reference: The pointers are used to pass a reference of a variable to other
function.
o Data Structures like a tree, graph, linked list, etc.: The pointers are used to
construct different data structures like tree, graph, linked list, etc.

16) What is a NULL pointer in C?

A pointer that doesn't refer to any address of value but NULL is known as a NULL pointer.
When we assign a '0' value to a pointer of any type, then it becomes a Null pointer.

17) What is a far pointer in C?


A pointer which can access all the 16 segments (whole residence memory) of RAM is known
as far pointer. A far pointer is a 32-bit pointer that obtains information outside the memory in
a given section.

18) What is dangling pointer in C?

o If a pointer is pointing any memory location, but meanwhile another pointer deletes
the memory occupied by the first pointer while the first pointer still points to that
memory location, the first pointer will be known as a dangling pointer. This problem
is known as a dangling pointer problem.
o Dangling pointer arises when an object is deleted without modifying the value of the
pointer. The pointer points to the deallocated memory.

Let's see this through an example.

1. #include<stdio.h>  
2. void main()  
3. {  
4.         int *ptr = malloc(constant value); //allocating a memory space.  
5.         free(ptr); //ptr becomes a dangling pointer.  
6. }  

In the above example, initially memory is allocated to the pointer variable ptr, and then the
memory is deallocated from the pointer variable. Now, pointer variable, i.e., ptr becomes a
dangling pointer.

How to overcome the problem of a dangling pointer

The problem of a dangling pointer can be overcome by assigning a NULL value to the
dangling pointer. Let's understand this through an example:

1. #include<stdio.h>  
2.       void main()  
3.       {  
4.               int *ptr = malloc(constant value); //allocating a memory space.  
5.               free(ptr); //ptr becomes a dangling pointer.  
6.               ptr=NULL; //Now, ptr is no longer a dangling pointer.  
7.       }  

In the above example, after deallocating the memory from a pointer variable, ptr is assigned
to a NULL value. This means that ptr does not point to any memory location. Therefore, it is
no longer a dangling pointer.

19) What is pointer to pointer in C?


In case of a pointer to pointer concept, one pointer refers to the address of another pointer.
The pointer to pointer is a chain of pointers. Generally, the pointer contains the address of a
variable. The pointer to pointer contains the address of a first pointer. Let's understand this
concept through an example:

1. #include <stdio.h>  
2.  int main()  
3. {  
4.     int a=10;  
5.     int *ptr,**pptr; // *ptr is a pointer and **pptr is a double pointer.  
6.     ptr=&a;  
7.     pptr=&ptr;  
8.     printf("value of a is:%d",a);  
9.     printf("\n");  
10.     printf("value of *ptr is : %d",*ptr);  
11.     printf("\n");  
12.     printf("value of **pptr is : %d",**pptr);  
13.     return 0;  
14. }  

In the above example, pptr is a double pointer pointing to the address of the ptr variable and
ptr points to the address of 'a' variable.

20) What is static memory allocation?

o In case of static memory allocation, memory is allocated at compile time, and


memory can't be increased while executing the program. It is used in the array.
o The lifetime of a variable in static memory is the lifetime of a program.
o The static memory is allocated using static keyword.
o The static memory is implemented using stacks or heap.
o The pointer is required to access the variable present in the static memory.
o The static memory is faster than dynamic memory.
o In static memory, more memory space is required to store the variable.

1. For example:  
2. int a[10];  

The above example creates an array of integer type, and the size of an array is fixed, i.e., 10.

21) What is dynamic memory allocation?

o In case of dynamic memory allocation, memory is allocated at runtime and memory


can be increased while executing the program. It is used in the linked list.
o The malloc() or calloc() function is required to allocate the memory at the runtime.
o An allocation or deallocation of memory is done at the execution time of a program.
o No dynamic pointers are required to access the memory.
o The dynamic memory is implemented using data segments.
o Less memory space is required to store the variable.

1. For example  
2. int *p= malloc(sizeof(int)*10);  

The above example allocates the memory at runtime.

22) What functions are used for dynamic memory allocation in C language?

1. malloc()
o The malloc() function is used to allocate the memory during the execution of
the program.
o It does not initialize the memory but carries the garbage value.
o It returns a null pointer if it could not be able to allocate the requested space.

Syntax

1. ptr = (cast-type*) malloc(byte-size) // allocating the memory using malloc() function.  
2. calloc()

o The calloc() is same as malloc() function, but the difference only is that it
initializes the memory with zero value.

Syntax

1. ptr = (cast-type*)calloc(n, element-size);// allocating the memory using calloc() functi
on.  
2. realloc()

o The realloc() function is used to reallocate the memory to the new size.
o If sufficient space is not available in the memory, then the new block is
allocated to accommodate the existing data.

Syntax

1. ptr = realloc(ptr, newsize); // updating the memory size using realloc() function.  

In the above syntax, ptr is allocated to a new size.

2. free():The free() function releases the memory allocated by either calloc() or malloc()
function.
Syntax

1. free(ptr); // memory is released using free() function.  

The above syntax releases the memory from a pointer variable ptr.

23) What is the difference between malloc() and calloc()?

calloc() malloc()

Description The malloc() function allocates a The calloc() function allocates


single block of requested multiple blocks of requested
memory. memory.

Initialization It initializes the content of the It does not initialize the content of
memory to zero. memory, so it carries the garbage
value.

Number of It consists of two arguments. It consists of only one argument.


arguments

Return value It returns a pointer pointing to It returns a pointer pointing to the


the allocated memory. allocated memory.

24) What is the structure?

o The structure is a user-defined data type that allows storing multiple types of data in a
single unit. It occupies the sum of the memory of all members.
o The structure members can be accessed only through structure variables.
o Structure variables accessing the same structure but the memory allocated for each
variable will be different.

Syntax of structure

1. struct structure_name  
2. {  
3.   Member_variable1;  
4.  Member_variable2  
5. .  
6. .  
7. }[structure variables];  
Let's see a simple example.

1. #include <stdio.h>  
2. struct student  
3. {  
4.     char name[10];       // structure members declaration.  
5.     int age;  
6. }s1;      //structure variable  
7. int main()  
8. {  
9.     printf("Enter the name");  
10.     scanf("%s",s1.name);  
11.     printf("\n");  
12.     printf("Enter the age");  
13.     scanf("%d",&s1.age);  
14.     printf("\n");  
15.     printf("Name and age of a student: %s,%d",s1.name,s1.age);  
16.     return 0;  
17. }  

Output:

Enter the name shikha


Enter the age 26
Name and age of a student: shikha,26

25) What is a union?

o The union is a user-defined data type that allows storing multiple types of data in a
single unit. However, it doesn't occupy the sum of the memory of all members. It
holds the memory of the largest member only.
o In union, we can access only one variable at a time as it allocates one common space
for all the members of a union.

Syntax of union

1. union union_name  
2. {  
3. Member_variable1;  
4. Member_variable2;  
5. .  
6. .  
7. Member_variable n;  
8. }[union variables];  

Let's see a simple example

1. #include<stdio.h>  
2. union data  
3. {  
4.     int a;      //union members declaration.  
5.     float b;  
6.     char ch;  
7. };  
8. int main()  
9. {  
10.   union data d;       //union variable.  
11.   d.a=3;  
12.   d.b=5.6;  
13.   d.ch='a';  
14.   printf("value of a is %d",d.a);  
15.   printf("\n");  
16.   printf("value of b is %f",d.b);  
17.   printf("\n");  
18.   printf("value of ch is %c",d.ch);  
19.   return 0;  
20. }  

Output:

value of a is 1085485921
value of b is 5.600022
value of ch is a

In the above example, the value of a and b gets corrupted, and only variable ch shows the
actual output. This is because all the members of a union share the common memory space.
Hence, the variable ch whose value is currently updated.

26) What is an auto keyword in C?

In C, every local variable of a function is known as an automatic (auto) variable. Variables


which are declared inside the function block are known as a local variable. The local
variables are also known as an auto variable. It is optional to use an auto keyword before the
data type of a variable. If no value is stored in the local variable, then it consists of a garbage
value.

27) What is the purpose of sprintf() function?

The sprintf() stands for "string print." The sprintf() function does not print the output on the
console screen. It transfers the data to the buffer. It returns the total number of characters
present in the string.

Syntax

1. int sprintf ( char * str, const char * format, ... );  

Let's see a simple example


1.  #include<stdio.h>  
2. int main()  
3. {  
4.  char a[20];  
5.  int n=sprintf(a,"javaToint");  
6.  printf("value of n is %d",n);  
7.  return 0;}  

Output:

value of n is 9

28) Can we compile a program without main() function?

Yes, we can compile, but it can't be executed.

But, if we use #define, we can compile and run a C program without using the main()
function. For example:

1. #include<stdio.h>    
2. #define start main    
3. void start() {    
4.    printf("Hello");    
5. }    

More details.

29) What is a token?

The Token is an identifier. It can be constant, keyword, string literal, etc. A token is the
smallest individual unit in a program. C has the following tokens:

1. Identifiers: Identifiers refer to the name of the variables.


2. Keywords: Keywords are the predefined words that are explained by the compiler.
3. Constants: Constants are the fixed values that cannot be changed during the execution
of a program.
4. Operators: An operator is a symbol that performs the particular operation.
5. Special characters: All the characters except alphabets and digits are treated as special
characters.

30) What is command line argument?

The argument passed to the main() function while executing the program is known as
command line argument. For example:
1. main(int count, char *args[]){  
2. //code to  be executed  
3. }  

31) What is the acronym for ANSI?

The ANSI stands for " American National Standard Institute." It is an organization that
maintains the broad range of disciplines including photographic film, computer languages,
data encoding, mechanical parts, safety and more.

32) What is the difference between getch() and getche()?

The getch() function reads a single character from the keyboard. It doesn't use any buffer, so
entered data will not be displayed on the output screen.

The getche() function reads a single character from the keyword, but data is displayed on the
output screen. Press Alt+f5 to see the entered character.

Let's see a simple example

1. #include<stdio.h>  
2. #include<conio.h>  
3. int main()  
4. {  
5.       
6.  char ch;  
7.  printf("Enter a character ");  
8.  ch=getch(); // taking an user input without printing the value.  
9.  printf("\nvalue of ch is %c",ch);  
10.  printf("\nEnter a character again ");  
11.  ch=getche(); // taking an user input and then displaying it on the screen.  
12.   printf("\nvalue of ch is %c",ch);  
13.  return 0;  
14. }  

Output:

Enter a character
value of ch is a
Enter a character again a
value of ch is a

In the above example, the value entered through a getch() function is not displayed on the
screen while the value entered through a getche() function is displayed on the screen.
33) What is the newline escape sequence?

The new line escape sequence is represented by "\n". It inserts a new line on the output
screen.

34) Who is the main contributor in designing the C language after Dennis Ritchie?

Brain Kernighan.

35) What is the difference between near, far and huge pointers?

A virtual address is composed of the selector and offset. 

A near pointer doesn't have explicit selector whereas far, and huge pointers have explicit
selector. When you perform pointer arithmetic on the far pointer, the selector is not modified,
but in case of a huge pointer, it can be modified.

These are the non-standard keywords and implementation specific. These are irrelevant in a
modern platform.

36) What is the maximum length of an identifier?

It is 32 characters ideally but implementation specific.

37) What is typecasting?

The typecasting is a process of converting one data type into another is known as typecasting.
If we want to store the floating type value to an int type, then we will convert the data type
into another data type explicitly.

Syntax

1. (type_name) expression;  

38) What are the functions to open and close the file in C language?

The fopen() function is used to open file whereas fclose() is used to close file.


39) Can we access the array using a pointer in C language?

Yes, by holding the base address of array into a pointer, we can access the array using a
pointer.

40) What is an infinite loop?

A loop running continuously for an indefinite number of times is called the infinite loop.

Infinite For Loop:

1. for(;;){  
2. //code to be executed  
3. }  

Infinite While Loop:

1. while(1){  
2. //code to be executed  
3. }  

Infinite Do-While Loop:

1. do{  
2. //code to be executed  
3. }while(1);  

41) Write a program to print "hello world" without using a semicolon?

1. #include<stdio.h>      
2. void main(){      
3.  if(printf("hello world")){} // It prints the ?hello world? on the screen.  
}     
1) What is OOPS?

OOPS is abbreviated as Object Oriented Programming system in which programs are


considered as a collection of objects. Each object is nothing but an instance of a class.

2) Write basic concepts of OOPS?

Following are the concepts of OOPS:

1. Abstraction
2. Encapsulation
3. Inheritance
4. Polymorphism
3) What is a class?
A class is simply a representation of a type of object. It is the blueprint/plan/template that
describes the details of an object.

4) What is an Object?

An object is an instance of a class. It has its own state, behavior, and identity.

5) What is Encapsulation?

Encapsulation is an attribute of an object, and it contains all data which is hidden. That
hidden data can be restricted to the members of that class.

Levels are Public, Protected, Private, Internal, and Protected Internal.

6) What is Polymorphism?

Polymorphism is nothing but assigning behavior or value in a subclass to something that was
already declared in the main class. Simply, polymorphism takes more than one form.

7) What is Inheritance?

Inheritance is a concept where one class shares the structure and behavior defined in another
class. If Inheritance applied to one class is called Single Inheritance, and if it depends on
multiple classes, then it is called multiple Inheritance.

8) What are manipulators?

Manipulators are the functions which can be used in conjunction with the insertion (<<) and
extraction (>>) operators on an object. Examples are endl and setw.

9) Explain the term constructor

A constructor is a method used to initialize the state of an object, and it gets invoked at the
time of object creation. Rules for constructor are:

 Constructor Name should be the same as a class name.


 A constructor must have no return type.
10) Define Destructor?

A destructor is a method which is automatically called when the object is made of scope or
destroyed. Destructor name is also same as class name but with the tilde symbol before the
name.

11) What is an Inline function?

An inline function is a technique used by the compilers and instructs to insert complete body
of the function wherever that function is used in the program source code.

12) What is a virtual function?

A virtual function is a member function of a class, and its functionality can be overridden in
its derived class. This function can be implemented by using a keyword called virtual, and it
can be given during function declaration.
A virtual function can be declared using a token(virtual) in C++. It can be achieved in
C/Python Language by using function pointers or pointers to function.

13) What is a friend function?

A friend function is a friend of a class that is allowed to access to Public, private, or protected
data in that same class. If the function is defined outside the class cannot access such
information.

A friend can be declared anywhere in the class declaration, and it cannot be affected by
access control keywords like private, public, or protected.

14) What is function overloading?

Function overloading is a regular function, but it can perform different tasks. It allows the
creation of several methods with the same name which differ from each other by the type of
input and output of the function.

Example

1 void add(int&amp; a, int&amp; b);



3 void add(double&amp; a, double&amp; b);

5 void add(struct bob&amp; a, struct bob&amp; b);
15) What is operator overloading?

Operator overloading is a function where different operators are applied and depends on the
arguments. Operator,-,* can be used to pass through the function, and it has its own
precedence to execute

16) What is an abstract class?

An abstract class is a class which cannot be instantiated. Creation of an object is not possible
with an abstract class, but it can be inherited. An abstract class can contain only an Abstract
method. Java allows only abstract method in abstract class while other languages allow non-
abstract method as well.

17) What is a ternary operator?

The ternary operator is said to be an operator which takes three arguments. Arguments and
results are of different data types, and it depends on the function. The ternary operator is also
called a conditional operator.

18) What is the use of finalize method?

Finalize method helps to perform cleanup operations on the resources which are not currently
used. Finalize method is protected, and it is accessible only through this class or by a derived
class.

19) What are the different types of arguments?


A parameter is a variable used during the declaration of the function or subroutine, and
arguments are passed to the function body, and it should match with the parameter defined.
There are two types of Arguments.

 Call by Value – Value passed will get modified only inside the function, and it returns
the same value whatever it is passed into the function.
 Call by Reference – Value passed will get modified in both inside and outside the
functions and it returns the same or different value.
20) What is the super keyword?

The super keyword is used to invoke the overridden method, which overrides one of its
superclass methods. This keyword allows to access overridden methods and also to access
hidden members of the superclass.

It also forwards a call from a constructor, to a constructor in the superclass.

21) What is method overriding?

Method overriding is a feature that allows a subclass to provide the implementation of a


method that overrides in the main class. It will override the implementation in the superclass
by providing the same method name, same parameter, and same return type.

22) What is an interface?

An interface is a collection of an abstract method. If the class implements an interface, it


thereby inherits all the abstract methods of an interface.

Java uses Interface to implement multiple inheritances.

23) What is exception handling?

An exception is an event that occurs during the execution of a program. Exceptions can be of
any type – Runtime exception, Error exceptions. Those exceptions are adequately handled
through exception handling mechanism like try, catch, and throw keywords.

24) What are tokens?

A compiler recognizes a token, and it cannot be broken down into component elements.
Keywords, identifiers, constants, string literals, and operators are examples of tokens.

Even punctuation characters are also considered as tokens. Example: Brackets, Commas,
Braces, and Parentheses.

25) What is the main difference between overloading and overriding?

Overloading is static Binding, whereas Overriding is dynamic Binding. Overloading is


nothing but the same method with different arguments, and it may or may not return the equal
value in the same class itself.

Overriding is the same method names with the same arguments and return types associated
with the class and its child class.

26) What is the main difference between a class and an object? 


An object is an instance of a class. Objects hold multiple information, but classes don’t have
any information. Definition of properties and functions can be done in class and can be used
by the object.

A class can have sub-classes, while an object doesn’t have sub-objects.

27) What is an abstraction?

Abstraction is a useful feature of OOPS, and it shows only the necessary details to the client
of an object. Meaning, it shows only required details for an object, not the inner constructors,
of an object. Example – When you want to switch on the television, it is not necessary to
know the inner circuitry/mechanism needed to switch on the TV. Whatever is required to
switch on TV will be shown by using an abstract class.

28) What are the access modifiers?

Access modifiers determine the scope of the method or variables that can be accessed from
other various objects or classes. There are five types of access modifiers, and they are as
follows:

 Private
 Protected
 Public
 Friend
 Protected Friend
29) What are sealed modifiers?

Sealed modifiers are the access modifiers where the methods can not inherit it. Sealed
modifiers can also be applied to properties, events, and methods. This modifier cannot be
used to static members.

30) How can we call the base method without creating an instance?

Yes, it is possible to call the base method without creating an instance. And that method
should be “Static method.”

Doing Inheritance from that class.-Use Base Keyword from a derived class.

31) What is the difference between new and override?

The new modifier instructs the compiler to use the new implementation instead of the base
class function. Whereas, Override modifier helps to override the base class function.

32) What are the various types of constructors?

There are three types of constructors:

–  Default Constructor – With no parameters.

–  Parametric Constructor – With Parameters. Create a new instance of a class and also
passing arguments simultaneously.

–  Copy Constructor – Which creates a new object as a copy of an existing object.

33) What is early and late Binding? 


Early binding refers to the assignment of values to variables during design time, whereas late
Binding refers to the assignment of values to variables during run time.

34) What is ‘this’ pointer? 

THIS pointer refers to the current object of a class. THIS keyword is used as a pointer which
differentiates between the current object with the global object. It refers to the current object.

35) What is the difference between structure and a class?

The default access type of a Structure is public, but class access type is private. A structure is
used for grouping data, whereas a class can be used for grouping data and methods.
Structures are exclusively used for data, and it doesn’t require strict validation, but classes are
used to encapsulate and inherent data, which requires strict validation.

36) What is the default access modifier in a class?

The default access modifier of a class is Internal and the default access modifier of a class
member is Private.

37) What is a pure virtual function?

A pure virtual function is a function which can be overridden in the derived class but cannot
be defined. A virtual function can be declared as Pure by using the operator =0.

Example –

1 Virtual void function1() // Virtual, Not pure



3 Virtual void function2() = 0 //Pure virtual
38) What are all the operators that cannot be overloaded?

Following are the operators that cannot be overloaded -.

1. Scope Resolution (::)


2. Member Selection (.)
3. Member selection through a pointer to function (.*)
39) What is dynamic or run time polymorphism?

Dynamic or Run time polymorphism is also known as method overriding in which call to an
overridden function is resolved during run time, not at the compile time. It means having two
or more methods with the same name, same signature but with different implementation.

40) Do we require a parameter for constructors?

No, we do not require a parameter for constructors.

41) What is a copy constructor?

This is a special constructor for creating a new object as a copy of an existing object. There
will always be only one copy constructor that can be either defined by the user or the system.

What is a copy constructor? 


A copy constructor is a member function which initializes an object using another object of
the same class. A copy constructor has the following general function prototype:  
ClassName (const ClassName &old_obj);
42) What does the keyword virtual represented in the method definition?

It means we can override the method.

43) Whether static method can use nonstatic members?

False.

44) What are a base class, subclass, and superclass? 

The base class is the most generalized class, and it is said to be a root class.

A Subclass is a class that inherits from one or more base classes.

The superclass is the parent class from which another class inherits.

45) What is static and dynamic Binding? 

Binding is nothing but the association of a name with the class. Static Binding is a binding in
which name can be associated with the class during compilation time, and it is also called as
early Binding.

Dynamic Binding is a binding in which name can be associated with the class during
execution time, and it is also called as Late Binding.

46) How many instances can be created for an abstract class?

Zero instances will be created for an abstract class. In other words, you cannot create an
instance of an Abstract Class.

47) Which keyword can be used for overloading?

Operator keyword is used for overloading.


48) What is the default access specifier in a class definition?

Private access specifier is used in a class definition.

49) Which OOPS concept is used as a reuse mechanism? 

Inheritance is the OOPS concept that can be used as a reuse mechanism.

50) Which OOPS concept exposes only the necessary information to the calling
functions?

Encapsulation

DBMS

1. What is DBMS? 

A Database Management System (DBMS) is a program that controls creation, maintenance


and use of a database. DBMS can be termed as File Manager that manages data in a database
rather than saving it in file systems.
2. What is RDBMS? 

RDBMS stands for Relational Database Management System. RDBMS store the data into the
collection of tables, which is related by common fields between the columns of the table. It
also provides relational operators to manipulate the data stored into the tables. 

Example: SQL Server. 

3. What is SQL? 

SQL stands for Structured Query Language , and it is used to communicate with the
Database. This is a standard language used to perform tasks such as retrieval, updation,
insertion and deletion of data from a database. 

Standard SQL Commands are Select. 

4. What is a Database? 

Database is nothing but an organized form of data for easy access, storing, retrieval and
managing of data. This is also known as structured form of data which can be accessed in
many ways. 

Example: School Management Database, Bank Management Database. 

5. What are tables and Fields? 

A table is a set of data that are organized in a model with Columns and Rows. Columns can
be categorized as vertical, and Rows are horizontal. A table has specified number of column
called fields but can have any number of rows which is called record. 

Example:. 

Table: Employee. 

Field: Emp ID, Emp Name, Date of Birth. 

Data: 201456, David, 11/15/1960. 

6. What is a primary key? 

A primary key is a combination of fields which uniquely specify a row. This is a special kind
of unique key, and it has implicit NOT NULL constraint. It means, Primary key values
cannot be NULL. 

7. What is a unique key? 

A Unique key constraint uniquely identified each record in the database. This provides
uniqueness for the column or set of columns. 
A Primary key constraint has automatic unique constraint defined on it. But not, in the case of
Unique Key. 

There can be many unique constraint defined per table, but only one Primary key constraint
defined per table. 

8. What is a foreign key? 

A foreign key is one table which can be related to the primary key of another table.
Relationship needs to be created between two tables by referencing foreign key with the
primary key of another table. 

9. What is a join? 

This is a keyword used to query data from more tables based on the relationship between the
fields of the tables. Keys play a major role when JOINs are used. 

10. What are the types of join and explain each? 

There are various types of join which can be used to retrieve data and it depends on the
relationship between tables. 

 Inner Join. 

Inner join return rows when there is at least one match of rows between the tables. 

 Right Join. 

Right join return rows which are common between the tables and all rows of Right hand side
table. Simply, it returns all the rows from the right hand side table even though there are no
matches in the left hand side table. 

 Left Join. 

Left join return rows which are common between the tables and all rows of Left hand side
table. Simply, it returns all the rows from Left hand side table even though there are no
matches in the Right hand side table.

 Full Join.

Full join return rows when there are matching rows in any one of the tables. This means, it
returns all the rows from the left hand side table and all the rows from the right hand side
table. 

11. What is normalization? 

Normalization is the process of minimizing redundancy and dependency by organizing fields


and table of a database. The main aim of Normalization is to add, delete or modify field that
can be made in a single table. 
12. What is Denormalization. 

DeNormalization is a technique used to access the data from higher to lower normal forms of
database. It is also process of introducing redundancy into a table by incorporating data from
the related tables. 

13. What are all the different normalizations? 

The normal forms can be divided into 5 forms, and they are explained below -. 

 First Normal Form (1NF):. 

This should remove all the duplicate columns from the table. Creation of tables for the related
data and identification of unique columns. 

 Second Normal Form (2NF):. 

Meeting all requirements of the first normal form. Placing the subsets of data in separate
tables and Creation of relationships between the tables using primary keys. 

 Third Normal Form (3NF):. 

This should meet all requirements of 2NF. Removing the columns which are not dependent
on primary key constraints. 

 Fourth Normal Form (4NF):. 

Meeting all the requirements of third normal form and it should not have multi- valued
dependencies. 

14. What is a View? 

A view is a virtual table which consists of a subset of data contained in a table. Views are not
virtually present, and it takes less space to store. View can have data of one or more tables
combined, and it is depending on the relationship. 

15. What is an Index? 

An index is performance tuning method of allowing faster retrieval of records from the table.
An index creates an entry for each value and it will be faster to retrieve data. 

16. What are all the different types of indexes? 

There are three types of indexes -. 

 Unique Index. 

This indexing does not allow the field to have duplicate values if the column is unique
indexed. Unique index can be applied automatically when primary key is defined. 
 Clustered Index. 

This type of index reorders the physical order of the table and search based on the key values.
Each table can have only one clustered index.

 NonClustered Index. 

NonClustered Index does not alter the physical order of the table and maintains logical order
of data. Each table can have 999 nonclustered indexes. 

17. What is a Cursor? 

A database Cursor is a control which enables traversal over the rows or records in the table.
This can be viewed as a pointer to one row in a set of rows. Cursor is very much useful for
traversing such as retrieval, addition and removal of database records. 

18. What is a relationship and what are they? 

Database Relationship is defined as the connection between the tables in a database. There
are various data basing relationships, and they are as follows:. 

 One to One Relationship.


 One to Many Relationship.
 Many to One Relationship.
 Self-Referencing Relationship.

19. What is a query? 

A DB query is a code written in order to get the information back from the database. Query
can be designed in such a way that it matched with our expectation of the result set. Simply, a
question to the Database. 

20. What is subquery? 

A subquery is a query within another query. The outer query is called as main query, and
inner query is called subquery. SubQuery is always executed first, and the result of subquery
is passed on to the main query. 

21. What are the types of subquery? 

There are two types of subquery – Correlated and Non-Correlated. 

A correlated subquery cannot be considered as independent query, but it can refer the column
in a table listed in the FROM the list of the main query. 

A Non-Correlated sub query can be considered as independent query and the output of
subquery are substituted in the main query. 

22. What is a stored procedure? 


Stored Procedure is a function consists of many SQL statement to access the database system.
Several SQL statements are consolidated into a stored procedure and execute them whenever
and wherever required. 

23. What is a trigger? 

A DB trigger is a code or programs that automatically execute with response to some event
on a table or view in a database. Mainly, trigger helps to maintain the integrity of the
database. 

Example: When a new student is added to the student database, new records should be
created in the related tables like Exam, Score and Attendance tables. 

24. What is the difference between DELETE and TRUNCATE commands? 

DELETE command is used to remove rows from the table, and WHERE clause can be used
for conditional set of parameters. Commit and Rollback can be performed after delete
statement. 

TRUNCATE removes all rows from the table. Truncate operation cannot be rolled back. 

25. What are local and global variables and their differences? 

Local variables are the variables which can be used or exist inside the function. They are not
known to the other functions and those variables cannot be referred or used. Variables can be
created whenever that function is called. 

Global variables are the variables which can be used or exist throughout the program. Same
variable declared in global cannot be used in functions. Global variables cannot be created
whenever that function is called. 

26. What is a constraint? 

Constraint can be used to specify the limit on the data type of table. Constraint can be
specified while creating or altering the table statement. Sample of constraint are. 

 NOT NULL.
 CHECK.
 DEFAULT.
 UNIQUE.
 PRIMARY KEY.
 FOREIGN KEY.

27. What is data Integrity? 

Data Integrity defines the accuracy and consistency of data stored in a database. It can also
define integrity constraints to enforce business rules on the data when it is entered into the
application or database. 

28. What is Auto Increment? 


Auto increment keyword allows the user to create a unique number to be generated when a
new record is inserted into the table. AUTO INCREMENT keyword can be used in Oracle
and IDENTITY keyword can be used in SQL SERVER. 

Mostly this keyword can be used whenever PRIMARY KEY is used. 

29. What is the difference between Cluster and Non-Cluster Index? 

Clustered index is used for easy retrieval of data from the database by altering the way that
the records are stored. Database sorts out rows by the column which is set to be clustered
index. 

A nonclustered index does not alter the way it was stored but creates a complete separate
object within the table. It point back to the original table rows after searching. 

30. What is Datawarehouse? 

Datawarehouse is a central repository of data from multiple sources of information. Those


data are consolidated, transformed and made available for the mining and online processing.
Warehouse data have a subset of data called Data Marts. 

31. What is Self-Join? 

Self-join is set to be query used to compare to itself. This is used to compare values in a
column with other values in the same column in the same table. ALIAS ES can be used for
the same table comparison. 

32. What is Cross-Join? 

Cross join defines as Cartesian product where number of rows in the first table multiplied by
number of rows in the second table. If suppose, WHERE clause is used in cross join then the
query will work like an INNER JOIN. 

33. What is user defined functions? 

User defined functions are the functions written to use that logic whenever required. It is not
necessary to write the same logic several times. Instead, function can be called or executed
whenever needed. 

34. What are all types of user defined functions? 

Three types of user defined functions are. 

 Scalar Functions.
 Inline Table valued functions.
 Multi statement valued functions.

Scalar returns unit, variant defined the return clause. Other two types return table as a return. 

35. What is collation? 


Collation is defined as set of rules that determine how character data can be sorted and
compared. This can be used to compare A and, other language characters and also depends on
the width of the characters. 

ASCII value can be used to compare these character data. 

36. What are all different types of collation sensitivity? 

Following are different types of collation sensitivity -. 

 Case Sensitivity – A and a and B and b.


 Accent Sensitivity.
 Kana Sensitivity – Japanese Kana characters.
 Width Sensitivity – Single byte character and double byte character.

37. Advantages and Disadvantages of Stored Procedure? 

Stored procedure can be used as a modular programming – means create once, store and call
for several times whenever required. This supports faster execution instead of executing
multiple queries. This reduces network traffic and provides better security to the data. 

Disadvantage is that it can be executed only in the Database and utilizes more memory in the
database server. 

38. What is Online Transaction Processing (OLTP)? 

Online Transaction Processing (OLTP) manages transaction based applications which can be
used for data entry, data retrieval and data processing. OLTP makes data management simple
and efficient. Unlike OLAP systems goal of OLTP systems is serving real-time transactions. 

Example – Bank Transactions on a daily basis. 

39. What is CLAUSE? 

SQL clause is defined to limit the result set by providing condition to the query. This usually
filters some rows from the whole set of records. 

Example – Query that has WHERE condition 

Query that has HAVING condition. 

40. What is recursive stored procedure? 

A stored procedure which calls by itself until it reaches some boundary condition. This
recursive function or procedure helps programmers to use the same set of code any number of
times. 

41. What is Union, minus and Interact commands? 


UNION operator is used to combine the results of two tables, and it eliminates duplicate rows
from the tables. 

MINUS operator is used to return rows from the first query but not from the second query.
Matching records of first and second query and other rows from the first query will be
displayed as a result set. 

INTERSECT operator is used to return rows returned by both the queries. 

42. What is an ALIAS command? 

ALIAS name can be given to a table or column. This alias name can be referred in WHERE
clause to identify the table or column. 

Example-. 

Select st.StudentID, Ex.Result from student st, Exam as Ex where st.studentID = Ex.
StudentID

Here, st refers to alias name for student table and Ex refers to alias name for exam table. 

43. What is the difference between TRUNCATE and DROP statements? 

TRUNCATE removes all the rows from the table, and it cannot be rolled back. DROP
command removes a table from the database and operation cannot be rolled back. 

44. What are aggregate and scalar functions? 

Aggregate functions are used to evaluate mathematical calculation and return single values.
This can be calculated from the columns in a table. Scalar functions return a single value
based on the input value. 

Example -. 

Aggregate – max(), count - Calculated with respect to numeric. 

Scalar – UCASE(), NOW() – Calculated with respect to strings. 

45. How can you create an empty table from an existing table? 

Example will be -. 

Select * into studentcopy from student where 1=2

Here, we are copying student table to another table with the same structure with no rows
copied. 

46. How to fetch common records from two tables? 

Common records result set can be achieved by -. 


Select studentID from student INTERSECT Select StudentID from Exam

47. How to fetch alternate records from a table?

Records can be fetched for both Odd and Even row numbers -. 

To display even numbers-. 

Select studentId from (Select rowno, studentId from student) where mod(rowno,2)=0

To display odd numbers-. 

Select studentId from (Select rowno, studentId from student) where mod(rowno,2)=1

from (Select rowno, studentId from student) where mod(rowno,2)=1.[/sql] 

48. How to select unique records from a table? 

Select unique records from a table by using DISTINCT keyword. 

Select DISTINCT StudentID, StudentName from Student.

49. What is the command used to fetch first 5 characters of the string? 

There are many ways to fetch first 5 characters of the string -. 

Select SUBSTRING(StudentName,1,5) as studentname from student


Select LEFT(Studentname,5) as studentname from student

50. Which operator is used in query for pattern matching? 

LIKE operator is used for pattern matching, and it can be used as -. 

1. % - Matches zero or more characters.


2. _(Underscore) – Matching exactly one character.

Example -. 

Select * from Student where studentname like 'a%'


Select * from Student where studentname like 'ami_'

) What is Data Structure? Explain.

The data structure is a way that specifies how to organize and manipulate the data. It also
defines the relationship between them. Some examples of Data Structures are arrays, Linked
List, Stack, Queue, etc. Data Structures are the central part of many computer science
algorithms as they enable the programmers to handle the data in an efficient way

2) Describe the types of Data Structures?

Data Structures are mainly classified into two types:

Linear Data Structure: A data structure is called linear if all of its elements are arranged in
the sequential order. In linear data structures, the elements are stored in a non-hierarchical
way where each item has the successors and predecessors except the first and last element.

Non-Linear Data Structure: The Non-linear data structure does not form a sequence i.e.
each item or element is connected with two or more other items in a non-linear arrangement.
The data elements are not arranged in the sequential structure.

3) List the area of applications of Data Structure.

Data structures are applied extensively in the following areas of computer science:

o Compiler Design,
o Operating System,
o Database Management System,
o Statistical analysis package,
o Numerical Analysis,
o Graphics,
o Artificial Intelligence,
o Simulation

4) What is the difference between file structure and storage structure?

Difference between file structure and storage structure:

The main difference between file structure and storage structure is based on memory area that
is being accessed. 

Storage structure: It is the representation of the data structure in the computer memory. 

File structure: It is the representation of the storage structure in the auxiliary memory.
5) List the data structures which are used in RDBMS, Network Data Modal, and Hierarchical
Data Model.

o RDBMS uses Array data structure


o Network data model uses Graph
o Hierarchal data model uses Trees

6) Which data structure is used to perform recursion?

Stack data structure is used in recursion due to its last in first out nature. Operating system
maintains the stack in order to save the iteration variables at each function call 

7) What is a Stack?

Stack is an ordered list in which, insertion and deletion can be performed only at one end that
is called the top. It is a recursive data structure having pointer to its top element. The stack is
sometimes called as Last-In-First-Out (LIFO) list i.e. the element which is inserted first in the
stack will be deleted last from the stack.

8) List the area of applications where stack data structure can be used?

o Expression evaluation
o Backtracking
o Memory Management
o Function calling and return

9) What are the operations that can be performed on a stack?

o Push Operations
o Pop Operations
o Peek Operations

10) Write the stack overflow condition.

Overflow occurs when top = Maxsize -1


11) What is the difference between PUSH and POP?

PUSH and POP operations specify how data is stored and retrieved in a stack.

PUSH: PUSH specifies that data is being "inserted" into the stack.

POP: POP specifies data retrieval. It means that data is being deleted from the stack.

12) Write the steps involved in the insertion and deletion of an element in the stack.

Push:

o Increment the variable top so that it can refer to the next memory allocation 
o Copy the item to the at the array index value equal to the top
o Repeat step 1 and 2 until stack overflows

Pop:

o Store the topmost element into the an another variable


o Decrement the value of the top
o Return the topmost element

13) What is a postfix expression?

An expression in which operators follow the operands is known as postfix expression. The
main benefit of this form is that there is no need to group sub-expressions in parentheses or to
consider operator precedence.

The expression "a + b" will be represented as "ab+" in postfix notation.

14)Write the postfix form of the expression: (A + B) * (C - D) 

AB+CD-*

)15) Which notations are used in Evaluation of Arithmetic Expressions using prefix and
postfix forms?

Polish and Reverse Polish notations.


16)What is an array? 

Arrays are defined as the collection of similar types of data items stored at contiguous
memory locations. It is the simplest data structure in which each data element can be
randomly accessed by using its index number. 

17) How to reference all the elements in a one-dimension array?

It can be done by using an indexed loop such that the counter runs from 0 to the array size
minus one. In this manner, you can reference all the elements in sequence by using the loop
counter as the array subscript.

18) What is a multidimensional array?

The multidimensional array can be defined as the array of arrays in which, the data is stored
in tabular form consists of rows and columns. 2D arrays are created to implement a relational
database lookalike data structure. It provides ease of holding the bulk of data at once which
can be passed to any number of functions wherever required.

19) How are the elements of a 2D array are stored in the memory?

There are two techniques by using which, the elements of a 2D array can be stored in the
memory.

o Row-Major Order: In row-major ordering, all the rows of the 2D array are stored
into the memory contiguously. First, the 1st row of the array is stored into the
memory completely, then the 2nd row of the array is stored into the memory
completely and so on till the last row.
o Column-Major Order: In column-major ordering, all the columns of the 2D array
are stored into the memory contiguously. first, the 1st column of the array is stored
into the memory completely, then the 2nd row of the array is stored into the memory
completely and so on till the last column of the array.

20) Calculate the address of a random element present in a 2D array, given base address as
BA.

Row-Major Order: If array is declared as a[m][n] where m is the number of rows while n is
the number of columns, then address of an element a[i][j] of the array stored in row major
order is calculated as,

Address(a[i][j]) = B. A. + (i * n + j) * size 
Column-Major Order: If array is declared as a[m][n] where m is the number of rows while
n is the number of columns, then address of an element a[i][j] of the array stored in column
major order is calculated as

Address(a[i][j]) = ((j*m)+i)*Size + BA.

21) Define Linked List Data structure.

Linked List is the collection of randomly stored data objects called nodes. In Linked List,
each node is linked to its adjacent node through a pointer. A node contains two fields, i.e.
Data Field and Link Field.

22) Are linked lists considered linear or non-linear data structures?

A linked list is considered both linear and non-linear data structure depending upon the
situation.

o On the basis of data storage, it is considered as a non-linear data structure.


o On the basis of the access strategy, it is considered as a linear data-structure.
23) What are the advantages of Linked List over an array?

o The size of a linked list can be incremented at runtime which is impossible in the case
of the array.
o The List is not required to be contiguously present in the main memory, if the
contiguous space is not available, the nodes can be stored anywhere in the memory
connected through the links.
o The List is dynamically stored in the main memory and grows as per the program
demand while the array is statically stored in the main memory, size of which must be
declared at compile time.
o The number of elements in the linked list are limited to the available memory space
while the number of elements in the array is limited to the size of an array.

24) Write the syntax in C to create a node in the singly linked list.

1. struct node   
2. {  
3.     int data;   
4.     struct node *next;  
5. };  
6. struct node *head, *ptr;   
7. ptr = (struct node *)malloc(sizeof(struct node));  

25) If you are using C language to implement the heterogeneous linked list, what pointer type
should be used?

The heterogeneous linked list contains different data types, so it is not possible to use
ordinary pointers for this. For this purpose, you have to use a generic pointer type like void
pointer because the void pointer is capable of storing a pointer to any type.

26) What is doubly linked list?

The doubly linked list is a complex type of linked list in which a node contains a pointer to
the previous as well as the next node in the sequence. In a doubly linked list, a node consists
of three parts: 

o node data
o pointer to the next node in sequence (next pointer)
o pointer to the previous node (previous pointer). 

27) Write the C program to insert a node in circular singly list at the beginning.
1. #include<stdio.h>  
2. #include<stdlib.h>  
3. void beg_insert(int);  
4. struct node  
5. {  
6.     int data;  
7.     struct node *next;  
8. };  
9. struct node *head;  
10. void main ()  
11. {  
12.     int choice,item;  
13.     do   
14.     {  
15.         printf("\nEnter the item which you want to insert?\n");  
16.         scanf("%d",&item);  
17.         beg_insert(item);  
18.         printf("\nPress 0 to insert more ?\n");  
19.         scanf("%d",&choice);  
20.     }while(choice == 0);  
21. }  
22. void beg_insert(int item)    
23. {    
24.         
25.     struct node *ptr = (struct node *)malloc(sizeof(struct node));    
26.     struct node *temp;  
27.     if(ptr == NULL)    
28.     {    
29.         printf("\nOVERFLOW");    
30.     }    
31.     else     
32.     {    
33.         ptr -> data = item;    
34.         if(head == NULL)    
35.         {    
36.             head = ptr;    
37.             ptr -> next = head;    
38.         }    
39.         else     
40.         {       
41.             temp = head;    
42.             while(temp->next != head)    
43.                 temp = temp->next;    
44.             ptr->next = head;     
45.             temp -> next = ptr;     
46.             head = ptr;    
47.         }     
48.     printf("\nNode Inserted\n");  
49.     }    
50.                 
51. }    
52.       

28) Define the queue data structure.

A queue can be defined as an ordered list which enables insert operations to be performed at
one end called REAR and delete operations to be performed at another end called FRONT.

29) List some applications of queue data structure.

The Applications of the queue is given as follows:

o Queues are widely used as waiting lists for a single shared resource like a printer,
disk, CPU.
o Queues are used in the asynchronous transfer of data (where data is not being
transferred at the same rate between two processes) for eg. pipes, file IO, sockets.
o Queues are used as buffers in most of the applications like MP3 media player, CD
player, etc.
o Queues are used to maintain the playlist in media players to add and remove the songs
from the play-list.
o Queues are used in operating systems for handling interrupts.

30) What are the drawbacks of array implementation of Queue?

o Memory Wastage: The space of the array, which is used to store queue elements, can
never be reused to store the elements of that queue because the elements can only be
inserted at front end and the value of front might be so high so that, all the space
before that, can never be filled.
o Array Size: There might be situations in which, we may need to extend the queue to
insert more elements if we use an array to implement queue, It will almost be
impossible to extend the array size, therefore deciding the correct array size is always
a problem in array implementation of queue.

31) What are the scenarios in which an element can be inserted into the circular queue?

o If (rear + 1)%maxsize = front, the queue is full. In that case, overflow occurs and
therefore, insertion can not be performed in the queue.
o If rear != max - 1, the rear will be incremented to the mod(maxsize) and the new value
will be inserted at the rear end of the queue.
o If front != 0 and rear = max - 1, it means that queue is not full therefore, set the value
of rear to 0 and insert the new element there.
32) What is a dequeue?

Dequeue (also known as double-ended queue) can be defined as an ordered set of elements in
which the insertion and deletion can be performed at both the ends, i.e. front and rear.

33) What is the minimum number of queues that can be used to implement a priority queue?

Two queues are needed. One queue is used to store the data elements, and another is used for
storing priorities.

34) Define the tree data structure.

The Tree is a recursive data structure containing the set of one or more data nodes where one
node is designated as the root of the tree while the remaining nodes are called as the children
of the root. The nodes other than the root node are partitioned into the nonempty sets where
each one of them is to be called sub-tree.

35) List the types of tree.

There are six types of tree given as follows.

o General Tree
o Forests
o Binary Tree
o Binary Search Tree
o Expression Tree
o Tournament Tree

36) What are Binary trees?

A binary Tree is a special type of generic tree in which, each node can have at most two
children. Binary tree is generally partitioned into three disjoint subsets, i.e. the root of the
node, left sub-tree and Right binary sub-tree. 

37) Write the C code to perform in-order traversal on a binary tree.


1. void in-order(struct treenode *tree)  
2.     {  
3.         if(tree != NULL)  
4.         {  
5.             in-order(tree→ left);  
6.             printf("%d",tree→ root);  
7.             in-order(tree→ right);  
8.         }  
9.     }  

38) What is the maximum number of nodes in a binary tree of height k?

2k+1-1 where k >= 1

39) Which data structure suits the most in the tree construction?

Queue data structure

40) Which data structure suits the most in the tree construction?

Queue data structure

41) Write the recursive C function to count the number of nodes present in a binary tree.

1. int count (struct node* t)  
2. {  
3.     if(t)  
4.     {  
5.         int l, r;  
6.         l = count(t->left);  
7.         r=count(t->right);  
8.         return (1+l+r);  
9.     }  
10.     else   
11.     {  
12.         return 0;  
13.     }  
14. }  

42) Write a recursive C function to calculate the height of a binary tree.

1. int countHeight(struct node* t)  
2. {  
3.     int l,r;  
4.     if(!t)  
5.         return 0;  
6.     if((!(t->left)) && (!(t->right)))  
7.         return 0;  
8.     l=countHeight(t->left);  
9.     r=countHeight(t->right);  
10.     return (1+((l>r)?l:r));  
11. }         

43) How can AVL Tree be useful in all the operations as compared to Binary search tree?

AVL tree controls the height of the binary search tree by not letting it be skewed. The time
taken for all operations in a binary search tree of height h is O(h). However, it can be
extended to O(n) if the BST becomes skewed (i.e. worst case). By limiting this height to log
n, AVL tree imposes an upper bound on each operation to be O(log n) where n is the number
of nodes.

44) State the properties of B Tree.

A B tree of order m contains all the properties of an M way tree. In addition, it contains the
following properties.

o Every node in a B-Tree contains at most m children.


o Every node in a B-Tree except the root node and the leaf node contain at least m/2
children.
o The root nodes must have at least 2 nodes.
o All leaf nodes must be at the same level.

45) What are the differences between B tree and B+ tree?

S B Tree B+ Tree
N

1 Search keys cannot repeatedly be stored. Redundant search keys can be present.

2 Data can be stored in leaf nodes as well Data can only be stored on the leaf
as internal nodes nodes.

3 Searching for some data is a slower Searching is comparatively faster as


process since data can be found on data can only be found on the leaf
internal nodes as well as on the leaf nodes.
nodes.

4 Deletion of internal nodes is so Deletion will never be a complexed


complicated and time-consuming. process since element will always be
deleted from the leaf nodes.

5 Leaf nodes cannot be linked together. Leaf nodes are linked together to make
the search operations more efficient.

46) List some applications of Tree-data structure?

Applications of Tree- data structure:

o The manipulation of Arithmetic expression,


o Symbol Table construction,
o Syntax analysis
o Hierarchal data model

47) Define the graph data structure? 

A graph G can be defined as an ordered set G(V, E) where V(G) represents the set of vertices
and E(G) represents the set of edges which are used to connect these vertices. A graph can be
seen as a cyclic tree, where the vertices (Nodes) maintain any complex relationship among
them instead of having parent-child relations.

48) Differentiate among cycle, path, and circuit? 

o Path: A Path is the sequence of adjacent vertices connected by the edges with no
restrictions. 
o Cycle: A Cycle can be defined as the closed path where the initial vertex is identical
to the end vertex. Any vertex in the path can not be visited twice
o Circuit: A Circuit can be defined as the closed path where the intial vertex is
identical to the end vertex. Any vertex may be repeated.

49) Mention the data structures which are used in graph implementation.

For the graph implementation, following data structures are used. 

o In sequential representation, Adjacency matrix is used.


o In Linked representation, Adjacency list is used.
50) Which data structures are used in BFS and DFS algorithm?

o In BFS algorithm, Queue data structure is used.


o In DFS algorithm, Stack data structure is used.

51) What are the applications of Graph data structure?

The graph has the following applications:

o Graphs are used in circuit networks where points of connection are drawn as vertices
and component wires become the edges of the graph.
o Graphs are used in transport networks where stations are drawn as vertices and routes
become the edges of the graph.
o Graphs are used in maps that draw cities/states/regions as vertices and adjacency
relations as edges.
o Graphs are used in program flow analysis where procedures or modules are treated as
vertices and calls to these procedures are drawn as edges of the graph.

54) In what scenario, Binary Search can be used?

Binary Search algorithm is used to search an already sorted list. The algorithm follows divide
and conqer approach

Example: 
52) What are the advantages of Binary search over linear search?

There are relatively less number of comparisons in binary search than that in linear search. In
average case, linear search takes O(n) time to search a list of n elements while Binary search
takes O(log n) time to search a list of n elements.

53) What are the advantages of Selecetion Sort?

o It is simple and easy to implement.


o It can be used for small data sets.
o It is 60 per cent more efficient than bubble sort.
55) List Some Applications of Multilinked Structures?

o Sparse matrix,
o Index generation.

56) What is the difference between NULL and VOID?

o Null is actually a value, whereas Void is a data type identifier.


o A null variable simply indicates an empty value, whereas void is used to identify
pointers as having no initial size.

) What is an operating system?

The operating system is a software program that facilitates computer hardware to


communicate and operate with the computer software. It is the most important part of a
computer system without it computer is just like a box. 
2) What is the main purpose of an operating system?

There are two main purposes of an operating system:

o It is designed to make sure that a computer system performs well by managing its
computational activities.
o It provides an environment for the development and execution of programs. 

3) What are the different operating systems?

o Batched operating systems


o Distributed operating systems
o Timesharing operating systems
o Multi-programmed operating systems
o Real-time operating systems

4) What is a socket?

A socket is used to make connection between two applications. Endpoints of the connection
are called socket.

5) What is a real-time system?

Real-time system is used in the case when rigid-time requirements have been placed on the
operation of a processor. It contains a well defined and fixed time constraints.

6) What is kernel? 

Kernel is the core and most important part of a computer operating system which provides
basic services for all parts of the OS.

7) What is monolithic kernel?

A monolithic kernel is a kernel which includes all operating system code is in single
executable image.
8) What do you mean by a process?

An executing program is known as process. There are two types of processes:

o Operating System Processes


o User Processes

9) What are the different states of a process?

A list of different states of process:

o New Process
o Running Process
o Waiting Process
o Ready Process
o Terminated Process

10) What is the difference between micro kernel and macro kernel?

Micro kernel: micro kernel is the kernel which runs minimal performance affecting services
for operating system. In micro kernel operating system all other operations are performed by
processor.

Macro Kernel: Macro Kernel is a combination of micro and monolithic kernel.

11) What is the concept of reentrancy?

It is a very useful memory saving technique that is used for multi-programmed time sharing
systems. It provides functionality that multiple users can share a single copy of program
during the same period. 

It has two key aspects:

o The program code cannot modify itself.


o The local data for each user process must be stored separately. 

12) What is the difference between process and program?


A program while running or executing is known as a process. 

13) What is the use of paging in operating system?

Paging is used to solve the external fragmentation problem in operating system. This
technique ensures that the data you need is available as quickly as possible. 

14) What is the concept of demand paging?

Demand paging specifies that if an area of memory is not currently being used, it is swapped
to disk to make room for an application's need. 

15) What is the advantage of a multiprocessor system?

As many as processors are increased, you will get the considerable increment in throughput.
It is cost effective also because they can share resources. So, the overall reliability increases. 

16) What is virtual memory?

Virtual memory is a very useful memory management technique which enables processes to
execute outside of memory. This technique is especially used when an executing program
cannot fit in the physical memory. 

17) What is thrashing?

Thrashing is a phenomenon in virtual memory scheme when the processor spends most of its
time in swapping pages, rather than executing instructions. 

18) What are the four necessary and sufficient conditions behind the deadlock?

These are the 4 conditions:

1) Mutual Exclusion Condition: It specifies that the resources involved are non-sharable.

2) Hold and Wait Condition: It specifies that there must be a process that is holding a
resource already allocated to it while waiting for additional resource that are currently being
held by other processes. 
3) No-Preemptive Condition: Resources cannot be taken away while they are being used by
processes. 

4) Circular Wait Condition: It is an explanation of the second condition. It specifies that the
processes in the system form a circular list or a chain where each process in the chain is
waiting for a resource held by next process in the chain. 

19) What is a thread?

A thread is a basic unit of CPU utilization. It consists of a thread ID, program counter,
register set and a stack. 

20) What is FCFS?

FCFS stands for First Come, First Served. It is a type of scheduling algorithm. In this scheme,
if a process requests the CPU first, it is allocated to the CPU first. Its implementation is
managed by a FIFO queue.

21) What is SMP?

SMP stands for Symmetric MultiProcessing. It is the most common type of multiple
processor system. In SMP, each processor runs an identical copy of the operating system, and
these copies communicate with one another when required.

22) What is RAID? What are the different RAID levels?

RAID stands for Redundant Array of Independent Disks. It is used to store the same data
redundantly to improve the overall performance. 

Following are the different RAID levels:

RAID 0 - Stripped Disk Array without fault tolerance

RAID 1 - Mirroring and duplexing

RAID 2 - Memory-style error-correcting codes

RAID 3 - Bit-interleaved Parity

RAID 4 - Block-interleaved Parity

RAID 5 - Block-interleaved distributed Parity


RAID 6 - P+Q Redundancy

23) What is deadlock? Explain.

Deadlock is a specific situation or condition where two processes are waiting for each other
to complete so that they can start. But this situation causes hang for both of them.

24) Which are the necessary conditions to achieve a deadlock?

There are 4 necessary conditions to achieve a deadlock:

o Mutual Exclusion: At least one resource must be held in a non-sharable mode. If any
other process requests this resource, then that process must wait for the resource to be
released.
o Hold and Wait: A process must be simultaneously holding at least one resource and
waiting for at least one resource that is currently being held by some other process.
o No preemption: Once a process is holding a resource ( i.e. once its request has been
granted ), then that resource cannot be taken away from that process until the process
voluntarily releases it.
o Circular Wait: A set of processes { P0, P1, P2, . . ., PN } must exist such that every
P[ i ] is waiting for P[ ( i + 1 ) % ( N + 1 ) ]. 

Note: This condition implies the hold-and-wait condition, but it is easier to deal with the
conditions if the four are considered separately.

25) What is Banker's algorithm?

Banker's algorithm is used to avoid deadlock. It is the one of deadlock-avoidance method. It


is named as Banker's algorithm on the banking system where bank never allocates available
cash in such a manner that it can no longer satisfy the requirements of all of its customers. 

26) What is the difference between logical address space and physical address space?

Logical address space specifies the address that is generated by CPU. On the other hand
physical address space specifies the address that is seen by the memory unit.

27) What is fragmentation?

Fragmentation is a phenomenon of memory wastage. It reduces the capacity and performance


because space is used inefficiently.
28) How many types of fragmentation occur in Operating System?

There are two types of fragmentation:

o Internal fragmentation: It is occurred when we deal with the systems that have fixed
size allocation units. 
o External fragmentation: It is occurred when we deal with systems that have
variable-size allocation units. 

29) What is spooling?

Spooling is a process in which data is temporarily gathered to be used and executed by a


device, program or the system. It is associated with printing. When different applications
send output to the printer at the same time, spooling keeps these all jobs into a disk file and
queues them accordingly to the printer. 

30) What is the difference between internal commands and external commands?

Internal commands are the built-in part of the operating system while external commands are
the separate file programs that are stored in a separate folder or directory. 

31) What is semaphore?

Semaphore is a protected variable or abstract data type that is used to lock the resource being
used. The value of the semaphore indicates the status of a common resource.

There are two types of semaphore:

o Binary semaphores
o Counting semaphores

32) What is a binary Semaphore?

Binary semaphore takes only 0 and 1 as value and used to implement mutual exclusion and
synchronize concurrent processes. 

33) What is Belady's Anomaly?


Belady's Anomaly is 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.

34) What is starvation in Operating System?

Starvation is Resource management problem. In this problem, a waiting process does not get
the resources it needs for a long time because the resources are being allocated to other
processes.

35) What is aging in Operating System?

Aging is a technique used to avoid the starvation in resource scheduling system.

36) What are the advantages of multithreaded programming?

A list of advantages of multithreaded programming:

o Enhance the responsiveness to the users.


o Resource sharing within the process.
o Economical
o Completely utilize the multiprocessing architecture.

37) What is the difference between logical and physical address space?

Logical address specifies the address which is generated by the CPU whereas physical
address specifies to the address which is seen by the memory unit.

After fragmentation

38) What are overlays?

Overlays makes a process to be larger than the amount of memory allocated to it. It ensures
that only important instructions and data at any given time are kept in memory.
39) When does trashing occur?

Thrashing specifies an instance of high paging activity. This happens when it is spending
more time paging instead of executing.

Q1. Differentiate between a router, a hub, and a switch.


HUB SWITCH ROUTER
Connects two or more Connects two or more LAN Can connect devices or a
Ethernet devices devices LAN and WAN
Filters packets before Highly configured to filter
Does not perform filtering
forwarding them and send packets
Least intelligent, least Similar to a hub, but more
Extremely smart and complex
expensive and least complex effective
Q2. What is a link?
A link basically is the connection between two or more computers or devices. It can be
anything depending on whether it is a physical connection or a wireless one. Physical links
include cables, hubs, switches, etc and wireless links wireless access points, routers, etc.

Q3. What do you mean by a Node?


The point of intersection in a network is called a Node. Nodes can send or receive data/
information within a network. For example, if two computers are connected to form a
network, there are 2 nodes in that network. Similarly, in case there are computers, there will
be three nodes and so on. It is not necessary for a node to be a computer, it can be any
communicating device such as a printer, servers, modems, etc.

Q4. What does a backbone network mean?


In any system, backbone is the most principle component that supports all other components.
Similarly, in networking, a Backbone Network is a Network that interconnects various parts
of the network to which it belongs and has a high capacity connectivity infrastructure.
Q5. What is Network Topology?
The physical layout of the computer network is called as Network Topology. It gives the
design of how all the devices are connected in a network.

Type Description
All the devices share a common
Bus Topology
communication line
All nodes are connected to a central hub
Star Topology
device
Each node connects to exactly two other
Ring Topology
nodes
Mesh Topology Each node is connected to one or more nodes
Similar to star topology and inherits the bus
Tree Topology (Hierarchical Topology)
topology
Daisy Chain Topology All nodes are connected linearly
Nodes are connected in more than one
Hybrid Topology
topology styles
Connects two hosts such as computers,
Point-to-Point Topology
servers, etc
Q6. Explain what is LAN?
A LAN or Local Area Network the network between devices that are located within a small
physical location. It can be either wireless or wired. One LAN differs from another based on
the following factors:

 Topology: The arrangement of nodes within the network


 Protocol: Refer to the rules for the transfer of data
 Media: These devices can be connected using optic fibers, twisted-pair wires, etc

Q7. What are Routers?


A router is some device that transfers the data packets within a network. It basically performs
the traffic directing functions within a network. A data packet can be anything such as an
email, a web page, etc. Routers are located at the place where two or more networks meet or
the gateways.

Routers can either be stand-alone devices or virtual. Stand-alone routers are traditional
devices where as virtual routers are actually softwares that act like physical ones.

Q8. What is a Point-to-Point Network?


A Point-to-Point network refers to a physical connection between two nodes. It can be
between any device of a network such as a computer, printer, etc.
For example, as you can see in the above diagram, all the nodes are connected to each other
i.e Device 1 is connected to Device 2 and Device 3 , Device 2 is connected to Device 3 and
Device 1 and Device 3 is connected to Device 2 and Device 1 using physical links.

Q9. What is OSI Model?


OSI stands for Open Systems Interconnection. It is a conceptual model that standardizes
communication functions of telecommunication. It has 7 layers which are:

1. Physical Layer
2. Data Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer
Q10. Give a brief about each layer in the OSI Model.
Layer Name Protocol Description
Transfers raw bits of data over
Physical Layer Symbol
a physical link
Reliable transmission of data
frames between nodes
Data Link Layer Frame
connected by the physical
layer
Structures and manages a
network with multiple nodes
Network Layer Packet
including addressing, routing
and traffic control
Reliable Transmission of data
Transport Layer Segment, Datagram packets between the different
points of a network
Manages the communication
Session Layer Data
sessions
Transmission of data between
Presentation Layer Data the service device and the
application
Specifies the shared
Application Layer Data communication protocols and
the interface methods
To learn about Network Programming in Java and Python in detail refer to the following
blogs:

 Socket Programming in Java


 Socket Programming in Python

Q11. What do you mean by anonymous FTP?


An anonymous FTP is a way of allowing a user to access data that is public. The user does
not need to identify himself to the server and has to log in as anonymous.

So in case you are asked to use anonymous ftp, make sure you add “anonymous” in place of
your user id. Anonymous FTPs are very effective while distributing large files to a lot of
people, without having to give huge numbers of usernames and password combinations.

Q12. What is the meaning of Network?


A network is a connection between different devices. These devices communicate with each
other using physical or wireless connections. Physical connections include twisted pair
cables, optic fibers, and coaxial cables..wireless networks can be established with the help of
waves such as radio waves infrared waves and microwaves
Networks basically serve many purposes such as:

 Sharing hardware devices such as printers, input devices, etc


 Help in communications in many ways such as audios videos emails messages etc
 Help in sharing data and information using virtual devices
 They also help sharing softwares that are installed on other devices

Q13. What do you mean by a Subnet Mask?


A Subnet Mask is the number describing the range of IP addresses that can be used within a
network. They are used to assign subnetworks or subnets. These subnetworks are various
LAN’s connected to the internet.

This Subnet mask is basically a 32-bit number and it masks the IP address and then divides
the IP address into two parts i.e the network address and the host address. Subnet Masks are
created by setting all the network bits to “1” and all the host bits to “0”s. There are two
network addresses that cannot be assigned to any host on the network i.e The “0” and “255”
which are assigned to network and to the broadcast address, and this is why they cannot be
assigned to any host.

Q14. Give a brief description of the TCP/ IP Model.


The TCP/ IP Model is a compressed version of the OSI Model. This Model contains 4 layers
unlike the OSI Model which are:

1. Process(Application Layer)
2. Host-to-Host(Transport Layer)
3. Internet Layer (Network Layer)
4. Network Access(Combination of Physical and Data Link Layer)
Q15. What is the difference between the OSI Model and TCP/ IP Model?

TCP/ IP Model OSI Model


Has four layers Has seven layers
More reliable Less reliable
No strict boundaries Has strict boundaries
Horizontal Approach Vertical Approach
Q16. What is a UTP cable?

A UTP cable is a 100 ohms cable made up of copper. It consists of 2-1800 unshielded twisted
pairs that are surrounded by a non-metallic case. These twists provide immunity to electrical
noise and EMI.

Q17. What is the maximum length allowed for a UTP cable?

The maximum length allowed for a UTP cable is 100m. This includes 90 m of solid cabling
and 10m of standard patch cable.

Q18. Explain what is HTTP and which port does it use?

HTTP or HyperText Transfer Protocol allows communication over the Internet. This protocol
basically defines how messages are to be transmitted and formatted over the world wide web.
HTTP is a TCP/ IP protocol and it uses the port number 80.

Features of HTTP Protocol:

 It is connection-less
 Does not depend on the type of connecting media
 Stateless

Q19. What is NAT?


NAT stands for Network Address Translation. It deals with remapping one IP Address space
with another by changing the IP headers of the packets that are being transmitted across a
traffic routing device.

Q20. What is TCP?


TCP or Transmission Control Protocol is a connection-oriented protocol that establishes and
maintains a connection between communicating devices until both of them are done
exchanging messages. This protocol determines how application data can be broken down
into packets that can be delivered over a network. It also sends and receives packets to and
from the network layer and is in charge of flow control, etc.

Q21. Give a brief explanation about UDP?


UDP or the User Datagram Protocol is used to create a low-latency and loss-tolerating
communications between applications connected over the internet. UDP enables process-to-
process communication and communicates via datagrams or messages.

Q22. Differentiate between TCP and UDP.


Factor of comparison TCP UDP
Connection made before Connection not made before
Connection application messages are application messages are
exchanged exchanged
For applications needing For applications needing
Use more reliability and less more speedy and less
speed reliability
Use by Protocols of
File transfer, e-mail, etc Multimedia, DNS
the Application Layer
No guarantee that the
Messages will be delivered
Reliability messages will be delivered in
in order and without errors
order and without errors
All segments are
Data segments rearranged in
Data Segments independent, therefore has no
required order
inherent order specification
Acknowledgment ACK is received ACK is not received
Has the congestion control
Flow Control No flow control option
mechanism
Check for Errors Resends erroneous segments Discards Erroneous segments
Q23. What is RIP?
RIP (Routing Information Protocol) is a dynamic routing protocol. It makes use of hop count
as its primary metric to find the best path between the source and the destination. It works in
the application layer and has an AD (Administrative Distance) value of 120.

Q24. Explain what is a firewall?


A firewall is a network security system which is used to monitor and control the network
traffic based on some predefined rules. Firewalls are the first line of defense and establish
barriers between the internal and external networks in order to avoid attack from untrusted
external networks. Firewalls can be either hardware, software or sometimes both.
Q25. Explain what is NOS?
A Network Operating System (NOS) is an Operating System that is designed to support
workstations, databases, personal computers, etc over a network. Some examples of NOS are
MAC OS X, Linux, Windows Server 2008, etc. These Operating Systems provide various
functionalities such as processor support, multiprocessing support, authentication, Web
services, etc.

Q26. Explain what is Denial of Service (DoS)?


Denial of Service (DoS) is a kind of attack that prevents a legitimate user from accessing data
over a network by a hacker or an attacker. The attacker floods the server with unnecessary
requests in order to overload the server thereby preventing the legitimate users from
accessing its services.

Q27. What is the full form of ASCII?


ASCII stands for American Standard Code for Information Interchange. It is a character
encoding standard used in the electronic communication field. The ASCII codes basically
represent text.

Q28. What is IEEE?


IEEE stands for Institute of Electrical and Electronics Engineer. It is the world’s largest
technical professional society and is devoted to advancing innovation and technological
excellence.

Q29. What is a MAC address and why is it required?


MAC or Media Access Control address is a computer’s unique number assigned to a Network
Interface Controller (NIC). It is a 48-bit number that identifies each device on a network and
is also referred to as the physical address. MAC addresses are used as a network address for
communications within a network such as an Ethernet, Wi-Fi, etc.

Q30. What is piggybacking?


During transmission of data packets in two-way communication, the receiver sends an
acknowledgment (control frame or ACK) to the receiver after receiving the data packets.
However, the receiver does not send the acknowledgment immediately, but, waits until its
network layer passes in the next data packet. Then, the ACK is attached to the outgoing data
frame. This process of delaying the ACK and attaching it to the next outgoing data frame is
known as piggybacking.

Q31. Explain what is DNS?


DNS or Domain Name System is a naming system for devices connected over the internet. It
is a hierarchical and decentralized system that translates domain names to the numerical IP
Addresses which is required to identify and locate devices based on the underlying protocols.

All devices connected to the internet have unique IP addresses which are used to locate them
on the network. The process involves conversion on hostnames into IP addresses. For
example, in case the user wants to load some web page (xyz.com), this hostname is converted
into an IP address that can be understood by the computer in order to load that web page.

Q32. Differentiate between Domain and a Workgroup.


Domain Workgroup
Has one or more computer acting as a server All computers are peers
Has a centralized database Each computer has its own database
Computers can be on different LANs All computers are on the same LAN
Q33. What is OSPF?
OSPF stands for Open Shortest Path First. It is basically a routing protocol that is used to find
the best path for packets that are being transmitted over interconnected networks.

Q34. What is Round Trip Time?


Round Trip Time or Round Trip Delay Time refers to the time taken for a signal to be sent
and the ACK of that signal to be received.

Q35. What is DHCP?


DHCP or Dynamic Host Configuration Protocol is a network management protocol. It is used
on the UDP/IP networks and it automatically assigns IP addresses to the devices on the
network. This, in turn, reduces the need of a network admin to manually assign IP addresses
thereby reducing errors.

Q36. Briefly explain what is ICMP?


ICMP stands for Internet Control Message Protocol and is a part of the Internet Protocol
Suite. It is basically a supporting protocol to the Internet protocol and is used to send error
messages and information regarding the success or failure of communication with another IP
address. For example, if a service is not available an error is reported.

Q37. What is a Ping?


A ping is a computer program that is used to test the reachability of a host and check if can
accept requests on an IP network. It works by sending an ICMP (Internet Control Message
Protocol) Echo to some computer on the network and waits for a reply from it. It can also be
used for troubleshooting.

Q38. What are the advantages of optic fibers?


Optic fibers have a number of advantages such as:

 Greater bandwidth than other metal cables


 Low power loss allows longer transmission distances
 Optic cables are immune to electromagnetic interference
 Lesser production rates
 Thin and light
 The optical fiber cable is difficult to tap

Q39. What is a client/ server network?


A client/ server network is a network where one computer behaves as a server to the other
computers. The server is usually more powerful than the clients and serves the clients.

Q40.  In a network that contains two servers and twenty workstations, where is the best place
to install an Anti-virus program?
The best solution is to install anti-virus on all the computers in the network. This will protect
each device from the other in case some malicious user tries to insert a virus into the servers
or legitimate users.

Q41. What do you mean by Ethernet?


Ethernet is a network technology used in LAN, MAN and WAN that connects devices using
cables for the transmission of data. It provides services on the Physical and Data Link layers
of the OSI Model.

Q42.What is SLIP?
SLIP stands for Serial Line Internet Protocol which allows a user to access the internet using
the modem.

Q43. What is the difference between CSMA/CD and CSMA/CA?


CSMA/ CD CSMA/ CA
The effect is after a collision The effect is before a collision
Minimizes the recovery time Reduces the possibility of a collision
Usually used in wired networks Usually used in wireless networks
Q44. Briefly explain what is tunnel mode?
Tunnel mode is used to encrypt the whole IP packet including the headers and the payload. It
is basically used in a Site-to-Site VPN to secure communications between security gateways,
firewalls, etc.

Q45. What do you mean by IPv6?


IPv6 stands for Internet Protocol version 6 and is the latest version of the Intenet Protocol.
The IP address length is 128 bits which resolves the issue of approaching shortage of network
addresses.

Q46. Explain the RSA algorithm briefly.


RSA is a cryptosystem used to secure data transmission named after Ron Rivest, Adi Shamir
and Len Adleman. This algorithm has a public key for encryption while the decryption key is
kept secure or private. The encryption key is created using two large prime numbers and is
published along with an auxiliary value. Anybody can make use of this public key for
encryption but only someone with the knowledge of the prime numbers can decrypt it.
However, this algorithm is considered to be slow and for the same reason, it is not used very
often to encrypt data.

Q47. What is an encoder?


An encoder is a program, circuit or a device that converts data from one format to another.
Encoders convert analog signals into digital ones.

Q48. What is a decoder?


A decoder is a program, circuit or a device that converts the encoded data into its actual
format. Decoders convert digital signals to analog ones.

Q49. What is sneakernet?


Sneakernet is the unofficial term for the transfer of electronic information by physically
moving media which can be anything such as a Floppy disk, USB flash, optical disks, etc.

Q50. What are the components of a Protocol? 


Protocols are a set of rules that govern communication. The key elements of a Protocol are as
follows:

Name Description
Syntax Refers to the structure and format of data
Semantics Refers to the meaning of each portion of bits
Refers to when data should be sent and
Timing
received

All projects are broadly divided into two types of applications 2 tier and 3 tier
architecture. Basically high level we can say that 2-tier architecture is Client server
application and 3-tier architecture is Web based application. Below I am concentrating on the
difference between Two-Tier and Three-Tier Architecture, what all advantages,
disadvantages and practical examples.
Two-Tier Architecture:

The two-tier is based on Client Server architecture. The two-tier architecture is like client
server application. The direct communication takes place between client and server. There is
no intermediate between client and server. Because of tight coupling a 2 tiered application
will run faster.

Two-
Tier Architecture
The above figure shows the architecture of two-tier. Here the direct communication between
client and server, there is no intermediate between client and server.

Let’s take a look of real life example of Railway Reservation two-tier architecture:

Let’s consider that first Person is making Railway Reservation for Mumbai to Delhi by
Mumbai Express at Counter No. 1 and at same time second Person is also try to make
Railway reservation of Mumbai to Delhi from Counter No. 2

If staff from Counter No. 1 is searching for availability into system & at the same staff from
Counter No. 2 is also looking for availability of ticket for same day then in this case there is
might be good change of confusion and chaos occurs. There might be chance of lock the
Railway reservation that reserves the first.

But reservations can be making anywhere from the India, then how it is handled?
So here if there is difference of micro seconds for making reservation by staff from Counter
No. 1 & 2 then second request is added into queue. So in this case the Staff is entering data to
Client Application and reservation request is sent to the database. The database sends back
the information/data to the client.

In this application the Staff user is an end user who is using Railway reservation application
software. He gives inputs to the application software and it sends requests to Server. So here
both Database and Server are incorporated with each other, so this technology is called as
“Client-Server Technology“.
The Two-tier architecture is divided into two parts:

1) Client Application (Client Tier)


2) Database (Data Tier)
On client application side the code is written for saving the data in the SQL server
database. Client sends the request to server and it process the request & send back with data.
The main problem of two tier architecture is the server cannot respond multiple request same
time, as a result it cause a data integrity issue.

Advantages:
1. Easy to maintain and modification is bit easy
2. Communication is faster
Disadvantages:

1. In two tier architecture application performance will be degrade upon increasing the
users.
2. Cost-ineffective
Three-Tier Architecture:

Three-tier architecture typically comprise a presentation tier, a business or data access tier,


and a data tier. Three layers in the three tier architecture are as follows:
1) Client layer
2) Business layer
3) Data layer
1) Client layer: 
It is also called as Presentation layer which contains UI part of our application. This layer is
used for the design purpose where data is presented to the user or input is taken from the user.
For example designing registration form which contains text box, label, button etc.

2) Business layer: 
In this layer all business logic written like validation of data, calculations, data insertion etc.
This acts as a interface between Client layer and Data Access Layer. This layer is also called
the intermediary layer helps to make communication faster between client and data layer.

3) Data layer:
In this layer actual database is comes in the picture. Data Access Layer contains methods to
connect with database and to perform insert, update, delete, get data from database based on
our input data.
Three-tier Architecture
Advantages

1. High performance, lightweight persistent objects


2. Scalability – Each tier can scale horizontally
3. Performance – Because the Presentation tier can cache requests, network utilization is
minimized, and the load is reduced on the Application and Data tiers.
4. High degree of flexibility in deployment platform and configuration
5. Better Re-use
6. Improve Data Integrity
7. Improved Security – Client is not direct access to database.
8. Easy to maintain and modification is bit easy, won’t affect other modules
9. In three tier architecture application performance is good.
Disadvantages

1. Increase Complexity/Effort

1. Question 1. What Is Sdlc?


Answer :
SDLC stands for Software Development Life Cycle. A Software Development Life Cycle
is essentially a series of steps, or phases, that provide a model for the development and
lifecycle management of an application or piece of software.
In other words, it is a conceptual model used in project management that describes the
stages involved in an information system development project, from an initial feasibility
study through maintenance of the completed application.
2. Question 2. What Is The Purpose Of Sdlc?
Answer :
SDLC is required in order to have a systematic, planned approach to build a software
application for the client.
3. Question 3. What Are The Phases Of Sdlc?
Answer :
o Requirement gathering and analysis
o Design
o Implementation or coding
o Testing
o Deployment
o Maintenance
4. Question 4. What Are The Models In Sdlc?
Answer :
o Waterfall model
o V model
o Incremental model
o Rapid Application Development(RAD) model
o Agile model
o Iterative model
o Spiral model
o Big-bang Model
o Prototype Model
o Capability Maturity Model
5. Question 5. What Is Requirement Gathering Phase?
Answer :
The project requirements are analyzed in terms of input data and desired output,
processing required to transform input into output, cost-benefit analysis, and schedule of
the project. It also includes gathering, analyzing, validating, and specifying requirements.
6. Question 6. What Is Srs?
Answer :
SRS or Software Requirement Specification is a document produced at the time of
requirement gathering process. It can be also seen as a process of refining requirements
and documenting them.
SRS is a formal document that acts as a written agreement between the development team
and the customer. SRS acts as input to the design phase and includes functional,
performance, software, hardware, and network requirements of the project.
7. Question 7. What Is Feasibility Study?
Answer :
It is a measure to assess how practical and beneficial the software project development
will be for an organization. The software analyzer conducts a thorough study to
understand economic, technical and operational feasibility of the project.
8. Question 8. What Is The Difference Between Crs And Srs?
Answer :
o The CRS is a brief document prepared by the business analyst and might
contains many contradicting data, duplicates, missing information.
o The SRS is a base lined and final document that is well organized and clear in
terms of understanding which is used as reference by the test engineers.
9. Question 9. What Is The Difference Between Fs Document And Srs Document?
Answer :
o FS document contains the constraints and limitations that are specified by the
client and that must be implemented into the application. SRS document
contains the requirements of the application.
o FS document is prepared by the business analyst and the developer together.
SRS document is prepared by the Business Analyst only.
10. Question 10. What Is Design Phase?
Answer :
The requirements specified in the SRS document is translated into a logical structure that
can be implemented in a programming language. System Design helps in specifying
hardware, system requirements and in defining overall system architecture. The output of
the design phase is a design document that acts as an input for all the subsequent SDLC
phases.
11. Question 11. What Is Coding Phase?
Answer :
The design specified in the design document is implemented into executable programming
language code. The output of the coding phase is the source code for the software that acts
as input to the testing and maintenance phase. This is the longest phase of the software
development life cycle.
12. Question 12. What Is Testing Phase?
Answer :
In testing phase, the code developed is tested against the design document to make sure
that the product is actually solving the needs addressed and gathered during the
requirements phase. During this phase unit testing, integration testing, system testing,
acceptance testing are done.
13. Question 13. What Is Deployment Phase?
Answer :
The Deployment phase is nothing but the product is delivered / deployed to the customer
for their use after the successful testing.
14. Question 14. What Is Maintenance Phase?
Answer :
The Maintenance phase includes implementation of changes that software might undergo
over a period of time, or implementation of new requirements after the software is
deployed at the customer location. The maintenance phase also includes handling the
residual errors that may exist in the software even after the testing phase.
15. Question 15. What Is Meant By Waterfall Model?
Answer :
The Waterfall model is a sequential design process, used in software development
processes and it is the first process model introduced. It is also known as Classic Life
Cycle Model (or) Linear Sequential Model.
In a waterfall model, each phase must be completed fully before the next phase can begin.
This type of model is basically used for the project which is small and there are no
uncertain requirements. It is very simple to understand and use.
16. Question 16. What Is Meant By V Model?
Answer :
V- Model means Verification and Validation model and it is a modified version of the
Waterfall method. In V-Model developer and tester works parallel. The V-Model
demonstrates the relationships between each phase of the development life cycle and its
associated phase of testing.
17. Question 17. What Is Meant By Incremental Model?
Answer :
The incremental model is an intuitive approach to the waterfall model. Multiple
development cycles take place here, making the life cycle a “multi-waterfall” cycle.
Cycles are divided up into smaller, more easily managed iterations. Each iteration passes
through the requirements, design, implementation and testing phases.
18. Question 18. What Is Meant By Rad Model?
Answer :
RAD (rapid application development) is a concept that products can be developed
faster and of higher quality through:
o Requirements using workshops or focus groups
o Prototyping and early, reiterative user testing of designs
o The re-use of software components
o A rigidly paced schedule that defers design improvements to the next product
version
o Less formality in reviews and other team communication.
19. Question 19. What Is Meant By Agile Model?
Answer :
In agile model, the product or solution is first divided into features which need to be
developed. If there are new features identified in the midst of complete product release it
again gets planned across sprints. Agile Sprint duration is decided based on feature to be
developed. Every sprint goes through the phases of Requirement, Design, Development
and Testing phase. The most important of the principles is customer satisfaction by giving
rapid and continuous delivery of small and useful software.
20. Question 20. What Is Meant By Iterative Model?
Answer :
An iterative life cycle model does not attempt to start with a full specification of
requirements. Instead, development begins by specifying and implementing just part of the
software, which can then be reviewed in order to identify further requirements. This
process is then repeated, producing a new version of the software for each cycle of the
model.
21. Question 21. What Is Meant By Spiral Model?
Answer :
The spiral model is similar to the incremental model, but incorporates risk analysis. The
spiral model has four phases: Planning, Risk Analysis, Engineering and Evaluation. A
software project repeatedly passes through these phases in iterations (called Spirals in this
model). The baseline spiral, starting in the planning phase, requirements are gathered and
risk is assessed. Each subsequent spiral builds on the baseline spiral. Requirements are
gathered during the planning phase.
This model of development combines the features of the prototyping model and the
waterfall model. The spiral model is intended for large, expensive, and complicated
projects.
22. Question 22. What Is Meant By Big Bang Model?
Answer :
The Big Bang model follows no specific process, and very little time is spent on planning.
Even the customer is not sure about what exactly they want and the requirements are
implemented on the fly without much analysis. This is typically used for small projects
and not recommended for large or complex projects, as it’s a high-risk model; if the
requirements are misunderstood in the beginning, you could get to the end and realize the
project may have to be started all over again.
23. Question 23. What Is Meant By Prototype Model?
Answer :
A prototype is a model or a program which is not based on strict planning, but is an early
approximation of the final product or software system. A prototype acts as a sample to test
the process.
A prototype model focuses on developing the software little by little and tested in a real
time environment with the customers in mind.
24. Question 24. What Is Meant By Capability Maturity Model?
Answer :
Capability Maturity Model is a bench-mark for measuring the maturity of an
organization’s software process. It is a methodology used to develop and refine an
organization’s software development process. CMM can be used to assess an organization
against a scale of five process maturity levels based on certain Key Process Areas (KPA).
It describes the maturity of the company based upon the project the company is dealing
with and the clients. Each level ranks the organization according to its standardization of
processes in the subject area being assessed.
25. Question 25. What Are The Maturity Levels In Cmm?
Answer :
o Initial
o Managed
o Defined
o Quantitatively Managed
o Optimizing
26. Question 26. What Are The Types Of Prototype Models?
Answer :
o The Patch-Up Prototype
o Nonoperational Prototype
o First-of-a-Series Prototype
o Selected Features Prototype
27. Question 27. What Are The Advantages And Disadvantages Of Waterfall Model?
Answer :
Advantages:
o This model is simple and easy to understand and use.
o It is easy to manage due to the rigidity of the model – each phase has specific
deliverables and a review process.
o In this model phases are processed and completed one at a time. Phases do not
overlap.
o Waterfall model works well for smaller projects where requirements are very
well understood.
o It allows for departmentalization and managerial control.
o As its linear model, it’s easy to implement.
Disadvantages:
o Software is delivered late in project, delays discovery of serious errors.
o Difficult to integrate risk management.
o Difficult and expensive to make changes to documents “swimming upstream”.
o Significant administrative overhead, costly for small teams and projects.
o If client want the requirement to be changed, it will not implemented in the
current development process.
28. Question 28. What Are The Advantages And Disadvantages Of V Model?
Answer :
Advantages:
o Simple and easy to use.
o Each phase has specific deliverables.
o Higher chance of success over the waterfall model due to the early development
of test plans during the life cycle.
o Works well for small projects where requirements are easily understood.
o Avoids the downward flow of the defects.
Disadvantages:
o Very rigid and least flexible.
o Software is developed during the implementation phase, so no early prototypes
of the software are produced.
o If any changes happen in midway, then the test documents along with
requirement documents has to be updated.
29. Question 29. What Are The Advantages And Disadvantages Of Incremental Model?
Answer :
Advantages:
o More flexible when adding or changing requirements.
o Easier to test and debug.
o Lowers initial delivery cost.
o Easier to manage risk because risky pieces are identified and handled during its
iteration.
o Generates working software quickly and early during the software life cycle.
Disadvantages:
o Each phase of an iteration is rigid and do not overlap each other.
o Problems may arise pertaining to system architecture because not all
requirements are gathered up front for the entire software life cycle.
o Needs good planning and design.
o Needs a clear and complete definition of the whole system before it can be
broken down and built incrementally.
30. Question 30. What Are The Advantages And Disadvantages Of Rad Model?
Answer :
Advantages:
o Reduces the development time and reusability of components help to speed up
development. 
o Easy to work if all functions are modularized.
o Quick initial reviews occur.
o Encourages customer feedback.
o Integration from very beginning solves a lot of integration issues.
Disadvantages:
o Only system that can be modularized can be built using RAD.
o Requires highly skilled developers/designers.
o High dependency on modeling skills.
o Inapplicable to cheaper projects as cost of modeling and automated code
generation is very high.
31. Question 31. What Is Prototype Model?
Answer :
It begins with requirements gathering. Developers and Customers meet and define the
overall objectives of the software.
Developers prepare design documents using all available requirements then build the
prototypes, prototypes are sent to Customer, and Customer evaluates Prototypes and gives
feedback. Developers redefine Requirements, modify software design and produce
modified Prototypes. Process will be continued like this, after getting Customer’s
confirmation Developers Start Regular process; Software Design, Coding
(Implementation), Testing and Release &amp; Maintenance.
The Objective of this approach is getting clear (Complete and Correct) Requirements from
Customers in order to avoid Defects multiplication.
32. Question 32. What Are The Disadvantages Of Prototype Model?
Answer :
o It is an expensive approach and time taking process when its compare to
sequential models like Waterfall model.
o Customer could believe the prototype as the working version.
o Developer also could make the implementation compromises.
o Once Requirements finalized then adopting changes in Requirements and
adding New Requirements are difficult.
33. Question 33. What Is Scrum Methodology In Agile Software Development?
Answer :
There are different methodologies, which are a part of the agile model. The most famous
one is scrum methodology. Like all the other agile computer programming, scrum is also
an iterative and incremental methodology. This methodology is different than the other
methodologies because, the idea of empirical process control was introduced in this
process. As a matter of fact, scrum was introduced for software project management.
However, it was eventually also used for software maintenance.
The best part of the scrum methodology is that it makes use of real world progress of a
project, which is used for planning and scheduling releases. The entire computer software
project is divided into small parts known as sprints. 
The duration of sprint can range from one week to three weeks. At the end of the duration
of the sprint, the team members along with the stakeholders meet. This meeting helps in
assessing the progress of the project and chalk out the further plan of action. This
assessment helps in taking stalk of the current state of affairs and rework the line of work
and complete the project on time and not just speculate or predict the further outcome.
34. Question 34. What Spiral Model?
Answer :
The Spiral Life Cycle Model is a type of iterative software development model which is
generally implemented in high risk projects.
It was first proposed by Boehm. In this system development method, we combine the
features of both, waterfall model and prototype model. In Spiral model we can arrange all
the activities in the form of a spiral.
35. Question 35. What Is Requirements Gathering Phase In Sdlc,explain It?
Answer :
This is an initial stage in SDLC; in this stage business analyst category people gather
requirements from the customer and document them, the document called BRS (Business
requirements specification) or CRS (customer requirements specification) or URS (user
requirements specification) or PRD (product requirements specification) or BDD
(business design document)
NOTE:
o Document name may vary from one company to another but process is same
o In software application development BA category people gather requirements
from a specific customer
o In software product development BA category people gather requirements from
model customers in the market
36. Question 36. What Is Brs In Software Development?
Answer :
BRS is Business Requirement Specification which means the client who want to make the
application gives the specification to software development organization and then the
organization convert it to SRS (Software requirement Specification) as per the need of the
software.
37. Question 37. What Is Srs In Software Development?
Answer :
o Software Requirements Specification (SRS) is a perfect detailed description of
the behavior of the system to be developed.
o SRS document is an agreement between the developer and the customer
covering the functional and non functional requirements of the software to be
developed.
o SRS document consists of 2 sub documents:
o System Requirements Specification
o Functional Requirements Specification
o SRS can be derived from BRS Document and it is technical document.
38. Question 38. What Is Hld Or Global Design?
Answer :
High Level Design gives the overall System Design in terms of Functional Architecture
and Database design. It designs the over all architecture of the entire system from main
module to all sub module.
39. Question 39. What Is Lld Or Detailed Design?
Answer :
Low Level Design the view of the application developed during the high level design is
broken down into modules and programs. Logic design is done for every program and
then documented as program specifications. For every program, a unit test plan is created.
40. Question 40. Explain About The Software Release Process?
Answer :
PM (Project Manager) forms Release Team, Release team consists of a few developers,
testers,project management executive, and system administrator Release Team goes to
customer place and deploys software.
Release Team provides some training to the customer site people (if required)
41. Question 41. Explain About The Software Maintenance Process?
Answer :
PM (Project Manager) forms Maintenance Team, Maintenance team consists ofa few
developers, testers, and project management executive CCB receives customer change
requests and perform required changes Maintenance(3 types)
o Modifications 
o Corrective changes
o Enhancements
o Migration Migrating from old technology to new technology
(ex: windows 98 to Vista/windows 7)
Ms Access to SQL Server/Oracle)
o Retirement Retiring the Old system and developing New system
(Ex: IItier application to web application)
42. Question 42. What Is Stlc?
Answer :
The process of testing software in a well planned and systematic way is known as software
testing life cycle(STLC).
Different organizations have different phases in STLC however generic
Software Test Life Cycle (STLC) consists of the following phases:
o Test Planning
o Test Design
o Test Execution
o Evaluating the Exit criteria
o Test Closure
43. Question 43. What Is The Difference Between Sdlc And Stlc?
Answer :
Software Development Life Cycle involves the complete Verification and Validation of a
Process or a Project.
Whereas Software Testing Life Cycle involves only Validation. Software Development
Life Cycle involves business requirement specifications, Analysis, Design,Software
requirement specifications, Development Process(Coding and Application development),
Testing Process(Preparation of Test Plan,Preparation of Test
cases,Testing,Bug reporting,Test Logs &amp; Test Reports), Release and Maintenance.
Whereas Software Testing Life Cycle involves Preparation of Test Plan, Preparation of
Test cases,Test execution ,Bug reporting &amp; Tracking, Re &amp; Regression Testing
and Test Closure.
STLC is a Part of SDLC.
KEY DIFFERENCE between c++ and c#:

 C++ is a low level programming language that adds object-oriented features to its
base language C whereas C# is a high level language.
 C++ compiles down to machine code whereas C# 'compiles' down to CLR (Common
Language Runtime), which is interpreted by JIT in ASP.NET.
 C++ is an object-oriented language while C# is considered a component-oriented
programming language.
 In C++ you need to manage memory manually whereas C# runs in a virtual machine,
which performs memory management automatically.
 In C++ development should follow any specific architecture and must be portable
whereas C# development should be simple, modem, general-purpose, object-oriented
programming language.

You might also like