Font size
WorksheetsPreExam IT
Total questions: 105
Worksheet time: 9hrs 45mins
What is the default port of the MQTT protocol?
1883
8080
8000
8888
Layout or design of an android application is saved in...
.text file
.java file
.dex file
.xml file
What is the output of the following C program?
2
3
4
All are wrong
What is the output of the following C program?
1 2 3 4
1 2 4
3
None of those above
Underlying operating system for Android is
Linux
Windows
Contiki
Ubuntu
What is the output of the following C program?
80
30
10
None
What is WRONG about C programming language:
The interpreter Programming Language
The compiler Programming Language
The third Programming Language
The structured Programming Language
In gateway, to send a sensor value to the IoT Server server, which protocol is used?
MQTT Publish
MQTT Subscribe
FTP Upload
FTP Download
What is (are) advantage(s) of the Edge Computation?
Improve the system autonomous
Reduce the processing delay of the system
The system is more smarter with AI model at the Edge
All are correct
By default in android studio during app development, file that holds information about SDK, versions, application Id, etc. is
build.gradle
res/values
res/layout
AndroidManifest.xml
What is the required library for the wait effect?
import time
import delay
import pause
What is the output of the following C program?
1
4
10
20
What is the output of the following C program?
3 - 4
4 - 4
4 - 3
All are wrong
Method is called
when service was created first-time using onStartCommand() or onBind() is
onStart()
onCreate()
onRestart()
startService()
What is the central mechanism of the connection
between the IoT Gateway and the Feed?
request/response
ask/wait
publish/subscribe
Unable to determine
What is the output of the following C program?
10
15
7
6
What is the result after execution of the following code
if a is 10, b is 5, and c is 10?
a = 10, c = 10
a = 11, c = 10
a = 10, c = 11
a = 11, c = 11
A compiler translates
programming code into assembly code
programming code into machine code
processing time into manual time
routine into subroutine
Which of the following accesses the seventh element stored in array?
array[6];
array[7];
array(7);
array;
In order to control an IoT device (ON/OFF for an LED or a Motor),
which protocol bellow is the most suitable?
HTTP
FTP
MQTT
All are correct
The latency of data communication between the Feed and the IoT Gateway is:
Fast
Slow
Average
indeterminable
To randomly generate an integer, what library is used in Python?
import random
import randint
import rand
All of them are wrong
An interpreter translates
A whole program into machine codes and then, executes them
Every single instruction in a program into machine codes and then, executes this instruction
According to a programming language, a or b can be correct
All are correct
What is the right statement concerning the Internet of Things networks?
Numerous devices, wireless communications
and sharing/exchanging data
Network topology is normally stable, communications are based on TCP/IP architecture
All are correct
All are wrong
What will be the output of this program?
a = 20, b = 20
a = 10, b = 20
a = 20, b = 10
a = 10, b = 10
What is the default port of the HTTP protocol?
1883
8080
8000
8888
Concerning the Industrial 4.0, what is the name of the new Internet network?
Internet of Machines
Internet of Everything
Internet of Things
Internet of People
What is the output of the following C program?
10
11
100
101
What will the result of num1 variable
after execution of the following statements?
11
12
13
14
According to a proposed architecture for Internet of Things,
there are FIVE different layers, what are they?
Physics, Network Access, TCP/IP, Transport and Application layers
Physic, Network Access, TCP, IP and Application layers
Things, Connect, Collect, Learn and Do layers
All are correct
For a monitoring application based on IoTs and Android Things,
what are the typical components?
Sensor nodes and Smart phone app
Sensor nodes, gateway and Server
Sensor nodes, gateway, Server and Smart phone app
None of the above
What is the output of the following C program?
123
123 12
123 12 1
123 12 1 0
What is the output of the following C program?
24
12
10
4
A method that is used to handle what happens after clicking a button is
OnCreate
onSelect
onClick
onClick
What information is needed for Gateway programming?
Feed Key
Username
Active Key
All information above
In order to upload a file to server, which protocol is used?
MQTT
HTTP
FTP
All are correct
For a smartphone app,
when a toggle button, designed to control an LED, is clicked, the data is:
Publish to the IoT Server
Publish to the Python Gateway (running on a PC)
All are correct
What is WRONG about Python programming language:
The interpreter Programming Language
The compiler Programming Language
The third Programming Language
The OOP Programming Language
Which of the following gives the memory ad-
dress of the first element in array?
array[6];
array[7];
array(7);
array;
Which of these expressions
will make the right-most set bit zero in an input integer x?
x = x | (x-1);
x = x & (x-1);
x = x | (x+1);
x = x & (x+2);
What is printed to the console?
24
12
10
4
The concept of two functions with the same
name is known as?
Operator Overloading
Function Overloading
Function Overriding
Function renaming
Which of these expressions will return true if
the input integer v is a power of two?
(v | (v + 1)) == 0;
(v | (v – 1)) == 0;
(v & (v – 1)) == 0;
An interpreter translates
A whole program into machine codes
and then, executes them
Every single instruction in a program
into machine codes and then, executes
this instruction
According to a programming language,
a or b can be correct
All are correct
What is printed to the console?
101
10
500
None of them
What is printed to the console?
123
123 12
123 12 1
123 12 1 0
During system implementation the following
are done
programs are written and tested with
operational data
programmers are recruited and trained
the system is tested with operational
data
All are correct
What is printed to the console?
2 2 6 14
14 12 12 8
8 12 12 14
None of them
Among different steps to develop a program,
which step is the most time consumed?
Program specification, design and code
Program design and test
Program specification, document and
maintenance
Testing, document and maintenance
How many main() function we can have in our
project?
1
2
No Limit
Depends on Compiler
What will be the output of the following C++
code?
-5
10
5
0
Most popular general-purpose programming
languages (PL) today, such as C, C++ or Java
belong to:
The first generation PL
The second generation PL
The third generation PL
The fourth generation PL
Which of the given statements are false?
i. extern int func;
ii. extern int func2(int,int);
iii. int func2(int,int);
iv. extern class foo;
iii and iv only
ii and iii only
only iv
ii, iii and iv
What is the return values of sizeof(char) and
sizeof(int)?
1 and 4
1 and 2
1 and 8
None of them
What is the value of j at the end of
the execution?
10
7
6
4
Which reference modifier is used to define the
reference variable?
$
#
&
@
What will be the output of the following C++
code?
Compiler error!
30
870
Run time error
What is printed to the console?
80
10
30
None of them
What is the index number of the last element
of an array with 9 elements?
8
9
0
Programmer-defined
Which compilation unit is responsible for
adding header files content
to the source code?
Compiler
Preprocessor
Assembler
Linker
What is the right statement concerning the In-
ternet of Things networks?
Numerous devices, wireless communi-
cations and sharing/exchanging data
Network topology is normally stable,
communications are based on TCP/IP
architecture
All are correct
All are wrong
What are the values of n1 and n2 after the
swap() function is called?
n1 = 1, n2 = 2
n1 = 2, n2 = 1
n1 = n2 = 2
None of them
The most important attribute of a systems analyst is
excellent programming skills
very good hardware designing skills
very good technical management skills
very good writing skills
What will be the output of
the following C++ code?
6553
6522
6533
12200
What are the basic components in an moni-
toring applications based on Internet of Things
(IoTs) network?
Sensors, Server
Sensors, IoT Gateway, Server
Computers, Router, Server, Smart-
phone apps
Sensors, IoT Gateway, Server, Smart-
phone apps
Which of the following correctly declares an array?
int array[10];
int array;
array10;
array array[10];
What is the return values of sizeof(float) and
sizeof(double)
1 and 8
2 and 8
4 and 8
None of them
Some critical issues in the Internet of Things
network are:
The energy sources for a huge number
of connected devices
There are many wireless standards and
none of them is the best for many kinds
of IoTs applications
The network topology is normally
changed due to mobility devices
All of above
What is printed to the console?
1 2 3 4
1 3 2 4
1 2 4
None of them
Which of the following is important in
a function?
Return type
Function name
Both return type and function name
The return type, function name and
parameter list
Which format is used to store and transmit
numbers inside a computer system?
Decimal form
Binary form
ASCII code form
Alphanumeric form
What is printed to the console?
1 2 3 4
1 3 2 4
1 2 4
None of them
What is the correct definition of an array?
An array is a series of elements of the
same type in contiguous memory locations
An array is a series of element
An array is a series of elements of
the same type placed in non-contiguous
memory locations
An array is an element of the different
type
What is printed to the console?
2048
8402
22614
None of them
Which of the following is a correct identifier in
C++?
7var_name
7VARNAME
VAR_1234
$var_name
What are the values of all elements in the array
after this program?
1 2 3 4 5
5 4 3 2 1
1 4 3 2 5
None of them
Which instruction is executed by C/C++ Preprocessor?
#include<iostream>
return 0
void main(int argc , char ** argv)
None of above
Which of the following is used for comments in
C++?
// comment
/* comment */
both // comment or /* comment */
// comment */
Concerning the Industrial 4.0, what is the name
of the new Internet network?
Internet of Machines
Internet of Everything
Internet of Things
Internet of People
Numbers are stored and transmitted inside a computer in which format?
decimal form
binary form
ASCII code form
alphanumeric form
What is output of below code?
8,8
8,9
9,9
0,0
What is output of the second cout?
Total value is :300
Total value is :120
Both answers above are correct
Both answers above are incorrect
What should be the output of this program:
3.33
3.0
3
0
What is output of below program?
10
Compilation Error
11
0
What is printed to the console?
4-7
3-5
6-5
None of them
The computer or system peripherals
that receives data from processing unit are called...
Input Devices
Output Devices
Both (A) and (B)
None of the Above
Arduino Uno is :
A small scale of a micro-processor
A micro controller system
A ROM chip
All of above
What is printed to the console?
4-7
3-5
6-5
None of them
It starts with a /* and continues until a */
What does this do?
Loads a sketch
Makes comments
Compiles quicker
Makes stars appear
Before your program “code” can be sent to the board,
it needs to be converted into instructions that the board understands.
This process is called...
Stop
Compile
Create sketch
Serial monitor
What is output of this program?
I am One
I am Two
I am Three
I am not 1, 2 and 3.
What is the value of sum printed to the console?
15
10
9
None of them
What is printed to the console?
3-3
3-5
5-3
5-5
What is printed to the console?
4-7
4-5
6-5
None of them
What will be the output of the following C
code?
1 2
Compile time error
1 2 1 2
Depends on the compiler
...is the signal or data received by the system:
Error
Exception
Output
Input
What is output of below program?
5
10
15
25
In order to declare an array having 3 elements,
what is the correct answer?
int array[3];
int array[3] = {1,2,3};
int array[] = {1,2,3};
All of these above
What are the values of a and b after executing
this program?
a = 2, b = 3
a = 4, b = 4
a = 3, b =5
None of them
What is the meaning of below lines? void sum
(int, int);
sum is function which takes int argu-
ments
sum is a function which takes two int
arguments and returns void
it will produce compilation error
Can’t comment
What is output of below program?
0--01--12--23--34--
00--10--20--30--40--
00--01--02--03--04--
Compilation Error
...is comprised of programs that perform
specific tasks for users.
Hardware
Application software
Free-ware
System software
What is output of the first cout?
Total value is :120
Total value is :300
Both answers above are correct
Both answers above are incorrect
What is output of below program?
55
1
0
25
What are printed to the screen of the bellow
program?
1, 4, 7, 10
1, 4, 7
1, 4, 7
1, 4, 7
