Multiple choice questions: (40 points)
The following compilers support 5 1 single chip microcomputer is A) keil 2.
The following compilers support PIC microcontroller is D) mplab.
The following compilers support ARM: C) ADS 1.2.
The following is not an embedded operating system, but C) winxp.
The following is the embedded operating system: B) ucosii.
C source programs usually get that kind of file after compilation D) obj
C source programs usually get that kind of file A) exe after compiling links.
To make the C source program run on 5 1 or PIC microcontroller, you need to generate that file A) bin.
EXE files generated by C can be debugged in one of the following ways b) Debugging.
EXE files generated by C can be obtained by the following methods: d) disassembly.
Under windows, C can generate EXE files, but the following compiler cannot A) keil 2.
Under the linux operating system, the commonly used compiler of C is D) gcc.
In the general C application of 5 1 PIC microcontroller, the common C program is actually a) infinite loop.
When c contains only one function, the function name must be C) main.
set int x = 1 1; The value of the expression (x++ * 1/3) is
a)0 B)3 C) 1 1D) 12
What is incorrect in the following statement is that d) the variables defined in the compound statement within the function are valid within the scope of the function.
In keil2, if a pointer char *p is defined, the data format pointed to is B) char.
In keil2, if a pointer char *p is defined, then the byte length occupied by the pointer itself is C) 3.
Define int str [12] [9]; Which of the following statements about str[9] is false A)str[9] and&; Str[9][0] is equal to
Among the following input statements about the character array str, the correct ones are a) scanf ("%c ",&; str[0]);
If there are the following definitions and statements: int a[ 10]={ 1,2,3,4,5,6,7,8,9, 10},* p = a; ? Then the expression that can't represent the array elements is c) * a.
Incorrect string assignment or initialization methods in the following program fragments are c) charstr [7] = {'s',' t',' r',' i',' n',' g',' \ 0'};
The following statement is correct: d) When the expression after while is zero, the loop consisting of do-while statements ends.
C language statement "char * line [5];" A) line is an array, and each element of the array is a pointer variable pointing to a character type;
C language programs are executed from _ _ _ _ _ _. The first sentence in the program
In the following identifier groups, the legal user identifier is _ _ _ _ _ _ _ _. B. b_ 1、a 10
The following constants indicate that _ _ _ _ _ _ is incorrect. B. '\55 '
The storage space length of various basic data types in C language is arranged as char≤int≤long≤float≤double.
The output of the following program is _.
Master ()
{
char x = 060
printf("%d\n ",x);
}A. 48
Let x and y be int variables, and the output value after executing the following statement is
x = 15;
y = 5;
printf("%d ",x % =(y/= 2)); B. 1
Let the values of real variables F 1, F2, F3 and F4 all be 2, and the values of integer variables a and b all be 1. Then the expression (a = f 1
Let A and B be integer variables, and execute statements b=(a=2+3, a*4), A+5; After that, the values of a and b are.
A.5, 10
For the following three statements (where s 1 and s2 are embedded statements), the correct statement is.
if(a)s 1; Otherwise s2
if(a = = 0)S2; else s 1
If (a! = 0)s 1; Otherwise s2
A. the three are equivalent to each other.
The output of the following program is _ _ _ _ _ _ _
# include & ltstdio.h & gt
Master ()
{ int y =-9;
And (++y);
printf("y=%d\n ",y);
}A. y=0
The effective measure to exit the loop statement (without terminating the execution of the function) is B. Use the continue statement.
When using the function sin () in the source program, you should first include the _ _ _ _ _ _ _ header file with the include command. mathematics
The array name is passed to the function as a parameter, and the array name is treated as _ _ _ _ _ as an argument. The first address of the array.
The output of the following program is.
Master ()
{ int a[ 10]={ 1,2,3,4,5,6,7,8,9, 10},* p = a;
printf(" % d \ n " ,*(p+3));
}B. 4
If there is the following statement, it is known that the int type accounts for two bytes, then the number of bytes occupied by the structure variable stud is.
Structure st
{
char a[8];
int b;
Floating c;
};
Structural bolts; C. 14
Short answer questions (40 points)
What does 1.IDE usually refer to in software development?
integrated development environment
2. Please name more than five common development environments that support C?
TubroC,BorlandC,Delphi,Visual C,KeilC
3. Common C program development process?
Edit-Compile-Link-Debug-Compile- ...
4. Please name more than three common embedded operating systems?
uClinux,RTX,Vxworks
5. What are the characteristics of embedded operating system?
Cutable, curable and easy to transplant.
6. The development environments supporting 5 1 MCU, PIC MCU and ARM7 are listed respectively.
Kyle ·MDK· Eminem
7. In KEIL2, which storage area do the definitions of idata, code and xdata refer to?
All internal RAM areas, internal ROM areas and external RAM areas.
8. How does 8.Turbo C2.0 compile the connection program? How to run the program? How to observe the running results of the program? How to rename and save the source program?
In the compile menu, select the compile command to complete compilation, select the link command to complete linking, select the RUN command under the DEBUG menu to run the program, Alt+F5 to observe the running results, and select Save AS in the File menu to complete renaming and saving.
9. In C language, from the scope of variables, which two types of variables can be divided?
Global variables and local variables
Essay questions (20 points)
1. Read the following program, explain the function of this program in embedded C, and analyze the similarities and differences between embedded C and standard C?
Void delay_ms (unsigned integer millisecond)
{
Unsigned int i, j;
for(I = 0; I & ltms;; i++)
for(j = 0; j & lt 1 14; j++)
;
}
This is a delay subroutine. Compared with standard C, embedded C adds bit variable data types, increases data storage space constraints, and deletes time-related library functions. It is an extension of standard C language in the field of embedded development.
Welcome to criticize and correct me.