1. Which of the following are the valid DeviceType property values for the TMediaPlayer component?
2. Which of the following are valid identifier names for a variable?
- Cust no5
- custno 5
3. TDataSet is a base class from which other database components are inherited to encapsulate which database object(s)?
- A Table
- A Trigger
- A Field
- A Query
- A DBAware Component
- A Stored Procedure
4. Which of the following will add text to a TMemo component called Memo1?
5. What is the purpose of the AutoMerge property in the TMainMenu component?
- It determines if main menus of secondary forms merge with the main menu of the main form in non-MDI applications at runtime
- It determines if sub menu items are automatically merged with the parent menu items if there is only a single sub menu item
- It determines if the main menu items can be automatically resized at runtime so that they provide a “best fit” in a resizable form
- It determines if the TMainMenu component can correct menu item short cut key conflicts with existing Windows short cut keys
6. What component is used to link two datasets in a master/detail relationship?
7. Which of the following will link a TUpDown control named UpDown1 with an Edit box named Edit1, allowing the TUpDown control to modify the values in the Edit box?
- UpDown1.Associate := Edit1;
- UpDown1.Link := Edit1;
8. What is the purpose of the “Break” procedure?
- It causes the flow of control to exit the current function or procedure and execute the next logical code statement
- It causes the current thread to suspend execution to allow other threads to operate
- It simulates the user pressing the Break key on the keyboard
- It causes the flow of control to exit a loop and continue at the next statement following the loop
9. For a TQuery component called Query1 with SQL of “Select * from Student Where Number=500”, which of the following is the correct method to run the query?
10. What does the Cancel property of the TButton object do?
- It automatically displays Cancel as the button caption
- It determines if the button’s OnClick event handler is called when the Escape key <Esc> is pressed on the keyboard
- It calls the parent forms’ OnClose event
- It causes a popup menu to be displayed when the button is clicked which permits the user to select Cancel
11. Which property of TBitBtn allows you to specify what image to display on the button?
12. What is the value of the variable int_temp after the for loop has ended in the code shown?
- The value of int_temp is undefined
13. Which of the following will connect a DataSource to a Table where the Datasource component is call DataSource1 and the Table component is called Table1?
14. Which of the following is a event of TPanel?
15. Given the code “Edit1.Hint := ‘Customer Name|Enter Customer Name in the edit box’;”, which of the following is the correct code to retrieve the text after the | character, i.e. “Enter Customer Name in the edit box”, when the OnHint handler is called?
16. Which three properties of TProgressBar are responsible for setting the minimum, maximum and current position for the control?
- Maximum, Minimum & Percentage
- Maximum, Minimum & Position
- Max, Min & Position
- Max, Min & Pos
17. What does the code shown do?
- Creates an array to store two Integers
- Creates an array to store two Variants
- Creates an array to store one hundred Integers
- Creates an array to store ninety nine Integers
18. What happens if the TreeView1.Items list is empty when the code “TreeView1.Items.AddFirst(TreeView1.Items,’X’);” is executed?
- An X appears as the top most node in the TreeView
- An “Index is out of bounds” error message is displayed
- An ETreeViewError exception is raised with the message ‘Invalid Index’
- An X appears as a sub node to the first node in the TreeView
19. Given a TPageControl component called PageControl1 with three TabSheets called TabSheet1, TabSheet2 and TabSheet3 (in that order), which of the following will make TabSheet2 selected?
20. Given that x and y are variables declared as type Char, which of the following is NOT a valid Pascal assignment statement?
- x := y;
- x := Char(Ord(Y)+1);
- x := Char(#22);
- x := y + #22;
21. Which of the following is the correct code to cause a popup menu named Popupmenu1 on a form called Form1 to be displayed?
22. How does a TRichEdit differ from a TMemo?
- TRichEdit prevents users from overwriting existing text, whereas TMemo does not
- TRichEdit allows saving directly to text files, whereas TMemo does not
- TRichEdit prevents font attributes from being changed by the user, whereas TMemo does not
- TRichEdit allows font attributes to be set, whereas TMemo does not
23. Which of the following is the correct method to activate a modal open dialog box when using the TOpenDialog component?
24. Which of the following is the correct code to create an object from class TMainForm?
- Application.CreateForm(TMainForm, MainForm);
25. What files end with the .dpk extension?
- Unit Source files
- Project Source files
- Package Source files
- Delphi Library
26. What is the main difference between TLabel and TStaticText?
- TStaticText has a Window Handle and can accept focus whereas TLabel does not have a Window Handle and cannot accept focus
- TStaticText allows the user to edit the text displayed whereas TLabel does not allow the user to edit the text displayed
- TLabel’s caption property can be changed programmatically whereas TStaticText’s Caption property cannot be changed programmatically
- TLabel does not have a ShowAccelChar property whereas TStaticText does have a ShowAccelChar property
27. Which of the following changes a TDBNavigator component called DBNavigator1 so that it only displays navigation buttons?
- DBNavigator1.VisibleButtons := [nbFirst,nbLast,nbPrior,nbNext];
- DBNavigator1.NavigationOnly := True;
- DBNavigator1.Buttons := [nbFirst,nbLast,nbPrior,nbNext];
- DBNavigator1.Constraints := [nbFirst,nbLast,nbPrior,nbNext];
28. Which of the following retrieves the value from the SNumber field as a string for the current record in an open Table called Table1?
29. What value is displayed on screen when the procedure test is called?
30. What is the purpose of the Alignment Palette?
- To change the order or position of the components in the Visual Component Library
- To align the main IDE Windows to each other
- To align components to the form, or with each other
- To set the alignment property of any components on a form
31. Which of the following would cause all the items in a RadioGroup to be appended so that all items appear twice?
32. Which of the following is the correct code to cause a form named Form1 to be displayed as modal?
33. Which of the following is the correct code to “tick” a TCheckBox component called CheckBox1 as shown?
34. What does the TDBLookupComboBox component do?
- It allows a field value to be selected from a TList object specified by the programmer
- It performs a search for a field with the same name as the text entered
- It allows the selection of a database from a list of those found on a network
- It identifies a set of field values in one dataset with a corresponding set of values from another dataset
35. From the code shown, how many times would the ShowMessage procedure be called if the button in question was clicked three (3) times?
36. In the code shown, TMyClass inherits from which parent class?
- Inheritance does not take place
37. Which of the following removes the SQL statement from a TQuery component called Query1?
38. What does the code shown do?
- Loads the number 1 into the DH register
- Loads the number 1 into the dh variable
- Loads the character ‘1’ into the dh variable
- Loads the value in the dh variable into the DH register
39. Which of the following is NOT an event of the TApplicationEvents component?
40. When will the code “Application.Terminate;” be executed in the code shown?
- When the user presses the Cancel button
- Every time the procedure is executed
- When the user presses the Ok button
41. What is the shortcut key for manually displaying the code completion window while entering code?
- CTRL + SPACE
- CTRL + ESC
- CTRL + ALT + TAB
- CTRL + Page Down
42. The TTimer component has a property which determines how frequently the OnTimer event occurs. Which of the following is that property and what does the property measure?
- Property: Time, Measured in: Seconds
- Property: Timer, Measured in: Hundreds of a second (1/100 Sec)
- Property: Interval, Measured in: Milliseconds (1/1000 Sec)
- Property: Tick, Measured in: Clock Ticks
43. Given a ComboBox named ComboBox1 and an Edit box named Edit1, which of the following is the correct code to add the information in the Edit box to the drop down list in the ComboBox?
- ComboBox1.Strings := ComboBox1.Strings + Edit1.Text;
44. Which of the following properties when set to True, enables an application to gain sole access to a database?
45. What is the purpose of Code Templates?
- To provide easy access to commonly used programming statements
- To allow the creation of Document Templates from existing source code
- To provide easy access to Native Databases without using components
- To allow the conversion of selected code to a procedure
46. What does the procedure shown do?
- It moves the contents of the file c:autoexec.bat to the file c:outfile.txt
- It moves the contents of the file c:outfile.txt to the file c:autoexec.bat
- It copies the contents of the file c:autoexec.bat to the file c:outfile.txt
- It copies the contents of the file c:outfile.txt to the file c:autoexec.bat
47. What is the purpose of the TDataModule?
- To provide a login to a secured or an encrypted database
- To provide a temporary storage area of query results
- To provide a location for centralized handling of non-visual components
- To provide a connection to a remote database server
48. What is the purpose of the AlphaBlend property of TForm?
- It specifies the background color of the form
- It specifies if the form is translucent or not
- It specifies if the form is available for drawing on via TCanvas
- It specifies the redrawing speed of the form
49. What is the purpose of the Initialization section of a Unit?
- It contains assembly code that is executed on PC startup
- It contains statements that are executed on unit start up
- It contains Window handling code
- It contains program management code and should not be edited directly by a programmer
50. Which key toggles between the Object Inspector and the Edit Window / Form?
- ALT + O
- CTRL + ALT + TAB
816 total views, 7 views today