STACKS AND QUEUES

Stacks and Queues are the most important chapters in Data Structure.                               Stack & Queue : Stacks: A stacks is an abstract data type. Which declares two methods PUSH and POP.? Stacks are implemented either by an array or by a linked list. The PUSH operation allows us to insert data at the end of …

Read more

BASICS OF DATA STRUCTURE

Data (plural of “datum”), refers to qualitative or quantitative attributes of a variable or set of variables. Typically, data are the results of measurements and can be the basis of graphs, images or observations a set of variables. Metadata is a data containing the description of other data. Earlier term for metadata is ancillary data. …

Read more

C Pointers With Examples

Pointers are special variables that are used to store addresses rather than values. Assigning addresses to Pointers : Here, the address of c is assigned to the pc pointer. To get the value stored in that address, here used *pc. Example: Output : Explanation of the program: pc = &c; This assigns the address of variable c to the pointer pc. *pc = …

Read more

File Handling in C

C programs are done on a terminal that is not stored anywhere. In the software industry, most programs are written to store the information fetched from the program. One such way is to store the fetched information in a file. Why files are needed? If you have to enter a large number of data, it …

Read more

Quick Sort in C

Explain the algorithm for QUICK sort ( partition exchange sort) and give a suitable example. Quick sort is based on partition. It is also known as partition exchange sorting. The basic concept of quick sort process is pick one element from an array and rearranges the remaining elements around it. This element divides the main …

Read more

SORTING IN C PROGRAMING

Explain in detail about sorting and different types of sorting techniquesSorting is a technique to rearrange the elements of a list in ascending or descending order, which can be numerical, lexicographical, or any user-defined order. Sorting is a process through which the data is arranged in ascending or descending order. Sorting can be classified in …

Read more

Searching in C Programming

Searching is the process of finding element in a given list. In this process we check item is available in given list or not. Type of searching Internal search External search Internal Search: In this search, Searching is performed on main or primary memory.External Search: In this search, Searching is performed in secondary memory. There …

Read more

Strings in C

Strings are defined as an array of characters. The difference between a character array and a string is the string is terminated with a special character ‘\0’( NULL character ). String is a one dimensional array of character. We can initialize the string as char name[]={‘r’,’a’,’j’,’u’,’\0’}; Here each character occupies 1 byte of memory and …

Read more

Array In C Program:

Introduction To Arrays:In C programming, one of the frequently problem is to handle similar types of data. For example: if the user wants to store marks of 500 students, this can be done by creating 500 variables individually but, this is rather tedious and impracticable. These types of problem can be handled in C programming …

Read more

C Recursion

The process in which a function calls itself directly or indirectly is called recursion and the corresponding function is called as recursive function. Using recursive algorithm, certain problems can be solved quite easily. WAP in C to Calculate the factorial of a number using recursion Output WAP in C to GCD of Two Numbers using …

Read more