wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Brain IT

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

What’s going to happen when we compile and run the following C program snippet?

#include "stdio.h"

int main()

{

 int a = 10;

 int b = 15;

  

 printf("=%d",(a+1),(b=a+2));

 printf(" %d=",b);

 

 return 0;

}

a)

=11 15=

b)

=11 12=

c)

Compiler Error due to (b=a+2) in the first printf().

d)

None of the above

2.

To focus on the logic and make refinements to a program before translating it into a programming language, a programmer often creates an outline of the program’s algorithm. What is the term for this type of outline?

a)

Compiler

b)

Interpreter

c)

Sketch

d)

Pseudocode

3.

Consider the loop control structure in programming. Which term describes a loop that continues repeating without a terminating (ending) condition?

a)

Infinite Loop

b)

Sequence Loop

c)

Conditional Loop

d)

Unlimited Loop

4.

Given the following method, what would test return if a = {0, 2, 3, 4} and v = 3?

a)

0

b)

2

c)

-1

d)

1

5.

What does HTML stand for?

a)

Hyper Text Mark up Lingo

b)

Hyper Text Mark Up Language

c)

Handy Texting Management Level

d)

Hyper Total Managed Language 

6.

What is the correct HTML element for inserting a line break?

a)

<break>

b)

<br>

c)

<bk>

d)

<lb>

7.

What will the following lines of Python code do? 

a)

A

b)

A C

c)

B C

d)

Nothing, it will return error

8.

How many bits make up one letter in binary code?

a)

6

b)

4

c)

8

d)

10

9.

Choose the correct tag for the largest heading:

a)

<head>

b)

<h1>

c)

<mainHead>

d)

<h6>

10.

Which type of language is translated entirely to machine language before use ?

a)

Interpreted

b)

Compiled

c)

Machine

d)

Assembly

11.

For a given integer, which of the following operators can be used to “set” and “reset” a particular bit respectively?

a)

| and &

b)

&& and ||

c)

& and |

d)

|| and &&

12.

Which term is used to describe expressions that result in the value of either true or false?

a)

Selection

b)

Boolean

c)

Conditional

d)

Concatenation

13.

JavaScript uses the ___ keyword to define variables

a)

var

b)

assign

c)

variable

d)

equal

14.

Variable names must begin with a lowercase letter and cannot have any

a)

True

b)

False

15.

What is BIOS short for?

a)

Banned Input/Output System

b)

Big Input/Output System

c)

Basic Input/Output System

d)

Binary Input/Output System

16.

Which type of error occurs when a programmer misspells a word or instruction?S

a)

System

b)

Runtime

c)

Syntax

d)

Logic

17.

Katherine is creating a computer program that will allow the cursor to jump to a different location when the mouse is clicked on a certain image. Which programming component should Katherine use to tell the program what to do when the mouse is clicked on the image?

a)

An event handler

b)

A parameter

c)

An event

d)

A class

18.

Which of these expressions is NOT a valid way to add 1 to a variable in JavaScript?

a)

x+

b)

x = x + 1

c)

x += 1

d)

x++

19.

What does JavaScript return to you if you try to access a object's property that doesn't exist?

a)

'oopsies!'

b)

undefined

c)

null

d)

0

20.

Consider the loop control structure in programming. Which term describes a loop that continues repeating without a terminating (ending) condition?

a)

Infinite Loop

b)

Sequence Loop

c)

Conditional Loop

d)

Unlimited Loop