Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Bug Hunt

Total questions: 177

Worksheet time: 2hrs 56mins

Name
Class
Date
1.

I go to add a script to my character and find that my blocks have disappeared. Why is this?

a)

Scratch Malfunctioned

b)

I have stage selected

c)

I have exceeded the block limit

2.

Where do you find the background images to insert in Scratch?

a)

Costumes

b)

Backdrops

c)

Gallery

d)

Script

3.
What do you call the list of commands in Scratch? 
a)
Sprite
b)
Script
c)
Scratch
d)
Help
4.
What do you call the characters in Scratch? 
a)
Sprite
b)
Script
c)
Scratch
d)
Sprite Scripts 
5.

78-0+2-2-0+2-2+2-1

a)

79

b)

seventy nine

c)

97

d)

nine seventy

6.

A letter or symbol to which a some value can be assigned.

a)

Print

b)

Variable

c)

Output

d)

Bug

7.
What is coding?
a)
Something used to develop computer programs. 
b)
A form of "language" use to communicate computer actions. 
c)
An essential part to everything we do online. 
d)
All of these options are correct. 
8.

Statements that can only run under certain conditions or situations such as: if the seat is taken, then move to the next available seat.

a)

conditionals (if/then statements)

b)

variable

c)

abstractions

d)

binary

9.

A piece of code with multiple steps that have been simplified down to one command which you can easily call over and over again.

a)

digital footprint

b)

run program

c)

abstraction

d)

function

10.

Trying again and again, even when something is very hard.

a)

command

b)

iteration (persisting)

c)

program

d)

code

11.

If I say the word "Algorithm" I am talking about what?

a)

When we all go to a store called Rithim.

b)

Algae that can DANCE!!!

c)

A new dance move.

d)

A list of steps you follow to finish a task.

12.

What does the picture represent?

a)

Byte

b)

Code

c)

Switche

d)

Bit

13.
What is one or more commands or algorithms designed to be carried out by a computer?
a)
Algorithm
b)
Program
c)
Bug
d)
Code
14.
What is an error in a program that prevents the program from running as expected?
a)
Algorithm
b)
Program
c)
Bug
d)
Code
15.

Which keyword is used to come out of a loop only for that iteration?

a)

break

b)

continue

c)

return

d)

none of the mentioned above

16.

What are the elements present in the array of the following C code?

int array[5] = {5};

a)

5, 5, 5, 5, 5

b)

5, 0, 0, 0, 0

c)

5, (garbage), (garbage), (garbage), (garbage)

d)

(garbage), (garbage), (garbage), (garbage), 5

17.

What will be the data type returned for the following C function?

a)

char

b)

int

c)

double

d)

multiple type-casting in return is illegal

18.

What will be the output of the following C code snippet?

a)

returns 1

b)

returns 2

c)

varies

d)

compile time error

19.

What will be the output of the following C code? (Initial values: x= 7, y = 8)

a)

7.000000, 7

b)

Run time error

c)

7.000000, junk

d)

Varies

20.

What will be the final value of x in the following C code?

a)

3.75

b)

Depends on compiler

c)

24

d)

3

21.

What will happen if the following C code is executed?

a)

It will cause a compile-time error

b)

It will cause a run-time error

c)

It will run without any error and prints 3

d)

It will experience infinite looping

22.

What is the result after execution of the following code if a is 10, b is 5, and c is 10?

a)

a = 10, c = 10

b)

a = 11, c = 10

c)

a = 10, c = 11

d)

a = 11, c = 11

23.

How many times will the following loop execute?

for(j = 1; j <= 10; j = j-1) 

a)

Forever

b)

Never

c)

0

d)

1

24.

What does this declaration mean?

int x : 4; 

a)

X is a four-digit integer.

b)

X cannot be greater than a four-digit integer.

c)

X is a four-bit integer.

d)

None of the these

25.

What is the output of the following code ?

a)

6

b)

9

c)

12

d)

8

26.

The______function returns a pointer to the first character of a token.

a)

strstr()

b)

strcpy()

c)

strspn()

d)

strtok()

27.

What will be the output of the following C code?

a)

i,am

b)

iam

c)

i am

d)

error

28.

What will be the output of the following C code?

a)

0

b)

1

c)

Compile time error

d)

Undefined behaviour

29.

What does the following declaration mean?

int (*ptr)[10];

a)

ptr is array of pointers to 10 integers

b)

ptr is a pointer to array of 10 integers

c)

ptr is an array of 10 integers

d)

ptr is a pointer to array

30.

OUTPUT OF THE PROGRAM

a)

5Good Morning

b)

M

c)

Good

d)

Morning

e)

None of the above

31.

What will be output for the following code?

a)

Hello is printed once

b)

Hello will be printed infinite number of times

c)

Hello is not printed at all

d)

0 is returned

32.

The data structure used to implement recursive function calls _____________.

a)

Array

b)

Linked List

c)

Binary tree

d)

Stack

33.

The following code is an example of?

double da = 4.5;

double db = 4.6;

double dc = 4.9;

int result = (int)da + (int)db + (int)dc;

printf(""result = %d"", result);

a)

Implicit Type Conversion

b)

Explicit Type Conversion

c)

Error

d)

Cannot say

34.

Size of the array need not be specified, when

a)

Initialization is a part of definition

b)

It is a formal parameter

c)

It is a declaratrion

d)

All of the above

35.

Array is an example of _______ type memory allocation.

a)

Compile time

b)

Run time

c)

Both A and B

d)

None of the above

36.

What is the maximun number of dimensions an array in C may have?

a)

Two

b)

eight

c)

sixteen

d)

Theoratically no limit. The only practical limits are memory size and compilers

37.

Let x be an array. Which of the following operations are illegal?

I. ++x

II. x+1

III. x++

IV. x*2

a)

I and II

b)

I,II and III

c)

II and III

d)

I,III and IV

e)

III and IV

38.

An array elements are always stored in ________ memory location.

a)

SEQUENTIAL

b)

RANDOM

c)

SEQUENTIAL AND RANDOM

d)

NONE OF THE ABOVE

39.

What will be the output of the program ?

a)

3,2,15

b)

2,3,20

c)

2,1,15

d)

1,2,5

40.

What is the output of C Program with switch statement or block ?

a)

BOAT CHILLY

b)

BOAT PETROL CHILLY

c)

SHIP BOAT CHILLY

d)

Compiler error

41.

What is right way to Initialize array?

a)

int num[6] = { 2, 4, 12, 5, 45, 5 };

b)

int n{} = { 2, 4, 12, 5, 45, 5 };

c)

int n{6} = { 2, 4, 12 };

d)

int n(6) = { 2, 4, 12, 5, 45, 5 };

42.

What is the output of C Program with switch statement or block ?

a)

BOAT CHILLY

b)

BOAT PETROL CHILLY

c)

SHIP BOAT CHILLY

d)

Compiler error

43.

What is the output of C Program with switch statement ?

a)

ANT KING PALACE

b)

KING PALACE

c)

ANT PALACE

d)

Compiler error for using expressions

44.

malloc() allocates memory from the heap and not from the stack.

a)

TRUE

b)

FALSE

c)

May Be

d)

Can't Say

45.

Which function is used to delete the allocated memory space ?

a)

Dealloc()

b)

free()

c)

Both a and b

d)

None of the above

46.

Will this program compile ?

a)

Yes

b)

No

47.

In C a pointer variable to an integer can be created by the declaration

a)

int p*;

b)

int *p;

c)

int +p;

d)

int $p;

48.

What is the output of the following program?

a)

30

b)

20

c)

compile time error

d)

run time error

49.

How do you convert this char array to string?

char str[]={'g','l','o','b','y'};

a)

str[5] = 0;

b)

str[5] = '\0'

c)

str[]={'g','l','o','b','y','\0'};

d)

All of the above

50.

What is the output of C Program with Strings?

a)

globy

b)

globy\0

c)

compiler error

d)

‘g’ ‘l’ ‘o’ ‘b’ ‘y’

51.

What is the Format specifier used to print a Character array in C Printf or Scanf function?

a)

%c

b)

%C

c)

%s

d)

%d

52.

What is the result of logical or relational expression in C?

a)

True or False

b)

0 or 1

c)

0 if an expression is false and any positive number if an expression is true

d)

none of the mentioned

53.

Which keyword is used to prevent any changes in the variable within a C program?

a)

immutable

b)

mutable

c)

const

d)

volatile

54.

Which of the following cannot be a variable name in C?

a)

volatile

b)

true

c)

friend

d)

export

55.

Which of the following declaration is not supported by C?

a)

String str;

b)

char *str;

c)

float str = 3e2;

d)

both String str; & float str = 3e2;

56.

Which of the following cannot be a variable name in C?

a)

volatile

b)

true

c)

friend

d)

export

57.

The C-preprocessors are specified with _________ symbol.

a)

a) #

b)

b) $

c)

c) ” ”

d)

d) &

58.

Who is the father of C language?

a)

a) Steve Jobs

b)

b) James Gosling

c)

c) Dennis Ritchie

d)

d) Rasmus Lerdorf

59.

int main ()


{


int x = 24, y = 39, z = 45;


z = x + y;


y = z - y;


x = z - y;


printf ("n%d %d %d", x, y, z);


}

a)

24 39 63

b)

39 24 63

c)

24 39 45

d)

39 24 45

60.

#include<stdio.h>

int main()

{

float a=0.7;

if(a<0.7)

{

printf("C");

}

else

{

printf("C++");

}

}

a)

C

b)

C++

c)

Compilation Error

d)

None of the these

61.

#include<stdio.h>

int main()

{

char arr[11]="The African Queen";

printf("%s",arr);

}

a)

The African Queen

b)

The

c)

The African

d)

Compilation error

62.

int main()


{


char arr[7]="Network";


printf("%s", arr);


return 0;


}

a)

Network

b)

N

c)

Garbage Value

d)

Compilation error

63.

int main()


{


int a = 10, b = 25;


a = b++ + a++;


b = ++b + ++a;


printf("%d %d n", a, b);


}

a)

36 64

b)

35 62

c)

36 63

d)

30 28

64.

What is the output of C Program.?

int main()

{

int a=5;

while(a=123)

{

printf("RABBIT\n");

break;

}

printf("GREEN");

return 0;

}

a)

GREEN

b)

RABBIT GREEN

c)

RABBIT is printed unlimited number of times.

d)

Compiler error.

65.

What is the output of C Program.?

int main()

{

int a=5;

while(a==5)

{

printf("RABBIT");

break;

}

return 0;

}

a)

RABBIT is printed unlimited number of times

b)

RABBIT

c)

Compiler error

d)

None of the above.

66.

What is the output of C Program.?

int main()

{

while(true)

{

printf("RABBIT");

break;

}

return 0;

}

a)

RABBIT

b)

RABBIT is printed unlimited number of times.

c)

No output

d)

Compiler error.

67.

Choose a correct C for loop syntax.

a)

for(initalization; condition; incrementoperation) { //statements }

b)

for(declaration; condition; incrementoperation) { //statements }

c)

for(declaration; incrementoperation; condition) { //statements }

d)

for(initalization; condition; incrementoperation;) { //statements }

68.

Choose correct C while loop syntax.

a)

while(condition) { //statements }

b)

{ //statements }while(condition)

c)

while(condition); { //statements }

d)

while() { if(condition) { //statements } }

69.

Which loop is faster in C Language, for, while or Do While.?

a)

for

b)

while

c)

do while

d)

all of the above

70.

What is the output of C Program.?

int main()

{

int k;

for(printf("FLOWER "); printf("YELLOW "); printf("FRUITS "))

{

break;

} return 0;

}

a)

Compiler error

b)

FLOWER FRUITS

c)

FLOWER YELLOW

d)

FLOWER YELLOW FRUITS

71.

What is the output of C Program.?

int main()

{

int k;

for(;;)

{

printf("TESTING\n");

break;

}

return 0;

}

a)

No Output

b)

TESTING

c)

Compiler error

d)

None of the above

72.

What is the output of C Program.?

int main()

{

int k;

for(k=1; k <= 5; k++);

{

printf("%d ", k);

}

return 0;

}

a)

1 2 3 4 5

b)

1 2 3 4

c)

6

d)

5

73.

What is the output of C Program.?

int main()

{

int k, j;

for(k=1, j=10; k <= 5; k++)

{

printf("%d ", (k+j));

}

return 0;

}

a)

compiler error

b)

10 10 10 10 10

c)

10 11 12 13 14 15

d)

None of the above

74.

Choose correct Syntax for C Arithmetic Compound Assignment Operators.

a)

a+=b is (a= a+ b)

a-=b is (a= a-b)

b)

a*=b is (a=a*b)

a/=b is (a = a/b)

c)

a%=b is (a=a%b)

d)

All the above.

75.

Choose a correct C Statement.

a)

a++ is (a=a+1) POST INCREMENT Operator

b)

a-- is (a=a-1) POST DECREMENT Operator

--a is (a=a-1) PRE DECREMENT Operator

c)

++a is (a=a+1) PRE INCREMENT Operator

d)

All the above.

76.

What is the output of C Program.?

int main()

{

int a=32;

do

{

printf("%d ", a);

a++;

if(a > 35)

break;

}

while(1);

return 0;

}

a)

No Output

b)

32 33 34

c)

32 33 34 35

d)

Compiler error

77.

What is the output of C Program.?

int main()

{

int a=32;

do

{

printf("%d ", a);

a++;

}

while(a <= 30);

return 0;

}

a)

32

b)

33

c)

30

d)

No Output

78.

What is the output of C Program.?

int main()

{

int a=25;

while(a <= 27)

{

printf("%d ", a);

a++;

}

return 0;

}

a)

25 25 25

b)

25 26 27

c)

27 27 27

d)

Compiler error

79.

What is the output of C Program.?

int main()

{

int a=5;

while(a >= 3);

{

printf("RABBIT\n");

break;

}

printf("GREEN");

return 0;

}

a)

GREEN

b)

RABBIT GREEN

c)

RABBIT is printed infinite times

d)

None of the above

80.

Finding and fixing errors in a program.

a)

debugging

b)

decompose

c)

digital footprint

d)

variables

81.

A user does this to tell the computer start the commands you have written into the program.

a)

event

b)

run program

c)

function

d)

abstraction

82.

A field of science in which people use the power of computers to solve big problems.

a)

command

b)

computer science

c)

code

d)

program

83.

When you tell the computer to repeat a command or step over and over and over and over and over and over and over and over and over and... oh yeah, over again as many times as you tell to repeat.

a)

Deja Vu

b)

Loop

c)

Repeating

d)

Being annoying

84.

A computer program is

a)

a show on TV.

b)

an algorithm that has been coded into something that can be run by a machine.

c)

a professional graham cracker.

d)

part of a S'more.

85.

Code is...

a)

when it's not warm.

b)

the dog from Garfield.

c)

a song or poem dedicated to someone.

d)

specific instructions in a computer program.

86.

Problems or mistakes in the code for an algorithm or program are known as:

a)

Bugs

b)

Slugs

c)

Tugs

d)

Rugs

87.

In coding an event is what?

a)

An action that causes something to happen.

b)

An item on your calendar.

c)

A way to move air.

d)

A device that blows air into your computer.

88.
What are the on/off switches used by computers to communicate called?
a)
Switch
b)
Program
c)
Binary Code
d)
Algorithm
89.
What is a one or zero called in coding?
a)
Byte
b)
Code
c)
Switch
d)
Bit
90.
How many bits are in a byte?
a)
1
b)
2
c)
4
d)
8
91.
What is a way of representing information using only 2 options?
a)
Code
b)
Loop
c)
Conditionals
d)
Binary
92.
What are statements that only run under certain conditions?
a)
Code
b)
Loop
c)
Conditionals
d)
Binary
93.
What is the action of doing something over and over again?
a)
Loop
b)
Persistence
c)
Program
d)
Code
94.
What is an algorithm that has been coded into something that can be run by a machine?
a)
Algorithm
b)
Program
c)
Bug
d)
Code
95.
What is finding and fixing errors in programs?
a)
Debugging
b)
Program
c)
Bug
d)
Code
96.
What is finding and fixing errors in programs?
a)
Debugging
b)
Program
c)
Bug
d)
Code
97.
What is an error in a program that prevents the program from running as expected?
a)
Algorithm
b)
Program
c)
Bug
d)
Code
98.
What is a list of steps you can follow to finish a task?
a)
Algorithm
b)
Program
c)
Bug
d)
Code
99.

What is the Internet?

a)

A local network.

b)

Mobile phone network.

c)

Is the global system of interconnected computer networks that use the TCP/IP protocol to link devices worldwide.

d)

A local computer network providing a variety of information and communication facilities.

100.

WWW stands for

a)

World Worm Web

b)

World Wide Web

c)

World Word Web

d)

World Wild Web

101.

Which of these is Google Drive?

a)
b)
c)
d)
102.
A user does this to tell the computer start the commands you have written into the program.
a)
event
b)
run program
c)
function
d)
abstraction
103.
How do we call this?
a)
router
b)
mouse mat
c)
memory stick
d)
printer
104.
What can you make with programming?
a)
Games
b)
Websites
c)
Apps
d)
All of these
105.

Reg No in full

4 lines
106.
What punctuation is used to indicate the beginning and end of code blocks?
a)
{ }
b)
-> <-
c)
BEGIN and END
d)
( and )
107.

C programs are converted into machine language with the help of

a)

An Editor

b)

A compiler

c)

An operating system

d)

None of these.

108.

The continue statment cannot be used with

a)

for

b)

while

c)

do while

d)

switch

109.

In the following loop construct, which one is executed only once always.

for(exp1; exp2; exp3)

a)

exp1

b)

exp3

c)

exp1 and exp3

d)

exp1,exp2 and exp3

110.

Choose a correct C do while syntax.

a)

dowhile(condition) { //statements }

b)

do while(condition) { //statements }

c)

do { //statements }while(condition)

d)

do { //statements }while(condition);

111.

What is the way to suddenly come out of or Quit any Loop in C Language.?

a)

continue; statement

b)

break; statement

c)

leave; statement

d)

quit; statement

112.

Loops in C Language are implemented using.?

a)

While Block

b)

For Block

c)

Do While Block

d)

All the above

113.

Choose a right C Statement.

a)

Loops or Repetition block executes a group of statements repeatedly.

b)

Loop is usually executed as long as a condition is met.

c)

Loops usually take advantage of Loop Counter

d)

All the above.

114.
Integer, float, boolean and char are ...
a)
types of operators
b)
types of functions
c)
types of variables
d)
types of programming languages
115.
a)

Inside try

Exception Caught

After throw

After catch

b)

Inside try

Exception Caught

After catch

c)

Inside try

Exception Caught

d)

Inside try

After throw

After catch

116.
a)

Compile Error

b)

Inside Fun1()

c)

Inside Fun2()

d)

Inside Fun1() Inside Fun2()

e)

Inside Fun2() Inside Fun1()

117.
a)

0

b)

1

c)

2

d)

3

e)

There are two count variables. Not enough info

118.
a)

0

b)

5

c)

-5

d)

10

e)

-10

119.
a)

1

b)

2

c)

4

d)

8

120.

What is the difference when allocating the following memory?

int array1[15];

int array2[3][5];

a)

array1 is larger

b)

array2 is larger

c)

The size allocated is the same

121.
a)

1

b)

6

c)

12

d)

24

122.
a)

The derived class can not call the base class func().

b)

Must place “using namespace Base” at the top of the file.

c)

Base::d.func();

d)

d.Base::func();

123.

When overloading a function, the signature of the function is determined by:

a)

The name of the function

b)

The name of the function and number of argument and types

c)

The return type, name and number of arguments and types.

124.

What happens if the word static is placed in front of a member function in C++?

a)

The member function can be called even if we do not create an instance of the class.

b)

It places the member function in the static part of memory

c)

It will cause an error and the program will not compile.

d)

None of the above.

125.

What does the word virtual do when placed in front of a member function in C++?

a)

Forces derived classes to define the function to compile.

b)

Allows derived classes, not required, to define the function.

c)

Does not place the function in text segment if it is not called.

d)

None of the above.

126.

When class B is inherited from class A, what is the order in which the destructors are called.

a)

Class A first Class B next

b)

Class B first Class A next

c)

Class B's only as it is the child class

d)

Class A's only as it is the parent class

127.
a)

I only

b)

II only

c)

III only

d)

I and II only

e)

II and II only

128.
a)

Equal strings

b)

There will be a compile error and it will not run

c)

Nothing will be output on the console

d)

None of the above

129.

What does the word const do when placed at the end of a member function in a class?

a)

It is required for C++

b)

States the return type is constant

c)

States the input arguments are constant

d)

States the member variables will not change

e)

None of the above

130.

When a class is derived from a base class it gets access to:

a)

Private

b)

Protected

c)

Private and Protected

d)

Protected and Public

e)

Private, Protected and Public

131.

When a class becomes a friend of another class they are additionally getting access to:

a)

Private

b)

Protected

c)

Public

d)

None of the above

132.

There can only be one catch block in a program

a)

True

b)

False

133.

The compiler creates an instance of a function template in memory as soon as it encounters the template.

a)

True

b)

False

134.

What happens if an exception is thrown in a function, but not caught?

a)

The program continues executing and it is ignored.

b)

The function that throws the exception is exited.

c)

The program terminates.

d)

The compiler will find the error and the program would not compile.

135.

For a random number generator, you write it as

a)

sin()

b)

rand()

c)

cos()

d)

abs()

136.

iostream

a)

Displays output from the screen and input from the keyboard

b)

Has all the math equations

c)

Counts the time

d)

Checks if the code has a function

137.

Secondary Functions

a)

Is a function executed inside the main function

b)

Is a function executed in another program

c)

Is a function executed outside the main function

d)

Is the main function

138.

Switch Statement

a)

Is a statement with a set of conditions called cases

b)

Is a case

c)

Is a condition with no cases

d)

Is a boolean statement

139.

Do while loops

a)

Runs a statement once

b)

Runs a statement twice

c)

Runs a statement multiple times or not within a boolean condition

d)

Doesn't run at all

140.

If-else

a)

Optional value for the program to execute

b)

Is a condition followed by a statement or a set of statements

c)

Is a statement followed by a condition or a set of conditions

d)

Function with a value

141.

______ is used to input value from the user.

a)

cin>>

b)

cin<<

c)

<cin>

142.

Two expressions can be compared using ___________ operator.

a)

Logical

b)

Relational

c)

Arithmetic

143.

the five arithmetic operators supported by c++

a)

+,-,*,/,%

b)

()$%

c)

{<>}

144.

When using the ______________,C++ only evaluates what is necessary from left to right to come up with combined reational results,.

a)

logical operaters

b)

compound assignment

c)

associative

145.

in the _________, c++ only evaluates what is necessary from left to right to come up with the combined relational result.

a)

arithmetic operartor

b)

relational operator

c)

none

d)

Logical opeartor

146.

the <iostream .h> provides the basic INPUT and output fundamentales

a)

true

b)

false

c)

maybe

147.

_________ are fixed values used by a program

a)

constant

b)

variable

c)

boolean

d)

float

148.

a program written in a high language is called a ____________

a)

object

b)

source code

c)

variable

d)

constant

149.

the wrapping up of data and functions together is called as _______________________

a)

class

b)

encapsulation

c)

integer

d)

syntax

150.

c++ is an _____________ , developed by ______________ , and is an extension of c language

a)

object oriented program , Bjarane

b)

class and data

c)

complier, interpreter

d)

functions comments

151.

an object is a /an instance of _______________

a)

class

b)

C++

c)

object

d)

iostream.h

152.

If originally x=2,y=0, and z=1, what is the value of x, y, and z after executing the following code?


if (x>y)


y=x;

else

z=x;

a)

x=2 y=2 z=1

b)

x=0 y=2 z=0

c)

x=2 y=1 z=1

d)

x=2 y=0 z=1

153.

Evaluate the following expressions to true or false


5 >= (1+6)-4

a)

True

b)

False

154.

Evaluate the following expressions to true or false

5+1==6 || 8-1>4

a)

True

b)

False

155.
What is the output of this program?
Program
int main()
{
cout<<"Hi everybody";
return 0;
}
a)
"Hi everybody"
b)
Hi everybody"
c)
Hi everybody
d)
"Hi everybody
156.
A programmer is:
a)
person who writes code and communicates instructions to a computer
b)
person who types
c)
person who studies computers
d)
error or mistake in your code
157.
After running the following code, what will be the value of x?
y = 3;
x = 5 * y;
a)
3
b)
5
c)
15
d)
0
158.
The process of creating a new variable without value
a)
declaration
b)
naming
c)
instantiation
d)
assigning
159.

Which of the following is a correct comment?

a)

*/ Comments */

b)

** Comment **

c)

/* Comment */

d)

{ Comment }

160.

What punctuation is used to signal the beginning and end of code blocks?

a)

{ }

b)

-> and <-

c)

BEGIN and END

d)

( and )

161.
What do we call the person who writes the instructions for the computer to complete a task?
a)
architect
b)
programmer
c)
Bob
d)
composer
162.
What is Code?
a)
Rules of conduct.
b)
A pack between friends.
c)
One or more commands designed to be carried out by a computer.
d)
Edoc spelled backwords.
163.

What is the only function all C++ programs must contain?

a)

start()

b)

system()

c)

main()

d)

program()

164.
What is finding and fixing errors in programs?
a)
Debugging
b)
Program
c)
Bug
d)
Code
165.
The process of creating a new variable without value
a)
declaration
b)
naming
c)
instantiation
d)
assigning
166.

What type of variable can be defined in an interface?

a)

public static

b)

private final

c)

public final

d)

static final

167.

Which of these can be used to fully abstract a class from its implementation?

a)

Objects

b)

Packages

c)

Interfaces

d)

None of the Mentioned

168.

super keyword is used to access

a)

only subclass methods

b)

parent class variables and methods

c)

subclass variables and methods

d)

only parent class methods

169.

Which of the following is/are false about inheritance in Java?

I. A subclass inherits all the methods and variables of the superclass.

II. A subclass can override the methods of its superclass

III. A subclass has access to the private instance variables of the superclass.

a)

I only

b)

II only

c)

III only

d)

I and II only

e)

I and III only

170.
What does polymorphism mean?
a)
Changing shapes
b)
Having many forms
c)
Being unchangeable
d)
Easy
171.

The following Syntax is used for?


class Subclass-name extends Superclass-name

{

//methods and fields

}

a)

Polymorphism

b)

Encapsulation

c)

Inheritance

d)

None of the above

172.

_____ is used to find and fix bugs in the Java programs.

a)

JVM

b)

JRE

c)

JDK

d)

JDB

173.

Which of the following option leads to the portability and security of Java?

a)

Bytecode is executed by JVM

b)

The applet makes the Java code secure and portable

c)

Use of exception handling

d)

Dynamic binding between objects

174.

Which method is called to end applet

a)

stop()

b)

destroy()

c)

terminate()

d)

end()

175.

Which of the applet method called only once

a)

init()

b)

start()

c)

paint()

d)

stop()

176.

Which of the following is not a method of applet class

a)

init()

b)

start()

c)

drawLine()

d)

paint()

177.

What invokes immediately after the start() method and also any time the applet needs to repaint itself in the browser?

a)

a. stop()

b)

b. init()

c)

c. paint()

d)

d. destroy()