TAILIEUCHUNG - Kỹ thuật lập trình_ Module 6

Tham khảo tài liệu 'kỹ thuật lập trình_ module 6', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Module6 A Closer Look at Functions Table of Contents CRITICAL SKILL Know the two approaches to argument CRITICAL SKILL How C Passes CRITICAL SKILL Using a Pointer to Create a CRITICAL SKILL Reference CRITICAL SKILL Returning CRITICAL SKILL Independent CRITICAL SKILL Function CRITICAL SKILL Default Function CRITICAL SKILL Function Overloading and This module continues our examination of the function. It discusses three of C s most important function-related topics references function overloading and default arguments. These features vastly expand the capabilities of a function. A reference is an implicit pointer. Function overloading is the quality that allows one function to be implemented two or more different ways each performing a separate task. Function overloading is one way that C supports polymorphism. Using a default argument it is possible to specify a value for a parameter that will be automatically used when no corresponding argument is specified. We will begin with an explanation of the two ways that arguments can be passed to functions and the implications of both methods. An understanding of argument passing is needed in order to understand the reference. 1 C A Beginner s Guide by Herbert Schildt CRITICAL SKILL Know the two approaches to argument passing In general there are two ways that a computer language can pass an argument to a subroutine. The first is call-by-value. This method copies the value of an argument into the parameter of the subroutine. Therefore changes made to the parameter of the subroutine have no effect on the argument used to call it. Call-by-reference is the second way a subroutine can be passed arguments. In this method the address of an argument not its value is copied into the parameter. Inside the subroutine this address is used to access the actual argument .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.