Lecture Data Structures & Algorithms: Chapter 1

pptx
Số trang Lecture Data Structures & Algorithms: Chapter 1 22 Cỡ tệp Lecture Data Structures & Algorithms: Chapter 1 645 KB Lượt tải Lecture Data Structures & Algorithms: Chapter 1 0 Lượt đọc Lecture Data Structures & Algorithms: Chapter 1 0
Đánh giá Lecture Data Structures & Algorithms: Chapter 1
4.4 ( 17 lượt)
Nhấn vào bên dưới để tải tài liệu
Để tải xuống xem đầy đủ hãy nhấn vào bên trên
Chủ đề liên quan

Nội dung

DONG NAI UNIVERSITY OF TECHNOLOGY Data Structures & Algorithms DONG NAI UNIVERSITY OF TECHNOLOGY C-Language DONG NAI UNIVERSITY OF TECHNOLOGY 1.ADDRESS 2.POINTERS 3.ARRAYS 4.ADDRESS OF EACH ELEMENT IN AN ARRAY 5.ACCESSING & MANIPULATING AN ARRAY USING POINTERS 6.ANOTHER CASE OF MANIPULATING AN ARRAY USING POINTERS 7.TWO-DIMENSIONAL ARRAY 8.POINTER ARRAYS 9.STRUCTURES 10.STRUCTURE POINTERS DONG NAI UNIVERSITY OF TECHNOLOGY 1. ADDRESS For every variable there are two attributes: address and value In memory with address 2: value "Dave" In memory with address 5: value: 95.5 cout << "Value of 'y' is: " << y << "\n"; cout << "Address of 'y' is: " << &y << "\n\n"; DONG NAI UNIVERSITY OF TECHNOLOGY 2. POINTERS 1. is a variable whose value is also an address. 2. A pointer to an integer is a variable that can store the address of that integer ia: value of variable &ia: address of ia *ia means you are printing the value at the location specified by ia DONG NAI UNIVERSITY OF TECHNOLOGY int i; //A int * ia; //B cout<<"The address of i "<< &i << " value="< use a pointer to integer to access array elements. DONG NAI UNIVERSITY OF TECHNOLOGY void printarr_usingpointer(int M[]) { int *pi; pi=M; for(int i=0;i<10;i++) { cout<<"value array: "<<*pi <<" address: "<>teo.fMark; student *pteo; gets(pteo->strName); cin>>pteo->fMark; DONG NAI UNIVERSITY OF TECHNOLOGY END
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.