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
Giới thiệu
Đăng ký
Đăng nhập
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
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
Lecture Introduction to computer and programming - Lecture No 17
tailieunhanh - Lecture Introduction to computer and programming - Lecture No 17
The contents of this chapter include all of the following: Define virtual memory; describe the hardware and control structures that support virtual memory; describe the various OS mechanisms used to implement virtual memory; describe the virtual memory management mechanisms in UNIX, Linux, and Windows 7. | CSC103: Introduction to Computer and Programming Lecture No 17 Previous lecture Function call by address or pointer Function return value Use pointers to get results in calling function from called function Today’s lecture outline Recursive functions Introduction to Array Accessing elements of array A simple array program Write a program Recursive function In C, it is possible for the functions to call themselves A function is called ‘recursive’ if a statement within the body of a function calls the same function Example program - factorial Go to program Example program – factorial using recursion Go to program Cont. Cont. main() { . . fact = rec(3); printf ( "%d ", fact); } rec ( 3 ) { int f ; if ( 3 == 1 ) return ( 1 ) ; else f = 3 * rec ( 3 - 1 ) ; return ( f ) ; } false rec ( 2 ) { int f ; if ( 2 == 1 ) return ( 1 ) ; else f = 2 * rec ( 2 - 1 ) ; return ( f ) ; } rec ( 1 ) { int f ; if ( 1 == 1 ) return ( 1 ) ; else f = 2 * rec ( 2 - 1 ) ; return ( f ) ; } false true f = 2 * 1; f = 2 f = 3 * 2; f = 6 fact = 6 Go to program Example program 2 Write a definition of a function that adds n integers using recursion and then return the sum. Prototype of the function is below int sum_number(int); Write a program Array Offers a simple way of grouping like variables for easy access It is a group of elements having same data type An array is a collective name given to a group of ‘similar quantities’ Arrays in C share a few common attributes Variables in an array share the same name Variables in an array share the same data type Individual variables in an array are called elements Elements in an array are accessed with an index number Cont. Ordinary variables are capable of holding only one value at a time There are situations in which we would want to store more than one value at a time in a single variable Cont. For example, suppose we want to arrange the percentage marks obtained by 100 students in ascending order In such a case we have two options to store these . | CSC103: Introduction to Computer and Programming Lecture No 17 Previous lecture Function call by address or pointer Function return value Use pointers to get results in calling function from called function Today’s lecture outline Recursive functions Introduction to Array Accessing elements of array A simple array program Write a program Recursive function In C, it is possible for the functions to call themselves A function is called ‘recursive’ if a statement within the body of a function calls the same function Example program - factorial Go to program Example program – factorial using recursion Go to program Cont. Cont. main() { . . fact = rec(3); printf ( "%d ", fact); } rec ( 3 ) { int f ; if ( 3 == 1 ) return ( 1 ) ; else f = 3 * rec ( 3 - 1 ) ; return ( f ) ; } false rec ( 2 ) { int f ; if ( 2 == 1 ) return ( 1 ) ; else f = 2 * rec ( 2 - 1 ) ; return ( f ) ; } rec ( 1 ) { int f ; if ( 1 == 1 ) return ( 1 ) ; else f = 2 * rec ( 2 - 1 ) ; return ( f ) ; } false true f = 2 * 1;
Linh Lan
89
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
114
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
22883
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
10958
531
Câu hỏi và đáp án bài tập tình huống Quản trị học
14
10146
450
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
8341
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
7883
2224
Đề tài: Dự án kinh doanh thời trang quần áo nữ
17
6771
255
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
5964
1440
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
Báo cáo nghiên cứu khoa học " KẾT QUẢ NGHIÊN CỨU BƯỚC ĐẦU VỀ THIÊN ĐỊCH CHÂN KHỚP TRÊN CÂY THANH TRÀ Ở THỪA THIÊN HUẾ "
7
178
0
12-05-2024
B2B Content Marketing: 2012 Benchmarks, Budgets & Trends
17
143
0
12-05-2024
báo cáo hóa học:" Endoscopic decompression for intraforaminal and extraforaminal nerve root compression"
7
114
0
12-05-2024
QUẢN LÝ CHẤT LƯỢNG KHÔNG KHÍ
75
141
0
12-05-2024
GIÁO TRÌNH VI XỬ LÝ 1 - CHƯƠNG 5. LẬP TRÌNH CHO VI ĐIỀU KHIỂN 80C51
23
115
1
12-05-2024
Christmas Meditations on the Twelve Holy Days
173
109
0
12-05-2024
báo cáo hóa học:" Increased androgen receptor expression in serous carcinoma of the ovary is associated with an improved survival"
6
103
0
12-05-2024
Giáo trình phân tích phương trình vi phân viết dưới dạng thuật toán đặc tính của hệ thống p1
5
108
0
12-05-2024
ĐỀ THI THỬ ĐẠI HỌC 2009 – THPT ĐÔNG SƠN 1 – LẦN 2 – MÔN TOÁN
8
103
0
12-05-2024
Quy Trình Canh Tác Cây Bông Vải
8
114
0
12-05-2024
TÀI LIỆU HOT
Mẫu đơn thông tin ứng viên ngân hàng VIB
8
7883
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
5964
1440
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
5380
1137
Ebook Facts and Figures – Basic reading practice: Phần 1 – Đặng Tuấn Anh (Dịch)
249
8341
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
10958
531
Giáo trình Sinh lí học trẻ em: Phần 1 - TS Lê Thanh Vân
122
3725
525
Giáo trình Pháp luật đại cương: Phần 1 - NXB ĐH Sư Phạm
274
4142
522
Bài tập nhóm quản lý dự án: Dự án xây dựng quán cafe
35
4170
481
crossorigin="anonymous">
Đã 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.