Question

1) Explain what is happening when the program is compiling and linking does and why this process is necessary.

2) What is special about the main function?

3) The instruction “#include<iostream>” is generally present at the top each program. What does this instruction do?

4) Convert the following binary numbers to decimals number. Show your work.
a) 1011 b) 10101 c)111 d)1100001

5) Convert the following decimal numbers to binary. Show your work.
a)12 b)43 c)8 d)20

6) (Upload as Source) Write a program which calculates and prints the interest earned on a savings account over a single year. Implement this by declaring a principle variable of type double and initialize the variable to one thousand two hundred and on dollar and forty cents. Initialize another double variable representing the interest rate, and set the value to 18%. Finally calculate the interest earned and print the result to console.

7) (Upload as Source) Using a similar procedure as the previous problem, write a program which converts 36.3 degrees Fahrenheit to Celsius using the equation listed below. Instead of integers, use doubles to store the Fahrenheit and Celsius values.
C=((F-32))/1.8

Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

1. Explain what is happening when the program is compiling and linking does and why this process is necessary.

Answer: Compilation and linking are both steps of the creating executable file process. The source code (in this case the .cpp file) is processed during compilation phase and it is created an object file. Practically the compiler outputs a series of machine language instructions corresponding to the initial source code file. During compilation phase it is possible to be created many such object files. In order to run the program, these object files must be linked. This is performed during linking phase. Only if the linking phase is successfully the program can run....

This is only a preview of the solution. Please use the purchase button to see the entire solution

Assisting Tutor

Related Homework Solutions

Contact List Program in C++
Homework Solution
$18.00
Computer Science
Programming
Contact List
C++
Phone Numbers
Classes
Constructors
Member Variables
Strings
Pointers
Names
People
Test Values
Menu
Functions
Print
Search
Add
Delete
Functions in Programming Language C
Homework Solution
$5.00
Programming
Computer Science
Arrays
Arguments
Integers
Elements
Variables
Statements
Distances
Absolute Values
Indexes
Input
Output
Number Conversion to Any Base
Homework Solution
$18.00
Base Conversion
Hexadecimal
Any Base
Convert
Number
Computer Science
C-Family Programming
Get help from a qualified tutor
Live Chats