Sign in with
Sign up | Sign in
Your question

C. please help

Last response: in Applications
Share
April 23, 2010 6:42:13 PM

1. Open the file w.pdf to read. You are to write a series of statements that computes the number of bytes in w.pdf and in a printf statement output the number of bytes in the file w.pdf.
2. Open a file new.pdf to write. You need to read each character from w.pdf and write to new.pdf
3. Declare an array
long freq[256]={0};
Reset the file position indicator to the beginning of the file for the file w.pdf , read each character in w.pdf and determine how many times each character occurs in the file.
example if ch==i then freq++
after reading the entire file output the frequency count in a formatted manner printing six frequencies on each line.
4. (optional) An example of a weak encryption: reset the file position indicator to the beginning of the file for the file w.pdf and open a file called encryptFile. Prompt the user to enter an unsigned long, assign it to an unsigned long called key. Read each byte B from w.pdf and write the byte C= B^ (key & 0xff). Then set key=(key<<8)| (C&0xff) and then continue this process or reading and writing until EOF
5. (extra credit must be turned in to the instructor) Write a function that will decrypt your encrypted file encryptFile.


help me

dilaal1@hotmail.com

More about : question

April 23, 2010 6:49:56 PM

:lol:  But you'll feel so much better if you earn your grade yourself.
m
0
l
Related resources
a b L Programming
April 23, 2010 10:42:51 PM

Here we go again!
m
0
l
April 24, 2010 6:00:22 AM

That assignment takes a few lines of code. I would strongly urge you to figure it out yourself or you will certainly fail the class.
m
0
l
April 24, 2010 7:12:25 PM

1. Open the file w.pdf to read. You are to write a series of statements that computes the number of bytes in w.pdf and in a printf statement output the number of bytes in the file w.pdf.
2. Open a file new.pdf to write. You need to read each character from w.pdf and write to new.pdf
3. Declare an array
long freq[256]={0};
Reset the file position indicator to the beginning of the file for the file w.pdf , read each character in w.pdf and determine how many times each character occurs in the file.
example if ch==i then freq++
after reading the entire file output the frequency count in a formatted manner printing six frequencies on each line.
4. (optional) An example of a weak encryption: reset the file position indicator to the beginning of the file for the file w.pdf and open a file called encryptFile. Prompt the user to enter an unsigned long, assign it to an unsigned long called key. Read each byte B from w.pdf and write the byte C= B^ (key & 0xff). Then set key=(key<<8)| (C&0xff) and then continue this process or reading and writing until EOF
5. (extra credit must be turned in to the instructor) Write a function that will decrypt your encrypted file encryptFile.



m
0
l
April 24, 2010 7:52:47 PM

This next topics has been merged by Aford10
  • C help me
    m
    0
    l
    !