51cto college specially sorted out "2014 soft test programmer-General test knowledge point review notes [summary]" in the soft test preparation season to help schools pass through smoothly! For more software proficiency test counseling and questions, please pay attention to the 51cto college-soft exam classification!
View summary:2014 soft test programmer-test-exercise questions before the test [summary]650) This. width = 650; "alt =" popular article "src =" http://www.exam8.com/images/hot.gif "style =" padding: 0px; margin: 0px; Vertical-align: middle; Border: 0px; "/>
Read the following program description and C program, and write the words in _ (n) _ in the corresponding answer sheet.
[Program description]
In this program, the function factor (M, FAC, CP) is used to calculate the sum of all the different factors except itself in the positive integer m (M> 2. This function returns the factor and stores each factor in ascending order in the FAC array, and stores the number of factors in the variable referred to by CP.
For example, M = 16, the obtained factor is
(1, 2, 4, 8)
Tip: The sum of factors is 15, and the number of factors is 4.
The program assumes that the number of different factors in the positive integer m cannot exceed 100.
[Program]
# Include
# Define n 100
Long factor (int m, int FAC [], int * CP)
{
Int C1, C2, I, K;
Long S;
FAC [0] = 1;
For (C1 = S = 1, C2 = N-1, ____ (1 )____;;)
{
K = m/I;
If (____ (2 )____)
If (____ (3 )____)
{FAC [C1 ++] = I;
FAC [C2 --] = K;
S + = I + K;
}
Else {
FAC [C1 ++] = I;
S + = I;
}
I ++;
If (I> = k) brdak;
}
For (C2 ++; C2 <= N-1; C2 ++)
____ (4 )____;
* CP = C1;
Return ____ (5 )____;
Answer:
1) 3 points I = 2, or Cl + 1
2) 3 minutes M % I = 0 (or! (M % I) or M = I * K)
3) 3 points I! = K (or I <K)
4) 3: FAC [CL ++] = FAC [C2]
Answer the question "Cl ++": give 1 point, and "=": give 1 point to the right half.
5) 3 minutes/* floating 300*250, created on 2010-10-21 */var cpro_id = 'u249277 ';
Recommended high-quality articles:
Preparing for the 2014 soft exam! Recommendation of high-quality video tutorials (Comprehensive review + experience sharing + pre-test Sprint)
Knowledge points of Network Management in 2014 computer soft examination [summary]
Exercise questions and answers for the 2014 soft exam Network Administrator examination [summary]
2014 soft test programmer-frequent test knowledge point review notes [summary]
For online soft test video tutorials, click:
Http://edu.51cto.com/course/courseList/id-44.html
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/3D/9F/wKioL1PE_n3z629yAACXIHScsJM092.jpg "alt =" wkiol1pe_n3z629yaacxihscsjm092.jpg "style =" padding: 0px; margin: 0px; Vertical-align: Top; Border: none; "/>
This article is from the "51cto college official blog" blog, please be sure to keep this source http://51edu.blog.51cto.com/8899635/1539426