Question: Create the C + + files given below. Compile and run the program with g + + by compiling the two files separately step by
Create the C files given below. Compile and run the program with g by compiling the two files separately step by step and then linking them into an executable program file.
You use text editors for the i and s files as well as a hex editor eg GHex to open and analyze them.
Make the program by creating a header file.
File : program.cpp
#include
int mainvoid
int num num;
std::cout "Enter first number: ;
std::cin num;
std::cout "Enter second number: ;
std::cin num;
cout "Before swap: Num num Num num std::endl;
swapnum num;
cout "Before swap: Num num Num num std::endl;
return ;
File : swap.cpp
void swapint& num int& num
num num;
num num;
num num;
Describe in a text file the sequence of commands you use to compile the two files step by step.
Create an appropriate Makefile to compile them with. For Linux terminal g
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
