Skip to main content

Posts

Showing posts from June, 2019

Types of Data Structure

Types of Data Structure * Primitive data structures * Non-primitive data structures Primitive Data Structures Primitive Data Structures are the basic data structures that straightforwardly work upon the machine instructions.They have various representations on different computers. The term "data type" and " primitive data type " are commonly used interchangeably. This data types are predetermined types of data, which are supported by the programming language. For example, integer, character, float, string and pointer are all primitive data types. Programmers can utilize these data types when they creating variables in their programs. For example, a programmer may create a variable called "lastname" and define it as a string data type. The variable will then store data as a string of characters. Types of  Primitive Data Structure - * Integer. * Float. * Char * Pointer Integer -  An

Algorithim

An algorithm is a sequence of computational step that transfer the input into the output. Thus we can say that an algorithm can be define as a sequence of definite instruction which when following will achieve some purpose. Algorithm is branch of computer science that consist of designing and analyzing computer system. The design a) Description of algorithm at an abstract level by means of a pseudo language. b) Prof of correction that is the algorithm solve the given problem in all cases. Types of Algorithm - 1. Incremental Algorithm. 2. Divide and Conquer Algorithm. Divide - Divide the problem into a number of sub problem. Conqueer - The sub problem by solving them recursivily. Combine - The solution to the sub problem into the solution for the original problem. EVERY ALGORTHM MUST SATISFIED THE FOLLOWING CRITERIA INPUT - There are zero or more value which are externally supplied. Output - At least one value is produce. Definitness - Each step must be

Non-primitive data structures

Array- An array is defined as a set of finite number of homogeneous elements or data items. It means on array can contain one type data only, either all integer all following point number all character, declaration of array is as follows- int a[6] where int specified the data types or type of element array shows- A 'a' is the name of Array and the number specified inside the bracket is the number of element an array can store. Following a some of the concept to be remember about array - The number of element that can be in an array that is the size of an array its name is given by the following equation. [(upper bound - lower bound) + 1] Array can always be read or written through loop - a) for reading an array      for(i=0; i<=9; i++0 { scanf( "%d" , &a[i]); } b) for writing an array  for (i=0; i,=9; i++) { printf("%d" , a[i]); } List -  A list (Linear Linked List) can be defined as a co