Answered step by step
Verified Expert Solution
Question
1 Approved Answer
SOALAN 7/QUESTION 7(8 MARKAH/MARKS) a) Diberikan fungsi bernama con_fah_to_cel. Fungsi ini adalah direka/dibuat bagi menukarkan nilai Fahrenheit kepada Celsius dengan menggunakan rumus seperti di bawah.
SOALAN 7/QUESTION 7(8 MARKAH/MARKS) a) Diberikan fungsi bernama con_fah_to_cel. Fungsi ini adalah direka/dibuat bagi menukarkan nilai Fahrenheit kepada Celsius dengan menggunakan rumus seperti di bawah. Bina fungsi con_fah_to_cel dan isytiharkan pembolehubah-pembolehubah yang diperlukan, jika ada. Anggapkan fungsi tersebut akan menerima satu bacaan Fahrenheit dan kemudiaannya mengembalikan nilai dalam Celsius ke program utama. Given a function named con_fah_to_cel. This function is designed to convert Fahrenheit to degree Celsius using the formula given below. Construct the con_fah_to_cel function and declare the required variable, if any. Assuming the function will receive a reading of Fahrenheit and return the Celsius value to the main program. 5 (32 F -- 32) 0C (4 markah/ marks) b) Diberikan satu fungsi bernama swap. Fungsi ini adalah direka/dibuat untuk menukarkan nilai dua penunjuk; nol dan no2 yang diterima dari program utama. Bina fungsi swap dan isyiharkan pembolehubah, sekiranya ada. Fungsi tersebut tidak akan mengembalikan sebarang pembolehubah ke program utama. Proses penukaran akan dilaksanakan dengan lengkap di dalam fungsi tersebut menggunakan petunjuk. Given a function named swap. This function is designed to swap two pointers; nol and no2 received from main program. Construct the swap function and declare the required variable, if any. This function will not return any variable to the main program. The swapping process will be completed in the function using pointers. (4 markah/marks)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started