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

  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 of the summary of the variable of the same type handling?
Example solution

It returns to contents.


[2] Program readout


[  2-1  ]
What does the following program calculate?
Judging from the content of processing and the variable identifier, answer.
 
#include <stdio.h> 

int main(void)  
{
	int data[] = {79,42,39,79,13,75,19};  
	int i,sum = 0,avg;  

	for (i = 0;i < sizeof(data) / sizeof(data[0]);i++) { sum += data[i]; 
	}
	
	avg = sum / (sizeof(data) / sizeof(data[0]));  
	
	printf("%d\n",avg);  

	return 0;
}
Example solution

It returns to contents.


Memo


[  3-1  ]
Make the program that displays ten input numerical values at the end.
Example solution

It returns to contents.


[4] Description type


[  4-1  ]
Explain concisely what the maximum advantage of the array is.
Example solution

It returns to contents.


[5] Basic knowledge(example solution)


[  1-1  ]
Array
Problem

It returns to contents.


[6] Program readout(example solution)


[  2-1  ]
The mean value is calculated.
Problem

It returns to contents.


Memo(example solution)


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

int main(void)  
{
	int data[10];  
	int i;  
	
	Turn..numerical value..input.
		scanf("%d",&data[i]);  
	}
	
	for (i = 9;i >= 0;i--) { 
		printf("%d ",data[i]); 
	}
	printf("\n");  

	return 0;
}
- Though the loop is turned to reverse order when it displays it here
  You may reverse only the number displayed in the nether way if it is cramped.
 
	for (i = 0;i < 10;i++) { printf("%d ",data
	[9 - i]); 
	}
Problem

It returns to contents.


[8] Description type(example solution)


[  4-1  ]
A large amount of variable should be able to be treated collectively by specifying the number by the variable.
Problem

It returns to contents.


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