Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Tài liệu HOT
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
Lecture Introduction to computer and programming - Lecture No 20
TAILIEUCHUNG - Lecture Introduction to computer and programming - Lecture No 20
The contents of this chapter include all of the following: 2 Dimensional array, Initializing 2 Dimensional array, Memory map of 2-D array, Pointer and 2-D array, Array of pointer, Passing 2-D Array to a Function. | CSC103: Introduction to Computer and Programming Lecture No 20 Previous lecture Pointer arithmetic – a program Sorting techniques – a program Passing an Entire Array to a Function Array and pointer Today’s lecture outline 2 Dimensional array Initializing 2 Dimensional array Memory map of 2-D array Pointer and 2-D array Array of pointer Passing 2-D Array to a Function Two Dimensional Arrays It is also possible for arrays to have two or more dimensions For example you want to input roll no and mark of 4 students. Since we know 1-D array, so for this problem we can have two 1-D array One for roll number Second for marks One 2-D array can be used to store these values Example program 1 0 0 1 2 3 row column Roll Number Marks stud[0][0] stud[0][1] stud[1][0] stud[1][1] stud[2][0] stud[2][1] stud[3][0] stud[3][1] 10 85 12 65 13 89 14 92 Go to program Initializing a 2-Dimensional Array Example program Write a program that adds two 4 x 4 matrices. 3 5 6 1 5 3 2 9 1 0 -3 4 7 2 3 -9 4 2 -7 0 5 7 3 1 6 3 -1 0 8 9 -2 3 + 7 7 -1 1 10 10 5 10 7 3 -4 4 15 11 1 -6 = Go to program Memory map of 2D array Remember student array int s[4][2]; But actually memory allocated is continuous 1 0 0 1 2 3 10 85 12 65 13 89 14 92 10 85 12 65 13 89 14 92 s[0][0] s[0][1] s[1][0] s[1][1] s[2][0] s[2][1] s[3][0] s[3][1] Each row of a two-dimensional array can be thought of as a one-dimensional a[4][2] This is important to know if you want to access 2-D array elements using pointer Pointers and 2-Dimensional Arrays 1 0 0 1 2 3 10 85 12 65 13 89 14 92 Array 1 Array 2 Array 3 Array 4 Cont. 1234 56 1212 33 1434 80 1312 78 s[0][0] s[0][1] s[1][0] s[1][1] s[2][0] s[2][1] s[3][0] s[3][1] 65508 65512 65516 65520 65524 65528 65532 65536 s[0] s[1] s[2] s[3] 65508 65516 65524 65532 Cont Now we know each 1-D array Next thing is to access elements of a 1-D array Suppose we want to refer to the element s[2][1] using pointers s[2] 65524 that is that address of third 1-D array 65524 + 1 65528 .
Ánh Trang
87
1
pptx
Báo lỗi
Trùng lắp nội dung
Văn hóa đồi trụy
Phản động
Bản quyền
File lỗi
Khác
Upload
Tải xuống
đang nạp các trang xem trước
Bấm vào đây để xem trước nội dung
Tải xuống
TÀI LIỆU LIÊN QUAN
Pro PHP and iQuery
401
104
0
Principles of Programming Languages
166
128
0
Lecture Programming languages (2/e): Chapter 12b - Tucker, Noonan
14
98
0
Discovering Computers - Chapter 13: Programming Languages and Program Development
51
100
0
Beginning Algorithms
591
111
0
PHP Game Programming
377
113
0
LAND OF LISP
508
81
0
Lecture Programming languages (2/e): Chapter 14a - Tucker, Noonan
18
86
0
Lecture Programming languages (2/e): Chapter 15a - Tucker, Noonan
20
86
0
Lecture Programming languages (2/e): Chapter 12d - Tucker, Noonan
38
92
0
TÀI LIỆU XEM NHIỀU
Một Case Về Hematology (1)
8
461914
55
Giới thiệu :Lập trình mã nguồn mở
14
22874
64
Tiểu luận: Tư tưởng Hồ Chí Minh về xây dựng nhà nước trong sạch vững mạnh
13
10957
531
Câu hỏi và đáp án bài tập tình huống Quản trị học
14
10138
449
Phân tích và làm rõ ý kiến sau: “Bài thơ Tự tình II vừa nói lên bi kịch duyên phận vừa cho thấy khát vọng sống, khát vọng hạnh phúc của Hồ Xuân Hương”
3
9557
104
Ebook Facts and Figures – Basic reading practice: Phần 1 – Đặng Tuấn Anh (Dịch)
249
8337
1127
Tiểu luận: Nội dung tư tưởng Hồ Chí Minh về đạo đức
16
8270
423
Mẫu đơn thông tin ứng viên ngân hàng VIB
8
7882
2224
Đề tài: Dự án kinh doanh thời trang quần áo nữ
17
6765
253
Giáo trình Tư tưởng Hồ Chí Minh - Mạch Quang Thắng (Dành cho bậc ĐH - Không chuyên ngành Lý luận chính trị)
152
5947
1436
TỪ KHÓA LIÊN QUAN
Kỹ thuật lập trình
Programming languages
Computing systems
C programming language
Introduction to computer
Operating system software
Introduction to computer
experience in programming
software engineering
programming languages
computer programming
programming tips
programming experience
code programming
design tips
programming documentation
programming skills
the Ruby programming document
methods Ruby programming language
Lecture Programming languages
Ngôn ngữ lập trình
Imperative programming
Imperative languages
Dynamic allocation
Discovering Computers
Program Development
Low Level Languages
Procedural Languages
Object Oriented Programming Languages
java programming language C + +
C programming
computer software
computer engineering
computer programming language PHP
Functional programming
Functional programming models
Lambda calculus
Logic programming
Logic programming in prolog
Prolog program elements
Scripting languages
Lecture Introduction to computing
Bài giảng Nhập môn máy tính
Introduction to computing
Role of programming languages
Android Programming
Java
programming code
Procedural abstraction
Data structures
Matrix multiplication
Object oriented programming
Abstract data types
The object model
Object oriented language
Represent polynomials
Symbolic differentiation
Mixed language
Scripting language
Semantics of clite
List comprehensions
Practical aspects of prolog
Natural language processing
Event driven programming
Event driven control
Event handling
Java applet
Tic Tac Toe
TÀI LIỆU MỚI ĐĂNG
Đánh giá hao mòn và độ tin cậy của chi tiết và kết cấu trên đầu máy diezel part 3
12
320
0
11-05-2024
TƯƠNG QUAN GIỮA MÔ HỌC, GIẢI PHẪU VÀ HÌNH ẢNH CỦA CÁC KHỐI U PHẦN PHỤ
3
171
0
11-05-2024
MySQL Database Usage & Administration PHẦN 7
37
163
0
11-05-2024
HƯỚNG DẪN SỬ DỤNG PHẦN MỀM CAITA part 9
18
133
0
11-05-2024
Data Structures and Algorithms - Chapter 8: Heaps
41
125
0
11-05-2024
Fecal Incontinence Diagnosis and Treatment - part 8
35
106
0
11-05-2024
MẪU GIẤY PHÉP VẬN TẢI LOẠI C
2
114
0
11-05-2024
A Practical Guide for Health Researchers - part 7
24
112
0
11-05-2024
MẪU CHỨNG CHỈ QUẢN LÝ VŨ KHÍ, VẬT LIỆU NỔ, CCHT
1
124
0
11-05-2024
Báo cáo nghiên cứu nông nghiệp " Biofertiliser inoculant technology for the growth of rice in Vietnam: Developing technical infrastructure for quality assurance and village production for farmers "
12
91
0
11-05-2024
TÀI LIỆU HOT
Mẫu đơn thông tin ứng viên ngân hàng VIB
8
7882
2224
Giáo trình Tư tưởng Hồ Chí Minh - Mạch Quang Thắng (Dành cho bậc ĐH - Không chuyên ngành Lý luận chính trị)
152
5947
1436
Ebook Chào con ba mẹ đã sẵn sàng
112
3780
1247
Ebook Tuyển tập đề bài và bài văn nghị luận xã hội: Phần 1
62
5377
1137
Ebook Facts and Figures – Basic reading practice: Phần 1 – Đặng Tuấn Anh (Dịch)
249
8337
1127
Giáo trình Văn hóa kinh doanh - PGS.TS. Dương Thị Liễu
561
3532
651
Tiểu luận: Tư tưởng Hồ Chí Minh về xây dựng nhà nước trong sạch vững mạnh
13
10957
531
Giáo trình Sinh lí học trẻ em: Phần 1 - TS Lê Thanh Vân
122
3723
525
Giáo trình Pháp luật đại cương: Phần 1 - NXB ĐH Sư Phạm
274
4139
522
Bài tập nhóm quản lý dự án: Dự án xây dựng quán cafe
35
4164
481
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.