[C Language] Shanxi Province 2023 College Entrance Examination C Program Design (Real Question Collection + Difficulty Analysis)

⬇️⬇️⬇️Click the link to download real questions for free⬇️⬇️⬇️

[Free] 2023 Shanxi Provincial College Upgrade Examination C Programming Real Question Resources-CSDN Library

Q: Why did you choose my article?

Answer: ① You can prostitute real questions for nothing

       ② I went to Shanxi Media College by self-study, and my experience in promotion is authentic and credible

       ③ Difficulty analysis and suggestions from the perspective of candidates, what you see is what you earn

       ④ Answer all questions in the comment area, and answer all questions in private messages, the premise is that you follow me


A little suggestion: (must see)

  • Do the real test if you have the strength to take the exam! After finishing the real test, read the text! You can like and save it for later viewing. It is recommended to download CSDN directly, which is a must for programmers.

        ① When doing mock papers or real questions before the exam, you must strictly demand yourself according to the exam time , and develop the habit of doing the questions at this time.

        ② Do the real questions once less. At present, only the real questions for 2021, 2022, and 2023 have reference value. I think you should not touch the real questions if you do the real questions at most three times (because you can almost memorize all the answers at this time, the real questions are no longer valid. Value), you must wait until you have the strength to go to the examination room before doing the real test, and you must save it for a day or two before the test .

        ③ You should be cautious when reporting to this institution, and it is best to ask him for a few simulation papers of the institution. If it is too different from the real test (for example, the amount and type of the question are inconsistent with the real test), don't consider this one, and you will regret it if you go. If you don't know the rules of the real questions, you can private message me to help you.

        ④ Don’t have too much mental pressure. Anyway, you can’t get into the public school and private school, but don’t let it go badly. I think it’s not difficult to get into the public school. There are many “parallel imports” in the examination room, and there are very few people who really compete with you.

That's all for now, I'll add more later when I think of something else.


This article directory

1. Multiple choice questions

2. Fill in the blanks

3. Program reading questions

4. Programming questions

↓↓↓ The following is the text↓↓↓


1. Multiple choice questions

Difficulty:  send points 

Analysis: Know the basics

Execution process: Edit (.c) -> Compile (.obj) -> Link (.exe) -> Run

Difficulty:  a little 

Analysis: Some students may be entangled between long int and double. C language does not clearly stipulate the size of long int. The size of long int is different on different machines, which may be 4 bytes or 8 bytes. , and the double type must be 8 bytes.

Difficulty:  Moderate 

Analysis: Students can search the C language operator priority table on the Internet , but it is still a bit difficult to memorize all this table

simply put:! > Arithmetic Operators > Relational Operators > && > || > Assignment Operators

Difficulty:  send points 

Parsing: .3 in "%10.3f" means keep  3  decimal places when printing.

Difficulty:  send points 

Parsing: Option A, "5" is a double quote, which is a string

           Option B, '5' is a single quotation mark, which is a character constant, so choose B

           Option C, 5 is a number

           Option D, "Hello" is also a string

Difficulty:  Moderate 

Analysis: This question depends on everyone's learning depth of C language. It is easy for ordinary people to get confused, so although this year's question is simple, it is still easy to increase the score

        1 byte: -128 ~ +127

        2 bytes: -32768 ~ +32767

        4 bytes: -2147483648 ~ +2147483647

Small details: Negative mantissa is 8, positive mantissa is 7

Difficulty:  send points 

Analysis: To do this kind of problem, draw a two-dimensional array, which is clear at a glance

Note: The value of the uninitialized element is 0, not a random value

                      x[1][2] = 0

Difficulty:  send points 

Analysis: There is no problem with options ABD, they are all normal assignment operations

           Option C, a[3] is out of bounds

Difficulty:  send points 

Analysis: Although the x array is not fully used, he has indeed applied for so much space from the memory. Even if he does not use it, it is still his space, so x occupies 2*10=20 bytes . This kind of sub-question but make no mistake

Difficulty:  send points 

Analysis: If you do this question wrong, it is recommended to give yourself a big mouth

Summary: Basically, it is all sub-questions, and the multiple-choice questions are wrong at most.


2. Fill in the blanks

Difficulty:  send points 

Analysis: Hexadecimal conversion should be the basic skill of every computer major student, and it is very easy to pass the test! ! !

Here the double division method is used:

        25 % 16 = 1 ------- remainder: 9

        1 % 16 = 0 ------- remainder: 1

Write the remainder from bottom to top, which is 19. Since it is a hexadecimal number, don’t forget to add  0x in front , so the answer is 0x19

Difficulty: super pit problem! 

Analysis: No one can determine what the standard answer to this question is. This code has different results on different compilers. If you encounter this kind of question, don’t worry about it. It is recommended to skip it directly.

Difficulty:  a little 

Analysis: Another question about priority, note that the question is about the value of the expression b--==256, not the value of b

Difficulty:  Difficult 

Reserve knowledge: ① There is an invisible '\0' at the end of each string 

                  ② When the strlen() function calculates the length of the string, it stops when encountering '\0'

                  ③ '\ddd' is an escape character, ddd represents 1~3 octal digits, for example, '\040' in the title is an escape character

                  ④ '\xhh' is also an escape character, that is, '\x' followed by 1~2 hexadecimal digits, they are actually an escape character, such as: '\xAB', '\x12',' \xA2'

Analysis: Don't simply regard the '\0' in the title as an escape character, there are two numbers behind it, '\040' is a complete escape character! ! !

Difficulty: Moderate 

Analysis: In this question, the subtraction between pointers was tested. Many students did not pay attention to this piece of knowledge, resulting in loss of points

Note: When the pointer is subtracted, it must point to the same array. The subtraction result is the number of elements between the two pointers, not the number of bytes between the two pointers.

        p is a pointer, it points to &a[0],

        So p - &a[4] can be seen as: &a[0] - &a[4],

        Since it is a pointer subtraction, the result is the subtraction of the number of elements, that is, 0 - 4, and the result is -4

Difficulty: send points 

Analysis: 0x20,  0x30, and 0x40 are all hexadecimal numbers that are not 0, so there is no need to consider any priority, and the result must be 1.

Difficulty:  a little 

Analysis: If you have memorized, you will get points, if you have not memorized, you will get no points. Whether you can increase the score depends on the details

Difficulty: send points 

Analysis: This question is all wrong, I think you should really give yourself a big mouth

Summary: In this year's fill-in-the-blank questions, there is no program to fill in the blanks, but a lot of unpopular detailed knowledge is tested. This tells us: we can't just type codes, but also pay more attention to the small knowledge points in the book!


3. Program reading questions

Difficulty: A little (really "a little")

Analysis: Pay attention to the commas in the output! Don't forget that comma! ! !

Difficulty: send points 

Analysis: I can't think of any circumstances to do this question wrong. Could it be that I can't multiply? ?

Difficulty: send points 

Analysis: Send sub-questions without explanation

Difficulty: send points 

Parsing: function call by address

Tips for solving the problem: ① Replace x in the f2() function with &a, and replace y with &b

                  ② A * and an & cancel each other out

Difficulty: send points 

Parsing: lowercase letters - 32 = uppercase letters

Difficulty: a little 

Analysis: Pay attention to fill in the blanks when outputting, and leave a suitable place on the answer sheet

Summary: There are not many problems with this type of question (program reading question), and it mainly depends on the details, such as the comma in question 19, if you don’t notice it, five points will be deducted


4. Programming questions

Note: The answers to programming questions are for reference only, do not memorize the code! Don't copy code! It's useless at all! ! !

Difficulty:  send points 

Reference answer:

#include <stdio.h>

int main()
{
	//假设有100只鸡,0只兔
	int chicken = 100;
	int rabbit = 0;
	while (chicken >= 0 && rabbit >= 0)//鸡兔的个数不可能为负
	{
		if (chicken * 2 + rabbit * 4 == 284)
		{
			printf("鸡有%d只,兔有%d只\n", chicken, rabbit);
			break;
		}
		//鸡-1,兔+1,总数还是100
		chicken--;
		rabbit++;
	}
	return 0;
}

Difficulty: a little 

Analysis: If you have not seen the code of this type of question, then you may not understand the question in the examination room

Reference answer:

#include <stdio.h>

int main()
{
	double e = 1;
	int n = 1;
	int i = 2;
	while (1.0 / n >= 1e-4)//1e-4就是10的负4次方
	{
		e += 1.0 / n;
		n = n * i;
		i++;
	}
	printf("e = %lf\n", e);
	return 0;
}

Difficulty: send points 

Analysis: If you know how to count daffodils, you will know this question

Reference answer:

#include <stdio.h>
#include <math.h>

int main()
{
	int sum;
	int i;
	for (i = 1000; i <= 9999; i++)
	{
		sum = 0;
		int temp = i;
		while (temp != 0)
		{
			sum += (int)pow(temp % 10, 4);
			temp /= 10;
		}
		if (i == sum)
		{
			printf("%d ", i);
		}
	}
	return 0;
}

Difficulty: a little 

Reserve knowledge: ① Prime number refers to " among integers greater than 1 , the number that can only be divisible by 1 and the number itself"

                  ② Short type input and output use "%hd"

Reference answer:

#include <stdio.h>

int main()
{
	short arr[10] = { 0 };
	short sum = 0;
	int i;
	//1.输入10个短整型数
	for (i = 0; i < 10; i++)
	{
		scanf("%hd", &arr[i]);
	}
	//2.遍历数组,判断是否为素数
	for (i = 0; i < 10; i++)
	{
		int flag = 1;//此变量用于判断,flag=1代表是素数,flag=0则不是素数
		//注意:只有大于1的数字才有可能是素数
		if (arr[i] > 1)
		{
			int j;
			for (j = 2; j < arr[i]; j++)
			{
				//如果被整除,说明该数字不是素数,把flag改为0
				if (arr[i] % j == 0)
				{
					flag = 0;
				}
			}
		}
		//若该数字小于等于1,则该数字不可能为素数
		else
		{
			flag = 0;
		}
		//3.如果是素数,就把他们的和加起来
		if (flag)
		{
			sum += arr[i];
		}
	}
	//4.打印结果
	printf("sum = %hd\n", sum);
}

Summary: There are no difficult programming questions this year. As long as you have studied C language carefully, you will definitely be able to do it, but there are still some details that will cause you to lose points.


This test paper must reach 130 points or more before it is possible to go to the ideal college. Students who have finished can leave your score in the comment area

Seniors analyze this year's test paper:

        Compared with the previous two years, this year's questions are particularly simple. There are no program fill-in-the-blank and program-correction questions, and programming questions are also basic questions. On the contrary, I think that in this case, it makes the exam more difficult: the questions are too easy, and it is difficult to pull the score. Imagine that a person who has studied for 500 hours and a person who has studied for 100 hours will do the same test paper. In this case, strength is not so important, but who is more careful and who has a stronger heart , To be calm and thoughtful in the examination room.

Guess you like

Origin blog.csdn.net/m0_73156359/article/details/131351316