※スタイルシート未対応ブラウザではレイアウトを正確に再現できません。
  > | advanced by | contents  | that returns in <    
                   < [modosusu] > Color magazine monochrome light and shade   font predetermined, Gothic Ming-style type longhand   size Konaka large   standard  


  Exercise 17   

  1. ..clause 1..: Basic knowledge
  2. ..clause 2..: Program readout
  3. Memo
  4. ..clause 4..: Description type
  5. ..clause 5..: Basic knowledge(example solution)
  6. ..clause 6..: Program readout(example solution)
  7. Memo(example solution)
  8. ..clause 8..: Description type(example solution)


[1] Basic knowledge


[  1-1  ]
What is called the file in which only textual information is written?

[  1-2  ]
The file in which only the numerical value is written
Especially what do call in distinction from the above-mentioned file?
Example solution

It returns to contents.


[2] Program readout


[  2-1  ]
When you execute the following program
What value in what form is written in the file of what name?
 
#include <stdio.h> 

int main(void)  
{

	FILE *fp;  
	int dat[3] = { 10 , 20 , 30 };  
	
	fp = fopen("file.dat","wb");  
	fwrite(&dat,sizeof(dat),1,fp);  
	fclose(fp);  

	return 0;
}
Example solution

It returns to contents.


Memo


[  3-1  ]
Number Name Average score of test
1 Nobi postponing Futoshi 0
2 [Minamotoshizuka] 90
3 Great physical strength [dentakeshi] 40
4 Bone river [sune] husband 70
Make this table and make even Excel the program made by the opened form.
The hint: Comma Separated Value opens any spreadsheet.
Example solution

It returns to contents.


[4] Description type


[  4-1  ]
Information that is sure to only have to be displayed on the display
Describe the file purposely concisely why.
Example solution

It returns to contents.


[5] Basic knowledge(example solution)


[  1-1  ]
Text file

[  1-2  ]
Binary file
Problem

It returns to contents.


[6] Program readout(example solution)


[  2-1  ]
The value such as 10, 20, and 30 is written in the file.dat file in the binary form.
Problem

It returns to contents.


Memo(example solution)


[  3-1  ]
 
#include <stdio.h> 

int main(void) 
{

	FILE *fp; 
	
	fp = fopen("test.csv","w"); 
	
	Number..name..test..average score.  );
	Nobi..postpone.
	);
	Great physical strength.  );
	Bone..river..husband.
	
	fclose(fp); 

	return 0; 
}
- Though it specifies by the string literal here
  Of course, you may use the array etc.
- When the fclose function has been forgotten, it is assumed that it gives a demerit mark.
Problem

It returns to contents.


[8] Description type(example solution)


[  4-1  ]
Because it is possible to preserve when almost permanent, and it becomes easy to edit and to hand if it makes it to the file.
Problem

It returns to contents.


< - It is advanced -> | in | head that returns  to returning  next |.