Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 788 Bytes

README.md

File metadata and controls

41 lines (27 loc) · 788 Bytes

Midterm Exam

Practice

1. Write a program that adds up the ascii number of a text file and print it.

If "f1" has

ab
c

then, the output should be 61+62+a+63+a=13a in hexadecimal number as follows.

$ ./sol01 f1
sum: 13a

See Sol. 1

2. Write a program thar modifies any given wave file such that it repeats the first half of the sound.

$ ./sol02 swvader.wav

The above should modifies "swvader.wav" such that it contains "yes my yes my" sound instead of "yes my master".

See Sol. 2

3. Write a program that creates a child. The parent and child both print their PID's, but make sure the child always runs first.

$ ./sol03
child: 19019
parent: 19018

See Sol. 3