An expected image !!! Attachment File-image Synthesizer C language implementation algorithm, synthesizer Algorithm

Source: Internet
Author: User

An expected image !!! Attachment File-image Synthesizer C language implementation algorithm, synthesizer Algorithm

Kailuga-blog Park

Http://www.cnblogs.com/kailugaji/

1. Open the f drive. First, find two files, one is the compressed file (2.rar.pdf, and the other is an image (1.jpg) and put it in the directory of the F drive. Of course, other disks can also be used.


1.jpg is shown as follows:


The content in the 2.rar file is as follows:


2. Open cmd and enter the command

C: \ Users \ lenovo> F: \> copy/B 
1.jpg1_
2.rar kailuji.jpg


3.re-upload the fdisk and find another file (kailuga. jpg)


4. it seems to be 1.jpg on the surface, but please rename kailuga jpg.rar with the suffix ". This is amazing.


The contents in kailuga. rar are as follows:


Actually, the content in 2.rar is exactly the same !!!

So, if you want to have the above C language information, please save the following expected picture, it is really expected !!!


 

 

C language implementation algorithm:

1 # include <stdio. h> 
2 # include <stdlib. h> 
3 void main () {
4 FILE * f_pic, * f_file, * f_finish; 
5 char ch, pic_name [20], file_name [20], finish_name [20]; 
6 printf ("Please ipunt picture and file name: \ n"); 
7 printf ("picture:"); 
8 scanf ("% s", pic_name ); 
9 printf ("file:"); 
10 scanf ("% s", file_name); 
11 printf ("generated as:"); 
12 scanf ("% s ", finish_name); 
13 
14 if (! (F_pic = fopen (pic_name, "rb") {
15 printf ("Cannot open the picture % s! ", Pic_name); 
16 return; 
17} 
18 
19 if (! (F_file = fopen (file_name, "rb") {
20 printf ("Cannot open the file % s! ", File_name); 
21 return; 
22} 
23 
24 if (! (F_finish = fopen (finish_name, "wb") {
25 printf ("Cannot open the picture % s! ", Finish_name); 
26 return; 
27} 
28 
29 while (! (Feof (f_pic) {
30 ch = fgetc (f_pic); 
31 fputc (ch, f_finish); 
32} 
33 
34 fclose (f_pic); 
35 
36 while (! (Feof (f_file) {
37 ch = fgetc (f_file); 
38 fputc (ch, f_finish); 
39} 
40 
41 fclose (f_file); 
42 fclose (f_finish ); 
43 system ("pause"); 
44}

There are two files in the current directory:


Result:


Generate an image file kailugaji.jpg in the current directory.


Is it amazing !!!

 


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.