Delphi level test papers (primary intermediate) sample

xiaoxiao2021-03-06  50

Delphi level test papers (primary intermediate) sample

I. Choice questions (40 channels)

1. When the user developer, you need to switch back and forth between the form and editor window, and you can use shortcut keys ().

A, F12 and F11

B, F12 and F13

C, F12 and Ctrl F12

D, F12 and Alt F12

E, F12 and SHIFT F12

2. A function is as follows:

Function Check (N, K: Integer): Integer;

VAR M: Integer;

Begin

Repeat

M: = N mod 10;

N: = N DIV 10;

K: = K-1

Until K = 0;

Check: = m

END;

If the statement Y: = Check (3725, 3) is called: ()

A, 7 B, 5 C, 2 D, 0

3. The following components cannot be edited by the user ()

A, TDIT

B, TcomboBox

C, tmaskedit

D, TLABEL

E, tstringgrid

4. An object class can inherit and directly use all of its parent class, except: ()

A, PUBLIC field

B, Private field

C, protected domain and private domain

D, protected domain and method

E, private domain and method

5. Delph has no file type ().

A, .frm

B, .pas

C, .dfm

D, .dpr

E, .RES

6. The SHAPE component is located on the () component board.

A, Standard

B, Additional

C, Data Controls

D, SYSTEM

E, Samples

7. The Query component does not have a Table component () attribute.

A, Datasource

B, TABLENAME

C, FILtered

D, Database

E, UPDATEOBJECT

8. The following is the correct thing about attributes ().

A, the property can implement the Write method

B, property performance Read method

C, attribute can read or write

D, attribute can be public or non-public

E, attributes can not access directly

9. When debugging, you need to perform the source code rows in the execution point and stay in the next source code line. The () menu item can be performed.

A, RUN

B, Step over

C, Trace Into

D, Trace to Next Source Line

E, Run to Cursor

10. Set A is a Boolean variable, the other is an integer variable, the following correct assignment statement is ()

A, x = y Div 7

B, x: = Y: = Z 1

C, A: = x = y mod z

D, X Y: = Z

E, x y = a

11. Expression Round (4.2) mod trunc (2.8) is ()

A, 0 B, 1

C, 2

D, 3

E, 4

12. The following constant definition is legal ()

A, const width = 7;

B, const case = '7';

C, const 1a = 7.9;

D, const century = year div 100;

E, Const 5 <> 7;

13. The following operators are the highest priority ()

A,

B, or

C,> =

D, DIV

E, -

14. A, B, C, D is known to be a simple variable of the same type, and there is already a value that is different from each other, and the following statement is performed: b: = a; A: = C; D: = a; D: = B After; the value of its value is ()

A, A, C

B, A, D

C, C, B

D, B, A

E, I can't determine

15. It is known to have a description var x: real; the error in the following block is: ()

Case x <= 2.0 of

0: x: = 0;

1: x: = 1

end

A, Case expressions have constants

B, CASE constants and case expression types are different

C, the type of two sides of the assignment statement is inconsistent

D, CASE expression is a relationship expression

E, CASE grammar irregular

16. The number of cyclic executions of the following statement is () x: = 37; Y: = 3

While y <= x do y: = y y

A, 3

B, 4

C, 5

D, 6

E, 0

17. Program for i: = 1 to 5 do

For j: = 2 to i do

Writeln ('*');

The number of outputted '*' is ()

A, 5

B, 10

C, 15

D, 25

E, 30

18. The following functions are legal ()

A, Function Total (X: REAL);

B, Procedure Ab (A, B: REAL): REAL

C, Procedure SUM;

D, Function F (VAR F: REAL): Integer;

E, Procedure FontlistBoxKeyDown (Sender: Tobject; VAR Key: Word; Shift: tshiftstate;);

19. The known functions are as follows: Function f (N: Integer): Integer; Begin

IF n = 0 THEN F: = 0

Else IF N> 0 THEN F: = f (n-2)

ELSE F: = f (n 3)

END;

The value calls f (5) is ()

A, 0

B, 1

C, -1

D, -2

E, 2

20. Legal in the following types is ()

A, TYPE A = 10..10;

B, TYPE B = 10..5;

C, TYPE C = 0..SQRT (10);

D, TYPE D = 10.0..20.0;

E, TYPE E = Random (9) .. 1

21. In the following types of variables, the variables that cannot be used directly in WRITE language are ()

A, Boolean variable

B, enumerated variable

C, integer variable

D, characters variable

E, long integer variable

22. Assuming Y is a collection variable, the type of variable X is the same as the base type of Y, the following expressions are incorrect ()

A, [x] in y

B, Y- [x]

C, [x] [] * y

D, y <= [x]

E, y mod [x]

23. A recorded domain identifier cannot be the same as () a, constant identifier as the following content.

B, record name

C, class name

D, the same level domain identifier

E, domain identifier of different layers

24. Var A: Array ['A'. 'E', 1..4, Boolean] of real; the number of elements contained in array A is ()

A, 5

B, 20

C, 40

D, 11

E, 22

25. VAR A: Array [1..10] of integer; k, i: integer; block:

K: = 1;

For i: = 1 to 10 do

IF a [i]> a [k] THEN

K: = i;

Writeln (a [k]);

The output is output ()

A, the average of arrays

B, the maximum value in the array

C, minimum in arrays

D, the sum of the arrays

E, I can't determine

26. Var f: file of integer is known; the file represented by F is ()

A, ASCII code file

B, binary file

C, text file

D, store integer text files

E, html file

27. In VCL () is the parent class of TDBListBox

A, TCUSTOMLISTBOX

B, TListbox

C, TDBDataSet

D, TDATABASE

E, tdbedit

28. To allow the control to display the pop-up prompt box text, you need to use the control () attribute

A, handle

B, Hint

C, showhint

D, showinge, visible

29. The event when the right left mouse button clicked in the control is ()

A, onmousedown

B, onmouseup

C, onclick

D, OndbClick

E, OneNter

30. The following value is not the possible value of the FormStyle property is ()

A, FSNORMAL

B, fsmidchild

C, fsmidform

D, FSSTAYONTOP

E, fsdesktop

31. () is the file management sub-routine A, Append and Insert included in Delphi.

B, append and mkdir

C, FileClose and INSERT

D, MKDIR and INSERT

E, getdir and insert

32. () is a group related to DDE

A, DDeServerConv / DDECLIENTCONV / DDESERVERITEM / DDECLIENTITEM

B, DDeServer / DDECLIENT

C, DDECONV / DDEITEM

D, DDECONV / DDSERVERITEM

E, DDeServer / DDECLIENT / DDSERVERITEM / DDECLIENTITEM

33. The advantage of using Delphi multi-thread is ()

A, the program is running speed

B. Do not need to consider synchronous access to shared resources and memory

C, the program is more simple

D, can run the thread in the background

E, it will not be Windows error

34. There are a variety of ways to place objects in the OLE document receiver, but not included ()

A, use a specific menu command to embed the object

B, paste the object from the clipboard to create a new embedded object

C. Paste from the clipboard - link object to establish a new embedded object

D, create a new object in the file generated by the server.

E, pass the ODBC interface, pass the object

35. Keywords for exception processing not include () a, try

B, Except

C, Finally

D, Raise

E, Error

36. The following statement is incorrect ()

A, VCL components are the most effective and useful components of Delphi

B, COM is the foundation of OLE and ACTIVEX

C, COM objects can be used for any Windows programming environment

D, the VCL component is a COM object

E, typical COM objects are included in the extension called .dll or .ocx file

37. Tcombobox component style attribute default is ()

A, csdropdown

B, CSSIMPLE

C, csdropdownloadlist

D, CSOWNERDRAWVARIABLE

E, CSOWNERDRAWFIXED38. Object Library "New Item" "New" tab can be created ()

A, Package, DLLS, Component, Web Server Application

B, Package, COM Object, Component, Web Server Application

C, Package, DLLS, Component, About Box

D, Package, DLLS, Component, DB Web Application Wizard

E, Package, DLLS, Component, Mid Application

39. Data types of value ranges from 0 to 255 in Delphi are () A, Shortint

B, byte

C, smallint

D, REAL

E, Word

40. The following statement is incorrect ()

A, do not have to respond to all events defined by a component

B, multiple components can share the same event handler

C, in response to any component events

D. Click the event handler name in the Object Inspector, and the Code Editor will automatically enter the code segment of the event.

E, the sender parameter of the event is used to determine which component has generated this event.

Second. It is a problem (20)

1. Select Project | Syntax Check Menu Options from the main menu, Delphi will compile any unit that has changed from the last compiled, and reports the incorrect encountered. ()

2. Delphi's VCL object is some of the pointers, allocating space from the stack, somewhat not. ()

3. When paste, if the component as a container has been selected, the components in the clipboard are pasted as sub-components of the container assembly ()

4. Adjusting any code in the form class declaration segment managed by Delphi will cause an error. ()

5. Delphi can use more than more than one in a report ()

6. Delphi can use traditional resources like other development tools, such as the menu can be loaded as a resource to facilitate a multi-language environment. ()

7. You can define the default value of the property when you create a component, but string properties cannot have a default. ()

8. Declare a constant, you cannot change the value of this constant in the program. ()

9. Configurations must be activated by an effective example through the class. ()

10. In the design phase Object Inspector Displays all the properties of the selected component. ()

11. In the Delphi IDE, hold down the Shift key, click the component icon on the Components Palette, you can place multiple similar components in the form. ()

12. To reduce the error in the programming, the user can use the system function IsValidIdent inspection string for the Delphi. ()

13. Users will be automatically cleared if they are not adding any code in a complete event response process, when saving or compiling the project. ()

14. Use Runtime Packages technology to decompose the originally independent executable into a dynamic link library plus small executable, which is the benefit of the disk space than a separate executable. ()

15. Delphi and VB cannot generate real executable code (native code), but Delphi developed programs faster than VB. ()

16. The properties of most components can be changed at runtime, and some can only change at runtime. ()

17. Saves the properties of the form and its components created in the user's Delphi project, and the extension of the DSK file is saved. () 18. The Find Error command for the Search menu is used to find the runtime error, not looking for compilation errors. ()

19.EnableD attribute does not apply to non-visual components. ()

20.Delphi uses an object-based reference mode, that is, each variable of the class does not save the value of the object, and saves a reference or a pointer to illustrate the memory location of the object store. ()

Three. Reform the wrong question (4 in total)

1. Point out the following code error and explain the reason:

VAR

I: integer;

L: long;

Begin

L: = 32768;

I: = L;

End.

2. Point out the following code error and explain the reason:

IF N> 37.5 THEN

Amountearned: = (N-37.5) * Hourlyrate * 1.5 37.5 * HourlyRate; Else

Amountearned: = N * Hourlyrate;

3. Point out the following code error and explain the reason:

While (Total

Do Statement1;

4. Indicate the following code error and explain the reason:

Procedure tform1.testbtnclick (sender: Tobject); var z, y, x: integer; begin x: = 100; y: = 0;

Try

z: = x DIV Y;

Except

ON EDIVBYZERO

DO Z: = - 1;

Messagedlg ('Z' INTSTOSTR (Z), Mtinformation, [Mbok], 0)

END;

IV. Questions (3)

1. In Delphi, what is the difference between the dialog box and the sub-window?

2. What is the purpose of using a private domain and method?

3. Let Activex work from INERNET Explorer when working on the webpage. The error is: "Your Current Settings Prohibit ActiveX Controls". What is this error?

5. Programming topic (2)

1. Calculates and outputs the number J j in the maximum number of pins (ie magnets) within 300 to 500, and 300 to 500, and outputs the result to file myData.dat.

2. Write the code in the TFORM1.MMACTIVE event, requiring a loop, with a different color continuous line with a random position on the screen.

Six. Design questions (a total of 1)

Design a practical Windows font selection list window. Claim:

1) Users can select fonts in the list box (TListbox)

2) Users can adjust the font size in the fine tuning box (TSPINEDIT)

3) The font and the size are displayed in the way they look.

转载请注明原文地址:https://www.9cbs.com/read-81657.html

New Post(0)