Hey all. I need to use input and output files, and create a code such that the input value digit sums are added and then output to a file. Here is the problem as given to me:

The file "original.txt" contains integer numbers in them. You are required to create another file, named "encoded.txt", from the original file.
Write a program "encoding.c" that reads every integer from the "original.txt" file and writes the integer and the sum of the digits of the
integer to the "encoded.txt" file.
The "encoded.txt" contains twice the number of integers compared to the "original.txt" file.

The contents of a sample "original.txt" and "encoded.txt" files are shown below.

original.txt file contents
1234
3527
9882
83421
23421

Corresponding encoded.txt file
1234 10
3527 17
9882 27
83421 18
23421 12
If anyone can help me out, get started it would be greatly appreciated. Our "hint" if you wanna call it that, was to use pointers and files...