Sie sind auf Seite 1von 4

POINTS TO REMEMBER C is a general purpose structured programming language developed by Dennis Ritchie at AT & Ts Bell Laboratories at USA in 1972.

C is a middle level language, it supports both the low level language and high level language features. The switch statement is used to pickup or executes a particular group of statement from several available groups of statements. A segment of a program that is executed repeatedly is called loop. While loop is the top tested loop and do while is bottom tested loop. An array is a collection of similar data items that are stored under a common name. The collection of data item can be stored under a variable name using only one subscript such variable is called one dimensional array The two dimensional array are stored in a row-column matrix, where the left index indicates the row and the right indicates the column. A string is a collection of characters. A string constant is a one dimensional array of characters terminated by a null (\0) character. Linear search and Binary search are the methods of searching the element from arrays. Bubble sort, Insertion sort, Selection sort, Merge sort, Heap sort, Quick sort are the method sorting the element. A function is a set of instructions that performs a specified task, which repeatedly occurs in the main program. Functions are very helpful to break down a large program into a number of smaller functions. Function definition, function declaration, and function call are the three elements of user defined function. Local and global variables are the two types of variables. The local variables are defined within the body of the function, global variables are declared outside of the main() function. Call by value method copies the value of actual parameters into the formal parameter of the function. Recursion is the process of calling the same function itself again and again until some condition is specified.

A structure contains one or more data items of different data type in which the individual elements can differ in type. Structure is a collection of dissimilar data items. The structure variables can only initialized at compile time only. A pointer is a variable, it contains the memory address of another variable. Pointer seems to be complex but it is simple when it compared to its advantages. Dynamic memory allocation means a program can obtain its memory while it is running. The malloc() function allocates a block of memory of specified size and return a pointer of void type. The free() function is used to release the previously allocated memory space. Debugging is the process of finding and eliminating the errors in the program. DATA STRUCTURE What is Data Structure? A data structure is a systematic way of organizing and accessing data. Linear Data Structures : A data structure is said to be linear if its elements form a sequence or a linear list. Examples:

Array Linked List Stacks Queues

Operations on linear Data Structures


Traversal : Visit every part of the data structure Search : Traversal through the data structure for a given element Insertion : Adding new elements to the data structure Deletion : Removing an element from the data structure. Sorting : Rearranging the elements in some type of order(e.g Increasing or Decreasing) Merging : Combining two similar data structures into one

Abstract Data Type Abstract Data Types (ADT's) are a model used to understand the design of a data structure Link List It consists of a sequence of nodes, each containing arbitrary data fields and one or two references ("links") pointing to the next and/or previous nodes. Stack A stack is a list of elements in which an elements may be inserted or deleted only at one end, called the Top. The stack also called "last-in first -out (LIFO) " list. 1. "Push" is the term used to insert an element into a stack. 2. "Pop" is the term used to delete an element from a stack. Applications Of Stacks: Queue A queue is a linear list of elements in which deletions can take place only at one end, called the " front " and insertion can take place only at the other end, called rear. Queues are also called " first-in first-out " (FIFO) list. Applications of Queues: Every real life line is a queue.(eg.ticket counters). This is a First In First Out Technique. Calls to large companies are generally placed on queues. Examples: File Servers,Printers. In Mathematics, Queuing theory deals with how long the user has to wait on a line. Checking Balanced Symbols Reversing things is easily done with stacks Evaluation Of Arithmetic Expressions Infix to postfix conversion

What is a Tree? A tree is a collection of nodes. Binary Tree: A binary tree is a tree in which no node can have more than two children.

Binary Search Trees A binary search tree is a tree in which no node can have more than two children. If x is stored at the root, the left subtree contains all keys less than x and the right subtree contains all keys greater than x. AVL Search Trees AVL Tree [Adelson-Velskii and Landis] For every node in the tree, the heights of its left subtree and right subtree differ by at most 1. (theheight of a null subtree is -1) Binary Heap Heaps have two properties, namely, a structure property and a heap order property. A heap is a binary tree that is completely filled, with the possible exception of the bottom level, which is filled from left to right. Such a tree is known as a complete binary tree the smallest element should be at the root. If we consider that any subtree should also be a heap, then any node should be smaller than all of its descendants. Graph The graph is the nonlinear data structure. A graph G = (V, E) consists of a set of vertices, V, and a set of edges, E. Each edge is a pair (v,w ). Minimum Spanning Tree edges that connects all the vertices of G at lowest total cost. A minimum spanning tree exists if and only if G is connected. Although a robust algorithm should report the case that G is unconnected. The number of edges in the minimum spanning tree is |V| - 1. Hashing: Hashing is a method to store data in an array so that sorting, searching, inserting and deleting data is fast. For this every record needs unique key.

Das könnte Ihnen auch gefallen