The examination requires candidates to answer carefully selected questions in a specified way within a specified time or complete certain practical tasks according to the requirements of the organizer, who will evaluate the results, thus providing the organizer with information on candidates' knowledge or skills. The following is my experience in passing the C language in the computer level 2 exam. Welcome to refer to it!
I think we should first understand the basic concepts of the written test of computer level 2 C language test skills, and don't swallow the dates raw. Many friends are eager to read books, so I don't think it is advisable to set a few pages a day for myself. For relatively simple places, such as C language background, advantages and operational procedures, you can read them carefully before writing them down, and you will naturally understand them later. However, we should pay attention to some special rules, grammar and other knowledge points, such as any statement in C language must be marked at the end, the introduction of pointer concept, function call and so on. These concepts are easy for beginners to ignore or difficult to understand, so it is worthwhile to spend more time in this area.
After understanding the knowledge in the textbook, it is time to strengthen training. At this time, it is necessary to do some exercises properly, just use the workbook that matches the textbook, and focus on reviewing functions, arrays and pointers. These three contents are the most important in both written test and computer test. In addition, conditional sentences and cyclic sentences should also be mastered, because most questions contain these two sentences.
You must do the exam step by step and do the questions carefully. If you finish them in a hurry, when you come back for inspection, you will probably do it again with your previous mentality, and the inspection will not be effective.
Finally, I want to talk about the basics of computers. This part covers a wide range and requires comprehensive knowledge. There are no typical questions and no tips for reviewing, so we can only rely on the accumulation of time. Just be careful not to exceed the outline when doing this sub-topic
Learning essentials of computer test level 2 C language 1. Computer language is rather boring. How to arouse interest?
A: First of all, we must define the learning objectives. Without a clear learning goal, there will be no motivation to learn. Set yourself a goal, such as passing the computer grade exam this time, or doing something after studying this month, and so on. Secondly, after setting the goal, we should do it seriously, practice more on the computer, communicate with teachers and other students if we don't understand, and never give up. When a small program I do runs through, or when I solve a difficult problem, I will have a sense of accomplishment, maybe I will be very excited, and I will gradually become interested. Finally, we should apply what we have learned to practical problems, so that we can not only consolidate what we have learned, but also expand our knowledge according to actual needs. In this virtuous circle, interest will become stronger and stronger.
2. A student wrote and asked: What TURBO is installed in my computer? C(970K) cannot be compiled normally. The phenomenon is: during compilation, there are no errors and warnings, and you can press any key to return, but you can't generate an "OBJ" file on the computer. Sometimes you will be prompted: Can't open the input file? cos.obj? This problem also appears in the program that my friend copied back from their school PC? ! It's normal in their school. What happened? This problem has been bothering me, making my study impossible! Please help me solve it. thank you
Answer: this requires resetting the include directory and lib directory in the options-directory and setting them as your C installation directory. Remember to save it!
3, # including
Master ()
{int m=7,n = 4;
float a=38.4,b=6.4,x;
x = m/2+n * a/b+ 1/2;
printf("%f\n ",x);
}
The result of this program is 27.000000.
Why do I keep counting 28 million? Please advise.
A: main ()
{
int m=7,n = 4;
float a=38.4,b=6.4,x;
x = m/2+n * a/b+ 1/2;
printf("%f\n ",x);
}
m/2 = = 3; Because m is plastic, the original plastic is not 3.5 but 3.
Similarly, 1/2 is not 0.5 but 0.
To change, x = (float) m/2+n * a/b+1.0/2.0;
The result is 28.0000.
Some people say that my program is hard to understand. How can I write the program in a standardized, concise and clear way?
A: This is a very important point in programming. We should develop good programming habits. Please look at an example: the program is very simple, and it is a clock program written in Turbo C, as follows:
/****************************************************
Module: clock
Just testing my programming ability.
*****************************************************/
# contains "math.h"
# contains "dos.h"
# contains "stdio.h"
# contains "graphics.h"
Master ()
{
char s[30];
int gdriver,gmode
int cosh,sinh,cosm,sinm,coss,sins
Structure; Time t;
char keydown = 0;
int x=300,y= 160,r = 40
clr SCR();
g driver = 9; gmode = 1;
init graph(& amp; g driver & amp; gmode," a:\ \ "); /* It should be noted that the third parameter a:\\ is the path of the file egavga.bgi */
/* Install the graphics device. The third parameter is the path of the driver */
setbkcolor(0);
Setcolor (white);
while( 1)
{
Circle (x, y, r); /* Draw a circle */
Line (x, y+r- 10, x, y+r-12);
line(x+r-4,y,x+r,y);
line(x-r,y,x-r+4,y);
Line (x, y-r+ 10, x, y-r+10+2); /* Draw fout scale */
gettime(& amp; t);
Sprintf(s, "Current time is %2d:%02d:%02d\n", t.ti_hour, t.ti_min, t.ti_sec, t);
outtextxy(0,0,s); /* out outputs the current time */
Outtextxy(0, 10, "This clock was written by Lijun"); /*? Show author */
Coss =(int)((r- 10)* cos(t . ti _ sec * 3. 14f/30-3. 14f/2)+x);
sins =(int)((r- 10)* sin(t . ti _ sec * 3. 14f/30-3. 14f/2)+y);
cosm =(int)((r- 19)* cos(t . ti _ min * 3. 14f/30-3. 14f/2)+x);
sinm =(int)((r- 19)* sin(t . ti _ min * 3. 14f/30-3. 14f/2)+y);
cosh =(int)((r-28)* cos((t . ti _ hour+(float)(t . ti _ min)/60)* 3. 14f/6-3. 14f/2)+x);
sinh =(int)((r-28)* sin((t . ti _ hour+(float)(t . ti _ min)/60)* 3. 14f/6-3. 14f/2)+y);
/* Calculate the positions of three points */
set color( 14);
line(x,y,coss,sins);
set color( 13);
line(x,y,cosm,sinm);
set color( 10);
line(x,y,cosh,sinh);
set color( 15);
/* Draw dots */
Sleep (1);
clr SCR(); & niobium
sp;
keydown = kb hit(); /* Check whether the key is pressed */
If (key)
{
closegraph(); /* Turn off the graphics device */
Exit (0);
}
}
}
;