Data Structure Algorithm

Data Structure Algorithm

DATA STRUCTURE ALGORITHM FIRST CHAPTER Content ▪ What is DSA? ▪ Example of DSA. ▪ Classification of Data Structure. ▪ Top-down And Bottom-up approach. ▪ Difference Between Top-Down And Bottom Up approach. ▪ Structured Programming ▪ Advantages and Disadvantages Of Structured Programming. ▪ Concept of variables and Datatypes. ▪ Rules for naming a variable. ▪ What Is Pointer? ▪ What Is Constant Pointer? Data Structure Algorithm? In computer science, a data structure is a particular way of organizing and storing data in a computer so that it can be accessed and modified efficiently . More precisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data. Example of Data Structure:- • An array is a number of elements in a specific order, typically all of the same type. Elements are accessed using an integer index to specify which element is required (Depending on the language, individual elements may either all be forced to be the same type, or may be of almost any type). Typical implementations allocate contiguous memory words for the elements of arrays (but this is not always a necessity). Arrays may be fixed- length or resizable. • A class is a data structure that contains data fields, like a record, as well as various methods which operate on the contents of the record. In the context of object-oriented programming, records are known as plain old data structures to distinguish them from classes. Classification Of Data Structure Top Down Approch Bottom Up approch Concept of Data Types:- ▪ Data Type:- Is associated with the variable to hold the particular value in C lang. there are mainly Four basic datatype , they are:- ▪ Int ▪ Char ▪ Float ▪ Double ▪ Constants:- Are also called as literals constants are these that do not change value during the execution of programme. There are Three types of constants and they are as follows:- ▪ Character constant ▪ Numeric constant ▪ String constant ▪ Variables:- Are also called as identifiers. Variable can be a name of object . the value of variable can be changed during the execution of program. Rules For Naming A variable? ▪ Variable should be declare with the datatype. ▪ Variable can be a combo of alphabets , digits & with ( _ ). ▪ First, letter of variable should be letter or underscore. ▪ First, letter cannot be a digit. ▪ Keyword cannot be used as a variable. What Is Pointer? In computer science, a pointer is a programming language object, whose value refers to (or "points to") another value stored elsewhere in the computer memory using its memory address. A pointerreferences a location in memory, and obtaining the value stored at that location is known as dereferencing the pointer. Pointer Constant? A constant pointer is a pointer that cannot change the address its holding. In other words, we can say that once a constant pointer points to a variable then it cannot point to any other variable. A Pointer constant is declared as: const int *ptr; (the location of ‘const’ makes the pointer ‘ptr’ as a pointer to constant..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    15 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us