TAILIEUCHUNG - Kỹ thuật lập trình_Module 5

Tham khảo tài liệu 'kỹ thuật lập trình_module 5', 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ả | Module 5 Introducing Functions Table of Contents CRITICAL SKILL Know the general form of a CRITICAL SKILL Creating a CRITICAL SKILL Using CRITICAL SKILL Using CRITICAL SKILL Using Functions in CRITICAL SKILL Local CRITICAL SKILL Global CRITICAL SKILL Passing Pointers and Arrays to CRITICAL SKILL Returning CRITICAL SKILL Pass Command-Line Arguments to main .26 CRITICAL SKILL Function CRITICAL SKILL This module begins an in-depth discussion of the function. Functions are the building blocks of C and a firm understanding of them is fundamental to becoming a successful C programmer. Here you will learn how to create a function. You will also learn about passing arguments returning values local and global variables function prototypes and recursion. Function Fundamentals A function is a subroutine that contains one or more C statements and performs a specific task. Every program that you have written so far has used one function main . They are called the building blocks of C because a program is a collection of functions. All of the action statements of a program are found within functions. Thus a function contains the statements that you typically think of as being the executable part of a program. Although very simple programs such as many of those shown in this book will have only a main function most programs will contain several functions. In fact a large commercial program will define hundreds of functions. 1 C A Beginner s Guide by Herbert Schildt CRITICAL SKILL Know the general form of a function All C functions share a common form which is shown here return-type name parameter-list body of function Here return-type specifies the type of data returned by the function. This can be any valid type except an array. If the function does not return a value its return type must be void. .

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.