※スタイルシート未対応ブラウザではレイアウトを正確に再現できません。
  > | 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 14   

  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 method to distinguish by putting a separate number on each character?

[  1-2  ]
What is called a special character that shows the end of the character string?
Example solution

It returns to contents.


[2] Program readout


[  2-1  ]
Answer how it is displayed when the following program is executed.
 
#include <stdio.h> 

int main(void)  
{
	char C;  
	
	for (C = 'A';C <= 'Z';C++) { 
		printf("%C",C); 
	}
	printf("\n");  
	
	return 0;
}
Example solution

It returns to contents.


Memo


[  3-1  ]
Separately input the family name and the name, and make the program that unites it and displays it.
Example solution

It returns to contents.


[4] Description type


[  4-1  ]
Explain the array is used to handle the character string in C language concisely why.
Example solution

It returns to contents.


[5] Basic knowledge(example solution)


[  1-1  ]
Character-code

[  1-2  ]
EOS or terminal character
Problem

It returns to contents.


[6] Program readout(example solution)


[  2-1  ]

ABCDEFGHIJKLMNOPQRSTUVWXYZ
Problem

It returns to contents.


Memo(example solution)


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

int main(void)  
{
	char fname[256],name[256];  
	
	Printf ("Input the family name");  
	scanf("%s",fname);  
	
	Printf ("Input the name");  
	scanf("%s",name);  
	
	strcat(fname,name);  
	Printf ("The full name is %s\n" fname);  
	
	return 0;
}
Though it displays after character strings are connected here
The method that only arranges to the way below and displays is acceptable.

printf("フルネームは %s%s\n",fname,name);
Problem

It returns to contents.


[8] Description type(example solution)


[  4-1  ]
Because length is various, the character string as the case may be :.
The memory is saved by using the array into which length is changed.
Problem

It returns to contents.


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