KyaPoocha.com

Huge Collection of Interview Questions


‘Data Structure Interview Questions’ - KyaPoocha.com

What is the difference between declaration and definition? 

DECLARATION : declaration only creates the variable name and nothing exists against it. i.e no memory space is consumed. eg. extern a; DEFINITION : definition declares... Read more »

What is the use of fflush() function? 

Suppose we read a sentence using scanf e.g. “My name is ABC” in a string. Printing this string using a printf statement prints “My”. Go for... Read more »

Without using /,% and * operators. write a function to divide a number by 3? 

#include #include void main() { int i,n; float j=0; clrscr(); printf(”enter the no”); scanf(”%d”,&n); for(i=n;i>2;i=i-3) { j=j+1; if(i==4) { j=j+1.333333; } if(i==5) { j=j+1.666666; } } printf(”%f”,j); getch(); }  Read more »

What does it mean when a data structure is declared volatile? What does it mean when a data structure is declared Const? 

Volatile - you are asking compiler to not to optimise the data structure as well as to reload to CPU registers whenever it is in use. Not a good idea for Data structure,... Read more »

Explain how performance of algorithm is analysed? 

The performance of an algorithm is analysed by the time complexity as well as its space complexity though both the complexities are trafe-offs between them. If time... Read more »

Is it possible to implement trees using arrays ? If yes, how? 

Yes, it is possible. Here is an example of implementing a binary tree: Consider an attay : a[n]; Place the root in first position. and let the current position to... Read more »

What is a void pointer? 

a pointer with no return type is called a null pointer.It may be any kind of datatype.It takes the data type according to the requirement in the program. for eg: ... Read more »

What is the difference between function templates and function overloading? 

Function templates involve telling a function that it will be receiving a specified data type and then it will work with that at compile time. The difference with... Read more »

Explain what are linear data structure & non-linear data structure? 

A data structure is classified into two categories: Linear and Non-Linear data structures. A data structure is said to be linear if the elements form a sequence,... Read more »

Difference between calloc and malloc? 

malloc: allocate n bytes calloc: allocate m times n bytes initialized to 0  Read more »

What are the major data structures used in the following areas : RDBMS, Network data model & Hierarchical data model. 

1. RDBMS– Array (i.e. Array of structures) 2. Network data model– Graph 3. Hierarchical data model– Trees.  Read more »

Which file contains the definition of member functions? 

Definitions of member functions for the Linked List class are contained in the LinkedList.cpp file.  Read more »

How is any Data Structure application is classified among files? 

A linked list application can be organized into a header file, source file and main application file. The first file is the header file that contains the definition... Read more »

What member function places a new node at the end of the linked list? 

The appendNode() member function places a new node at the end of the linked list. The appendNode() requires an integer representing the current data of the node.  Read more »

What is Linked List ? 

Linked List is one of the fundamental data structures. It consists of a sequence of nodes, each containing arbitrary data fields and one or two (”links”)... Read more »

Page 1 of 512345»