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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started