Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

ECS36B Winter 2023

2023-01-12

Homework 0 Due Thu Jan 19 at 23:59

Note: The purpose of this homework is to check that

i) You can use a simple Makefile

ii) You can write a simple "Hello World" program in C++.

iii) You are familiar with the tar command.

iv) You are familiar with the Gradescope submission process.

Use Gradescope to submit your work

1) Write a C++ program that prints the following line on stdout:

Hello ECS36B from xxxxx

where the string xxxxx is replaced by the last five digits ofyour Student ID. The output should consist of a single line terminated by an end of line character. The output should consist of exactly 24 characters (including the end of line character). You can verify the length of the         output using the Unix wc command.

The program source file name should be hello.cpp .

2) Write a Makefile such that the command

$ make

compiles the program hello.cpp and produces an executable named hello . The Makefile should include a target named clean so that the command

$ make clean

removes the executable file hello .

3) Create a tar file called hello.tar containing the files hello.cpp and Makefile. Do not use data compression to create the tar file. Do not include any other file.

4) Submit your file hello.tar using Gradescope