Write a C program the `cp’ program that takes arguments as source and destination
filenames and copies the source to the destination. You need to use the functions fread
and fwrite. Note that the file may or may not be in text format.
Activity 3: Learning Unit 1‐3: ADDRESSING Q.3.1 Explain why devices on a network need addresses. (5) Q.3.2 Explain the difference between a MAC address and an IP address. You should relate your answer to the OSI model. (6) Q.3.3 Explain how devices get their MAC or IP address. (4) Q.3.4 Explain how a packet gets from one network to another. Your explanation should relate this movement to the IP address format. (5) Q.3.5 As the Internet has expanded, we have run out of IP addresses. Outline TWO ways how this problem has been overcome.
Consider the following equations. 𝐴 = 2𝑥 𝐵 = 2 cos 𝑥 , 𝑤ℎ𝑒𝑟𝑒 𝑥 𝑖𝑠 10° , 20° , 30° … 180° 𝐶 = ∑ 𝑛 + 5 5 100 𝑛=0 Construct a C++ program to calculate and print out the value of A, B and C by considering the following conditions; 1- User must keyed-in “start” and “stop” to control the program. 2- Use function to display all the above equations. 3- If user keyed-in “function1”, calculate the value of A divided by C for the value of x from 1 to 100. 4- If user keyed-in “function1”, calculate the value of B divided by A for the value of x from 2 to 200.
Identify and with practical examples give the different types of languages that are
available in the DBMS?
How is the pattern matching done in the SQL?
Create an Investment class that contains fields to hold the initial value of an investment, the
current value, the profit (calculated as the difference between current value and initial value),
and the percent profit (the profit divided by the initial value). Include a constructor that
requires initial and current values and a display function.
Create a House class that includes fields for street address and square meter, a constructor
that requires values for both fields, and a display function.
Create a HouseThatIsAnInvestment class that inherits from Investment and House. It includes a
constructor and a display function that calls the display functions of the parents.
Write a main() function that declares a HouseThatIsAnInvestment and displays its values.
Online Book Merchants offers premium customers 1 free book with every purchase of 5 or more books and offers 2 free books with every purchase of 8 or more books. It offers regular customers 1 free book with every purchase of 7 or more books, and offers 2 free books with every purchase of 12 or more books. Write a statement that assigns freeBooks the appropriate value based on the values of the boolean variable isPremiumCustomer and the int variable nbooksPurchased.