Professional Documents
Culture Documents
Parallel processing.
Multitasking.
All of above.
Multiprocessing.
What should be printed on screen? if(-1 == -1) cout<<"LOVE PAKISTAN'; else cout<<T;
Select the correct option
I
LOVE PAKISTAN
I LOVE PAKISTAN
Compilation Error.
int a=15; if (a <15) cout << "a"; else cout << "abc": What would be the output?
Select the correct option
abc
aabc
15
Which of the following is the correct way to declare a variable named shipping_price which will store the price converted from
dollars which is not necessarily a whole number.
Select the correct option
float shipping_price;
char shipping_price;
int shipping_price;
boolean shipping_price;
In _______ paradigm, a program is developed by connecting predefined functions so that each functions outputs are used as
another functions inputs in such a way that the desired overall input-to-output relationship is obtained.
Select the correct option
imperative paradigm
functional paradigm
declarative paradigm
object oriented paradigm
An object is a part of a particular class is also known as a/an _______ of that class.
Select the correct option
case
instance
part
type
Choose the correct type of array to store the data given below.
50.5
60
70
70.8
Select the correct option
float number[5]
int number[5]
float number[6]
int number[6]
80
A two-dimensional array of integers named Scores having two rows and nine columns will be declared as:
Select the correct option
int Scores [9][2];
int Scores 2][9]:
int Scores[9]/[2]:
int Scores[2]/[9];
If a program is installed on two different machines and by making small changes it can be used on both. This is known as
Select the correct option
disadvantage of machine independence
disadvantage of machine dependence
goal of machine dependence
goal of machine independence
A compiler translates
code to machine language at a time.
Select the correct option
complete
module by module.
one by one each instruction
function by function
Start finding an algorithm and then express that algorithm in sequence of commands. This approach is known as
Select the correct option
functional paradigm
imperative paradigm
object oriented paradigm
declarative paradigm
The programmer develops a precise statement of the described problem to be solved rather than describing an algorithm. This
approach is known as
Select the correct option
declarative paradigm
functional paradigm
object oriented paradigm
imperative paradigm
In 2018, Welsch NHS a UK hospital software was failed because of the_______ issue.
Select the correct option
security
graphical
architectural
technical
If we are using sequential search algorithm and required element lies at the end of the list, then it will be considered.
Select the correct option
Best case scenario
Worst case scenario
Average case scenario
Medium case scenario
Difference between software program believed to be correct and the software program that is correct is known as
Select the correct option
Software Verification
Software Compatibility
Software Correctness
Software Validation
Insertion sort
elect the correct option
deletes elements in a list.
combines two lists.
divides two lists.
arranges elements in ascending or descending order.
Sequential search
Select the correct option
uses divide and conquer rule
randomly searches the list
linearly checks each element until a match is found.
matches sub-lists
If we have 30000 entries in a list and we are using a binary search algorithm. How many comparisons will be performed to find
the last element?
Select the correct option
15000
30000
30
15
The binary search executes each stage of the repetition as a ______ of the previous stage.
Select the correct option
task
part
subtask
copy
Efficiency of an algorithm is
Select the correct option
time required to delete the element from the end of the list.
time required to search an element.
number of comparisons required to find an element.
time required to add elements at the end of the list.
is a sorting algorithm that places an unsorted element at its suitable place in each iteration.
Select the correct option
Insertion sort
Bubble sort
Merge sort
Quick sort
Which of the following examples is based on insertion sort?
Select the correct option
Database scenarios and distributes scenarios
Real-time systems
Finding the value of X
Sorting a list of names into alphabetical order
If the test for termination of a loop is performed before the body is executed then the loop is known as
Select the correct option
whitebox test loop
post-test loop
pretest loop
blackbox test loop
In
loop the test for termination is performed before the body is executed.
Select the correct option
whitebox test
post-test
pretest
blackbox test
Which of the following algorithms is used for sorting a list of names into alphabetical order within itself?
Select the correct option
Merge sort
Insertion sort
Regression algorithm
Decision tree
The test activity terminates the loop process by checking for a condition. This is known as the
Select the correct option
Test condition
Entry condition
Loop condition
Termination condition
What will be the output of the following pseudo code?
int x = 0;
if (x == 0)
printf("hi");
else
printf("hello");
Select the correct option
hellohi
hello
hihello
An algorithm that determines whether that value is in the list or not is known as
Select the correct option
Naive Bayes algorithm
KNN algorithm
Sequential search algorithm
K means algorithm
In a sequential search algorithm if we reach a value greater than the target value without finding the target, our search
terminates as a(an)
Select the correct option
not found
repeat
failure
success
Before A,B,C and D ran a race they made the following predictions:
A predicted that B would win.
B predicted that D would win.
C predicted that A would be third.
D predicted that A's prediction would be correct.
Only one prediction will be correct. After analyzing the data, find out who will win the race?
Select the correct option
A
B
C
Before A,B,C and D ran a race they made the predictions. After analyzing the data, the winning order of the race was CDAB.
Only one prediction was true. Identify the correct prediction:
Select the correct option
A predicted that B would win
B predicted that D would win
C predicted that A would be third
D predicted that A's prediction would be correct
Before A,B,C and D ran a race they made the following predictions:
A predicted that B would win.
B predicted that D would win.
C predicted that A would be third.
D predicted that A's prediction would be correct.
Only one prediction will be correct. After analyzing the data, find out who will be third in the race?
Select the correct option
D
B
A
The repeated execution of a statement or sequence of statements as long as some condition remains true is known as
Select the correct option
While Loop
Statement
Method
Pseudocode
A semantic structure that allows the repeated operation of a particular sequence of instructions is known as:
Select the correct option
Module
Pseudocode
Sequence
Loop
The recurring semantic structure used for the selection of one of two possible activities depending upon the given condition
(true or false) is known as
Select the correct option
Select
if-else
For
While
"Gaining a complete understanding of the problem" belongs to which phase of problem-solving phases presented by the
mathematician G. Polya in 1945?
Select the correct option
2nd
1st
3rd
4th
The close
between the process of algorithm discovery and that of general problem solving has caused computer scientists to join with
those of other disciplines in the search for better problem-solving techniques.
Select the correct option
dissolution
seclusion
association
solitude
How many times will the "Hello" message be printed by following the given pseudo code?
def Greetings():
Count = 3
while (Count>0):
print(Hello)
Count = Count-1
Select the correct option
4
2
Which of the following is not the problem-solving phase presented by the mathematician G. Polya in 1945?
Select the correct option
Carry out the plan
Divide the problem
Devise a plan for solving the problem
Understand the problem
Each primitive has its own syntax and semantics. Syntax refers to the primitive's
Select the correct option
Pictorial
Character
Symbolic
Alphabetic
representation.
The information in the state of the process must be sufficient to determine uniquely and _______________ the actions
required by each step.
Select the correct option
completely
ambiguously
uncertainly
partially
The algebraic formula for converting readings of variable X from KM to Meters is_
Select the correct option
x/1000
X+1000
X*1000
X%1000
A collection of primitives along with a collection of rules stating how the primitives can be combined to represent more
complex ideas constitutes a
Select the correct option
Programming Code
Programming Instructions
Programming Model
Programming Language
An informal notational system that helps the developers to develop algorithms is known as:
Select the correct option
Program Instructions
Model
Pseudocode
The algebraic formula for converting temperature readings from Celsius to Fahrenheit is_
Select the correct option
F = 32C + (5/9)
F = 32C + (9/5)
F = (5/9)C + 32
F = (9/5)C + 32
Each primitive has its own syntax and semantics. Semantics refers to the
Select the correct option
Meaning
Characteristics
Properties
Symbolic Representation
of the primitive.
From network security point of view, a primary prevention technique is to filter traffic passing through a point in the network,
usually through
Select the correct option
Operating system
Antivirus
Proxy server
Firewalls
The traditional ways of protecting information to control its access before Encryption was using.
Select the correct option
Finger prints
Digital Signatures
Passwords
Image processing
By using
we can have a secure version of the applications.
Select the correct option
XML
Encryption techniques
Spam filters
3G