Question: / * print the result * / printf ( The result is of , num 1 * num 2 ) ; / *

/* print the result */
printf("The result is of
", num1* num2); /* this does it */
/* does it work? */
return 0 ;
}
Answer:
b) Consider the following file called phone.txt containing some DFW area phone
numbers, except that the area code (i.e., the first three digits) are backwards and do
not include the parentheses around the area code as follows:
Write a single sed script called minor3. sed that does the following:
Removes the phone number beginning with 412(i.e., really the number with
the 214 area code).
Reverses the order of the three digits in the area code and adds the needed
parentheses around the area code.
Appends your phone number (you can make one up if you want) after the
number beginning with 718(i.e., the last phone number in the file).
In this file, for example, my sed script should print the following:
$ sed-r -f minor3.sed phone.txt
(972)680-0035
(469)432-8492
(817)780-4972
(940)369-7055
This sed script file will be submitted to Canvas.
 /* print the result */ printf("The result is of ", num1*

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!