Best blackberry Objective questions
1. In what situation would you need to have a debug token installed for you to be able to load debug applications?
A. To run or debug unassigned applications
B. Installing release builds
C. Both of these
D. Neither of these
Ans: A
2. Consider the following in C++: namespace myNamespace { int a; int b; } How would the main part of the program access myNamespace variable a?
A. myNamespace::a
B. myNamespace:a
C. myNamespace.a
D. a
Ans: A
3. What must users utilize to bring their headless apps associated UIs to the foreground?
A. The app service.
B. The UI service.
C. The foreground service.
D. The notification service.
Ans: D
4. Why must an object id value always be unique within a single component?
A. Object ids don’t have to be unique.
B. Because object ids are referred from anywhere within the component in which it is declared.
C. Because object ids are referred from external components in which it is declared.
D. Because object ids are deleted from within the component in which it is declared.
Ans: B
5. In order to use the functionality that the Image API offers, you must do what?
A. Use the available methods in your code
B. Import the Image.h header file
C. Include the io/io.h header file
D. Use io.open() and io.close() to open and close an input string
Ans: D
6. An instant messaging client is an example of what kind of app?
A. A headless, long-running app.
B. A headed, long-running app.
C. A headless, short-running app.
D. A headed, short-running app
Ans: A
7. Within a signal handler, what does JavaScript determine?
A. It determines what your app will do in response to a sub-element.
B. It determines what your app will do in response to a signal.
C. It determines what your app will do in response to an object.
D. It determines what your app will do in response to an element.
Ans: B
8. If you need your app to continue running despite it not being visible, what permissions must be changed in what file?
A. The run_when_backgrounded parameter must be changed in the bar-descriptor.xml file.
B. The run_when_backgrounded parameter must be changed in the bar.xml file.
C. The when_backgrounded parameter must be changed in the bar-descript.xml file.
D. The run_backgrounded parameter must be changed in the descriptor.xml file.
Ans: A
9. When multiple properties are specified on a single line, what must they be separated by?
A. Comma
B. Semicolon
C. Hyphen
D. Colon
Ans: B
10. What control emits the clicked() signal?
A. Click
B. Button
C. Signal
D. Invoke
Ans: B
11. What function hides the page on the top of the stack, then removes it from the navigation stack and displaying the previous page again?
A. stack()
B. push()
C. pull()
D. pop()
Ans: D
12. Choose the C++ statement which declares a function with a default value for an argument.
A. void function(int a)
B. void myfunction(int a;a = 2)
C. void myfunction(int a)
D. void myfunction(int a=2)
Ans: D
13. What is the proper syntax for importing the geoMonitor.h header file?
A. include geoMonitor.h
B. #include
C. geoMonitor.h
D. #include geoMonitor.h
Ans: B
14. What is required of id syntax?
A. It must must begin with an upper-case letter or an underscore, and only contain letters, numbers, and underscores.
B. It must must begin with a roman numeral or an underscore, and only contain letters, numbers, and underscores.
C. It must must begin with a number or an underscore, and only contain letters, numbers, and underscores.
D. It must must begin with a lower-case letter or an underscore, and only contain letters, numbers, and underscores.
Ans: D
15. In the Momentics IDE, what is the difference between a workspace and a perspective?
A. A workspace is a collection of projects whereas a perspective is a layout of views in the IDE
B. A perspective is a collection of projects whereas a workspace is a layout of views in the IDE
C. A perspective and a workspace refer to the same thing
D. A perspective lives outside the IDE whereas a workspace lives inside an IDE
Ans: A
16. What does ComponentDefinition represent?
A. An imperative way to create dynamic components in QML.
B. A unique way to invoke rootContainer.
C. A method for placing calls within a single container.
D. A unique way to use ControlDelegate to load QML.
Ans: A
18. Which of the following are examples of UI controls?
A. Page, Contractor, Button, List
B. Page, Container, Button, Label
C. Port, Container, Button, Label
D. Purge, Maintainer, Button, Label
Ans: B
19. What is the syntax for signal declaration?
A. Q_SIGNALS: void textChanged(QString text);
B. void: textChanged(QString text); Q_SIGNALS
C. Q_SIGNALS: void (QString text)textChanged;
D. (QString text)Q_SIGNALS: void textChanged;
Ans: A
20. How do you put your phone into Development mode?
A. Settings > Blackberry ID > Development Mode
B. Settings > Blackberry Project > Development Mode
C. Settings > Blackberry Bridge > Development Mode
D. Settings > Security > Development Mode
Ans: D
21. Which C++ statement assign
s to variable a the address of variable b?
A. a = *b;
B. a = &b;
C. a = “b;
D. a = b;
Ans: B
22. Which of the following are property types that QML supports?
A. cos, real, sin, strung
B. ing, read, boot, strong
C. int, real, bool, string
D. ins, read, book, strap
Ans: C
23. Select the correct statement about the Model and the View features.
A. The Model holds the raw data and does not worry about the display, whereas the View is responsible for rendering the data on the display
B. Neither the View and the Model are responsible for rendering the data on the display
C. Both the View and the Model are responsible for rendering the data on the display
D. The View holds the raw data and does not worry about the display, whereas the Model is responsible for rendering the data on the display
Ans: A
24. When a property is set to relative, what happens to the child object value when the parent value is changed?
A. It is deleted.
B. It is updated automatically.
C. Nothing happens.
D. The child object generates more child objects.
Ans: B
25. What is one way that properties are specified?
A. One-per-line.
B. One-per-page.
C. One-per-unit.
D. Two-per-line.
Ans: A
26. When a CheckBox control’s check state signal changes, what signal does it emit?
A. checkedChanged()
B. “(checkedChanged)”
C. Changed()checked
D. ‘checkChanged()’
Ans: A
27. True or False? An AutoConnection will automatically detect if the slot is in an object on another thread and make the queued connection.
A. True
B. FALSE
Ans: A
28. What are JavaScript expressions used for within the QML language?
A. They are used to assign property ids.
B. They are used to assign object values.
C. They are used to assign property values.
D. They are used to assign element values.
Ans: C
29. What is Cascades?
A. A set of QML standards
B. A portion of BlackBerry’s Native SDK
C. Slang for CSS
D. APIs that BlackBerry provides to help developers produce functional UIs out of the box
Ans: D
30. How would you declare a pointer which has no type in C++?
A. int * data;
B. void * data;
C. null * data;
D. void data;
Ans: B
31. Which of the following is not a correctly written id value?
A. id_1
B. idvalue_1
C. ID:_1
D. text1
Ans: C
32. Why is it important to use comment marks within QML syntax?
A. Comment marks tell the compiler to stop processing data.
B. Comments must be marked appropriately so the compiler can tell the difference between your comments and your code.
C. Comment marks tell the compiler to stop processing data and start at the beginning.
D. Comment marks tell the compiler to add the comments into the compiling of the program.
Ans: B
33. When creating a member function that needs to function as a slot, what section must you place the function declaration?
A. It must be placed in the public slots: section.
B. It must be placed in the private slots: section.
C. It must concatenate the public slots: section.
D. It must be routed to the public slots: section.
Ans: A
34. Choose the best description of the following configuration: Dialog* pMyDialog = Dialog::create() .content(Container::create()) .onClosed(this, SLOT(onClosedHandler()) .open();
A. Defining a Slot in QML
B. Defining a Dialog in QML
C. Defining a Dialog in Javascript
D. Defining a Dialog in C++
Ans: D
35. The _______ file is the main piece of the UI (the root of the visualization of the program).
A. App.cpp
B. App.qml
C. Main.cpp
D. Main.qml
Ans: D
36. True or False? You can only debug on a simulator.
A. TRUE
B. False
Ans: B
37. What is the correct order when setting up an event que for requesting and listening for events?
A. Use any service at any time, Listen for events, Start the library, Request events to flow into the event queue
B. Request events to flow into the event queue, Start the library, Use any service at any time, Listen for events
C. Listen for events, Use any service at any time, Request events to flow into the event queue, Start the library
D. Start the library, Request events to flow into the event queue, Use any service at any time, Listen for events
Ans: D
38. What static function do you use to connect a signal to a slot with C++?
A. object;;connect()
B. QObject::connect()
C. Qbject::connecter()”
D. Qobject;:connect()}
Ans: B
39. When adding multiple comments, what must be at the beginning and end of the line?
A. */ at the beginning, and /* at the end.
B. || at the beginning, and || at the end.
C. “ at the beginning, and “ at the end.
D. /* at the beginning, and */ at the end.
Ans: D
40. Which of the following can QML access from C++?
A. Only slots and signals
B. Functions, slots, signals and properties
C. Only functions and slots
D. Only signals and properties
Ans: B
41. Which of the following are examples of headless, short-running apps?
A. Post-directed SOS message receivers, fine-grained location trackers, or uploaders.
B. Port-directed SMS message receivers, coarse-grained location trackers, or downloaders.
C. Part-directed SNS message receptors, coarse-grained location tricklers, or downloaders.
D. Data-directed MSM message receivers, fine-grained location trackers, or downloaders.
Ans: B
58. If the value of a slider changes, what signal is emitted by the Slider control?
A. ValueChanged()immediate
B. ValueChanged()
C. immediateValue()
D. immediateValueChanged()
Ans: D
59. How are JavaScript inline functions added to QML elements?
A. They are added as units.
B. They are added as functions.
C. They are added as methods.
D. They are added as objects.
Ans: A
60. The BBM Social Platform uses a(n) ____ programming model.
A. event driven
B. threads
C. object oriented
D. procedural
Ans: A
61. Which of the following is not a field that messages can include?
A. data
B. subject
C. body
D. sender
Ans: A
61. When your QML property is type-safe, what must be matched with the property type?
A. Its hierarchy.
B. Its ranking.
C. The value.
D. Its inheritance
Ans: C
62. Which of the following properly displays the syntax to import JavaScript code into the temperature conversion app?
A. import TemperatureFunctions.convertTemp(tempInport.t
B. TemperatureFunctions.convertTemp(tempInport.t
C. import “tempFunctions.js” as TemperatureFunctions
D. import tempFunctions.js as “TemperatureFunctions”
Ans: C
63. Which of the following is NOT a perspective in the Momentics IDE?
A. QML System Information perspective
B. QNX System Information perspective
C. Debug perspective
D. QML Editing perspective
Ans: A
64. Which of the following is NOT true about Cascades?
A. It provides the look and feel for Blackberry
B. It is a replacement for the Qt Quick
C. It provides advanced placement management of components
D. It does NOT use QML
Ans: B
65. When a property has be declared as a default property, what can be done to the property tag?
A. It must be replaced with a new tag.
B. It can be omitted.
C. It needs a secondary child property tag similar to its default property tag.
D. You must set up new property tags.
Ans: B
66. By default, long-running headless apps have a short run time. What permissions must be changed to extend their run time?
A. The _sys_headed_nostop permissions.
B. The _sys_headless_nostop permissions.
C. The _sms_headless_nonstop permissions.
D. The _sjs_head_stop permissions.
Ans: B
67. Once you have created an object, when is it necessary to change its id?
A. It is necessary to change its id before runtime binding.
B. The id must be changed at compile time.
C. You must change it before you cycle the app for the first time.
D. It is never necessary and cannot be changed.
Ans: D
68. Which of the following is NOT true about the QString Qt class?
A. Does not work with QChar
B. It allows access to individual characters
C. It can be initialized with UTF16 character array
Ans: A
69. What type of exceptions will the following C++ function throw: int myfunction (int a) throw();?
A. Int
B. All
C. None
Ans: C
70. The acronym PPG stands for:
A. Platform Proxy Gateway
B. Push Payload Gateway
C. Push Proxy Gateway
D. Proxy Push Gateway
Ans: C
71. The frame around the display area of the screen is called what?
A. Device canvas.
B. Device bezel.
C. Devise easel.
D. Device box.
Ans: B
72. What trait should signals have if you want to provide simple interactions in your apps?
A. They should be sanitized.
B. They should be predefined.
C. They should be encapsulated.
D. They should be sandboxed.
Ans: B
73. Which of the following is not a step in loading a QML document from C++?
A. QObject::setProperty()
B. Application::setScene()
C. QmlDocument::create()
D. QmlDocument::createRootObject()
Ans: A
74. True or False? The MOC can’t convert macros defined by Qt into C++ code.
A. False
B. TRUE
Ans: A
75. Which of the following Core Qt classes does NOT use implicit sharing?
A. QObject
B. QString
C. QList
D. QImage
Ans: A
76. Which of the following lines of code are depicting an attached property?
A. (“Width has changed to:”, width)onWidthChanged: console.log
B. (“Right mouse button pressed”)console.log
C. onWidthChanged: console.log(“Width has changed to:”, width)
D. color: ListView.isCurrentItem ? “red” : “blue”
Ans: D
77. If you wanted to connect a smoke detector and sprinkler system, what would logically be the syntax for its slot?
A. ()))SLOT(dispenseWater
B. SLOT(signalWater()))
C. (dispenseWater()))SLOT
D. SLOT(dispenseWater()))
Ans: D
78. When an application does not have permission to run in the background the application lifecycle includes the A
A. Background State
B. Foreground State
C. Terminal State
D. Stopped State
Ans: D
79. Why is it important to not allow untrusted data to be appended when using the QScriptEngine class?
A. The new content might affect the performance of scripts
B. The class is not equipped to handle appended data and this could result in a fatal error
C. This could compromise your data model
D. The untrusted data could result in malicious activity
Ans: D
80. Objects within QML are specified by what?
A. They are specified by their type.
B. They are specified by their shape.
C. They are specified by their value.
D. They are specified by their order
Ans: A
81. Of the following, which is a properly written property value?
A. (height: (50 + 22))
B. height: 50 + 22
C. Height: {50 + 22}
D. height= 50 + 22
Ans: B
82. In C++, can you use the same signal handlers for predefined signals that you use in QML?
A. Yes. You must first connect the signal to an existing slot of another class, then define your own slot to handle the signal.
B. No.
C. No. You must either connect the signal to an existing slot of another class, or define your own slot to handle the signal.
D. Yes
Ans: C
83. When the following code is added to the .pro file, what does it do? LIBS += -lbbplatform
A. Adds different platform features to your app
B. Adds necessary all libraries
C. Links header files
D. Links classes
Ans: D
84. Where does the compiler first look for file.h in the following C++ directive: #include “file.h” ?
A. None of thee
B. The same directory that includes the file containing the directive
C. In the default directories where it is configured to look for the standard header files
D. In all directories specified by the PATH environment variable on the machine
Ans: B
85. The class QAbstractEventDispatcher is apart of the QTCore. The QAbstractEventDispatcher Interface to manage QT’s ___ ___.
A. event queque
B. object events
C. change events
D. event dispatcher
Ans: A
86. The QTSql Module contains the QSqlClassRelation class. What does this class do?
A. It stores information about an SQL foreign key
B. It stores information about an SQL foreign key
C. It is an editable data model for a single database table
D. It’s the base class for SQL driver factories
Ans: B
87. What is the maximum number of items that can be contained within an Application menu
A. 10
B. 5
C. There is no limit
D. 3
Ans: B
88. Below is the default property of the Dialog control. Please select the true statement: Page { attachedObjects: [ Dialog { Container { Button {} Button {} } } ] }
A. A control added inside the Dialog will not automatically be assigned to the content property
B. This property needs to be explicitly declared in the QML
C. This property does NOT need to be explicitly declared in the QML
D. None of these
Ans: C
89. Which layouts allow objects to overlap?
A. Dock layout
B. Absolute layout
C. Stack layout
D. Dock and Absolute layout
Ans: C