Find Jobs
Hire Freelancers

C Program - Simple

$10-30 USD

Tamamlandı
İlan edilme: yaklaşık 7 yıl önce

$10-30 USD

Teslimde ödenir
Write a C program (partcopy) that allows a user to extract some part of an existing file (fileSource) and copy it to a new file fileTarget. The user can specify the number of bytes (num1) from the beginning of filesource, how many bytes (num2) that will be extracted from it, and the new fileTarget name. >partcopy num1 num2 filesource fileTarget For instance, if the executable name is partcopy, extract 500 bytes from [login to view URL] starting from the beginning of the file: >partcopy 0 500 [login to view URL] [login to view URL] For instance, if the executable name is partcopy, extract 300 bytes from [login to view URL] starting at 50 bytes from the beginning of the file to [login to view URL]: >partcopy 50 300 [login to view URL] [login to view URL] Note: You need to use command line argument to acquire the num1, num2, and filetarget name. ( 5pts) You need to use open() system call to open an existing file. Print out the error message if the filesource does not exist byusing perror() function. (5 pts) You need to check if the size of filesource againt the sizes of num1 and num2. Print out the warning message if the file size is smaller than num1+ num2. In this case, your program will just copy the content up to the end of the source file. This is the situation that the file size is too small to copy the requested size of the content. (10 pts) Once the filesource is open, use lseek() system call to move the file pointer to the proper location for starting reading: num1 from the beginning of the filesource file. ( 20 pts) Create a new file fileTarget and use read() and write() system call to copy the content from filesource to fileTarget for num2 [login to view URL] files when extraction process is complete. 20 pts) Thing to Submit: A c source code partcopy.c with header, error checking including max size of file content you can copy, and documentation as comments in the program. If num1+num2 is greater than the size of filesource, your program may only copy up to the end of the file. Testing results with screen shots to prove a working copy of executable according to the instruction. You testing cases should include proper num1_num2 and in-proper num1+num2. The system call manual can also be accessed at the following links other then eve machine: [login to view URL]:system-calls:write (with examples) [login to view URL] [login to view URL]
Proje No: 13453142

Proje hakkında

6 teklif
Uzaktan proje
Son aktiviteden bu yana geçen zaman 7 yıl önce

Biraz para mı kazanmak istiyorsunuz?

Freelancer'da teklif vermenin faydaları

Bütçenizi ve zaman çerçevenizi belirleyin
Çalışmanız için ödeme alın
Teklifinizin ana hatlarını belirleyin
Kaydolmak ve işlere teklif vermek ücretsizdir
Seçilen:
Kullanıcı Avatarı
Dear client, how are you? I am a C/C++ programmer and mathematician. No problem. Lets do. Please check my "Profile & Work List" and tell me details if my skill is in your concern. Looking forward to your response. Thanks.
$20 USD 0 gün içinde
5,0 (35 değerlendirme)
6,1
6,1
6 freelancer bu proje için ortalama $26 USD teklif veriyor
Kullanıcı Avatarı
I am an expert of C and C++ having more then 1 year experience of development. I developed many projects of different fields. I can you this job for you in a very nice way.
$25 USD 1 gün içinde
4,9 (4 değerlendirme)
2,3
2,3
Kullanıcı Avatarı
I can do it for you in the best way you need it. So please give me this opportunity so that I can prove myself. Thanks.
$25 USD 1 gün içinde
0,0 (0 değerlendirme)
0,0
0,0

Müşteri hakkında

   UNITED STATES bayrağı
Budd Lake, United States
5,0
2
Ödeme yöntemi onaylandı
Mar 17, 2017 tarihinden bu yana üye

Müşteri Doğrulaması

Teşekkürler! Ücretsiz kredinizi talep etmeniz için size bir bağlantı gönderdik.
E-postanız gönderilirken bir şeyler yanlış gitti. Lütfen tekrar deneyin.
Kayıtlı Kullanıcı İlan Edlien Toplam İş
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Ön izleme yükleniyor
Coğrafik konum için izin verildi.
Giriş oturumunuzun süresi doldu ve çıkış yaptınız. Lütfen tekrar giriş yapın.