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 Programming - Lecture 29
TAILIEUCHUNG - Lecture Introduction to Computer Programming - Lecture 29
The contents of this chapter include all of the following: Collections provided in namespace, collections store object reference, traversal supported, ArrayList can be sorted. | CSC141- Introduction to Computer Programming Teacher: AHMED MUMTAZ MUSTEHSAN Lecture – 29 Thanks for Lecture Slides: 1 File Processing (Continued) 2 Random-Access Files Random access files Access individual records without searching through other records Instant access to records in a file Data can be inserted without destroying other data Data previously stored can be updated or deleted without overwriting Implemented using fixed length records Sequential files do not have fixed length records 0 200 300 400 500 byte offsets } } } } } } } 100 100 bytes 100 bytes 100 bytes 100 bytes 100 bytes 100 bytes 3 Creating a Randomly Accessed File Data in random access files Unformatted (stored as "raw bytes") All data of the same type (int, for example) uses the same amount of memory All records of the same type have a fixed length Data not human readable 4 Creating a Randomly Accessed File Unformatted I/O functions fwrite Transfer bytes from a location in memory to a file fread Transfer bytes from a file to a location in memory Example: fwrite( &number, sizeof( int ), 1, myPtr ); &number – Location to transfer bytes from sizeof( int ) – Number of bytes to transfer 1 – For arrays, number of elements to transfer In this case, "one element" of an array is being transferred myPtr – File to transfer to or from 5 Creating a Randomly Accessed File Writing structs fwrite( &myObject, sizeof (struct myStruct), 1, myPtr ); sizeof – returns size in bytes of object in parentheses To write several array elements Pointer to array as first argument Number of elements to write as third argument 6 /* Fig. : #include /* clientData structure definition */ struct clientData { int acctNum; /* account number */ char lastName[ 15 ]; /* account last name */ char firstName[ 10 ]; /* account first name */ double balance; /* account balance */ }; /* end structure clientData */ int main( void ) { int i;
Thùy Mi
80
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
461847
55
Giới thiệu :Lập trình mã nguồn mở
14
22524
57
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
10867
529
Câu hỏi và đáp án bài tập tình huống Quản trị học
14
10030
445
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
9491
104
Ebook Facts and Figures – Basic reading practice: Phần 1 – Đặng Tuấn Anh (Dịch)
249
8245
1124
Tiểu luận: Nội dung tư tưởng Hồ Chí Minh về đạo đức
16
8207
423
Mẫu đơn thông tin ứng viên ngân hàng VIB
8
7860
2220
Đề tài: Dự án kinh doanh thời trang quần áo nữ
17
6648
253
Vật lý hạt cơ bản (1)
29
5756
85
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
301
0
20-04-2024
Mass Transfer in Multiphase Systems and its Applications Part 19
40
254
1
20-04-2024
Trading Strategies Profit Making Techniques For Stock_8
23
171
0
20-04-2024
Magnetic Bearings Theory and Applications phần 2
14
170
0
20-04-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
167
0
20-04-2024
MySQL Basics for Visual Learners PHẦN 9
15
183
0
20-04-2024
THE ANTHROPOLOGY OF ONLINE COMMUNITIES BY Samuel M.Wilson and Leighton C. Peterson
19
138
0
20-04-2024
BÀI GIẢNG VỀ - MẠCH ĐIỆN II - Chương I: Phân tích mạch trong miền thời gian
38
140
0
20-04-2024
Hướng dẫn sử dụng Quickoffice cho Ipad và Iphone
13
150
0
20-04-2024
GIÁO TRÌNH MÁY ĐIỆN KHÍ CỤ ĐIỆN - PHẦN I MÁY ĐIỆN - CHƯƠNG 1
46
129
2
20-04-2024
TÀI LIỆU HOT
Mẫu đơn thông tin ứng viên ngân hàng VIB
8
7860
2220
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
5607
1328
Ebook Chào con ba mẹ đã sẵn sàng
112
3752
1229
Ebook Tuyển tập đề bài và bài văn nghị luận xã hội: Phần 1
62
5256
1127
Ebook Facts and Figures – Basic reading practice: Phần 1 – Đặng Tuấn Anh (Dịch)
249
8245
1124
Giáo trình Văn hóa kinh doanh - PGS.TS. Dương Thị Liễu
561
3474
641
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
10867
529
Giáo trình Sinh lí học trẻ em: Phần 1 - TS Lê Thanh Vân
122
3670
524
Giáo trình Pháp luật đại cương: Phần 1 - NXB ĐH Sư Phạm
274
4024
513
Bài tập nhóm quản lý dự án: Dự án xây dựng quán cafe
35
4105
478
Đã 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.