TAILIEUCHUNG - Thinking in C plus plu (P6)

Tham khảo tài liệu 'thinking in c plus plu (p6)', 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ả | 28. Create a function that takes a pointer to an array of double and a value indicating the size of that array. The function should print each element in the array. Now create an array of double and initialize each element to zero then use your function to print the array. Next use reinterpret_castto cast the starting address of your array to an unsigned char and set each byte of the array to 1 hint you ll need to use sizeof to calculate the number of bytes in a double . Now use your array-printing function to print the results. Why do you think each element was not set to the value 29. Challenging Modify that it prints out each part of the double as a separate group of bits. You ll have to replace the calls to printBinary with your own specialized code which you can derive from printBinary in order to do this and you ll also have to look up and understand the floating-point format along with the byte ordering for your compiler this is the challenging part . 30. Create a makefile that not only compiles and your particular compiler but also executes both programs as part of the default target behavior. Make sure you use suffix rules. 31. Modify that P A is conditionally ifdefed to allow the debugging code to be automatically stripped out by setting a command-line flag. You will need to consult your compiler s documentation to see how to define and undefine preprocessor values on the compiler command line. 32. Define a function that takes a double argument and returns an int. Create and initialize a pointer to this function and call the function through your pointer. 33. Declare a pointer to a function taking an int argument and returning a pointer to a function that takes a char argument and returns a float. 230 Thinking in C www. BruceEckel .com 34. Modify that each function returns a string instead of printing out a message and so that this value is printed .

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.