Question: Please I need this answers ASAP for Linux Class. Lab Writeup Explain what the following diff outputs and patch commands would do. Chunk 1 :

Please I need this answers ASAP for Linux Class.

Lab Writeup

Explain what the following diff outputs and patch commands would do.

Chunk 1:

1c1 < // this is the original file --- > // this is the new file

Chunk 2:

2a3 > // Additional comments added to the new file

Chunk 3:

7a9,11 > class Time; // forward reference > istream &operator >> (istream &, Time &); >

Chunk 4:

8a13 > friend ostream &operator<<(ostream &, const Time &);

Chunk 5:

13a19 > Time &setTime( const Time & ); // set Time object

Chunk 6:

25d30 < void printMilitary() const; // print military time

7. Assume you had the following output in a file called diff_file:

--- hw4_2.cpp 2009-11-18 14:54:47.000000000 -0800 +++ hw4_2b.cpp 2009-11-18 14:56:04.000000000 -0800 @@ -14,18 +14,14 @@ int size; // Current number of elements in nums double avg, stdev; - cout << "How many integers do you wish to enter? "; - cin >> size; - // Validate that size is between 2 and MAX_SIZE. We use 2 as the lower bound // since you cannot compute standard deviation with only 1 value. Validation // loops always use the inverse of the desired values as the while statement - while(size < 2 || size > MAX_SIZE) + do { - cout << "Invalid size. Valid sizes are 2 to " << MAX_SIZE; - cout << ". How many integers? "; + cout << "How many integers do you wish to enter (2 to " << MAX_SIZE << ")? "; cin >> size; - } + } while(size < 2 || size > MAX_SIZE); // Now we can prompt the user for each integer for(int i = 0; i < size; i++)

What would the command patch -p0 ?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!