# Introduction To Computer Science Test

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
| By KretschK
K
KretschK
Community Contributor
Quizzes Created: 9 | Total Attempts: 6,801
Questions: 23 | Attempts: 119

Settings

• 1.

### Consider the following code: Dim n as Integer = -8 n = 100 / n + 4 What is the value of n after the code is run?

• A.

-8.5

• B.

16.5

• C.

-8

• D.

16

• E.

-25

A. -8.5
Explanation
The value of n after the code is run is -8.5. In the code, n is initially set to -8. Then, the expression 100 / n + 4 is evaluated. Since n is -8, the division operation results in -12.5. Adding 4 to -12.5 gives us -8.5, which is the final value of n.

Rate this question:

• 2.

### Consider the following code: Dim n as Integer = -8 n = 100 / (n + 4) What is the value of n after the code is run?

• A.

-8

• B.

-8.5

• C.

14

• D.

14.5

• E.

-25

E. -25
Explanation
The code assigns the value of -8 to the variable n. Then, it calculates the expression 100 / (-8 + 4), which simplifies to 100 / -4, resulting in -25. Therefore, the value of n after the code is run is -25.

Rate this question:

• 3.

### Which of the following expressions might be used in a calculation to determine leap year?

• A.

Year - 2000

• B.

Year / 2000

• C.

Year / 4

• D.

Year Mod 4

• E.

Year \ 4

D. Year Mod 4
Explanation
The expression "year Mod 4" can be used to determine if a year is a leap year or not. In this expression, "Mod" represents the modulus operator, which calculates the remainder when the year is divided by 4. If the remainder is 0, then the year is divisible by 4 and is a leap year. If the remainder is not 0, then the year is not divisible by 4 and is not a leap year.

Rate this question:

• 4.

### What will be the value of z as a result of the following statement? Dim z as Integer z = 50 \ 15

• A.

3

• B.

5

• C.

3.6

• D.

750

A. 3
Explanation
The value of z will be 3 as a result of the following statement. The expression "50 \ 15" performs integer division, which means that it divides 50 by 15 and returns the quotient without any decimal places. In this case, the quotient is 3. Therefore, the value of z will be 3.

Rate this question:

• 5.

• 6.

• 7.

### A label control is used to perform an action when clicked

• A.

True

• B.

False

B. False
Explanation
A label control is not used to perform an action when clicked. It is typically used to display text or provide information to the user. Instead, a button control is commonly used to perform an action when clicked. Therefore, the correct answer is false.

Rate this question:

• 8.

### The most important information on a form should be in the upper-left corner of the form.

• A.

True

• B.

False

A. True
Explanation
The upper-left corner of a form is considered the prime real estate because it is the first area that the eye is naturally drawn to when reading a document. Placing important information in this location ensures that it will be easily noticed and not overlooked. By placing crucial details in the upper-left corner, it increases the chances of users quickly and efficiently processing the information on the form. This layout principle is based on the natural reading pattern of most cultures, where the eye starts from the top left and moves to the right and down.

Rate this question:

• 9.

### The use of multiple fonts and multiple font sizes is a good idea.

• A.

True

• B.

False

B. False
Explanation
Using multiple fonts and font sizes can create a visually cluttered and unprofessional appearance. Consistency in font usage helps maintain a cohesive and organized design. It is generally recommended to stick to one or two fonts and use font sizes consistently throughout a document or design to ensure readability and visual harmony.

Rate this question:

• 10.

### The arithmetic operators *, /, + and - all have the same level of precedence.

• A.

True

• B.

False

B. False
Explanation
The arithmetic operators *, /, +, and - do not have the same level of precedence. In mathematics, multiplication and division have a higher precedence than addition and subtraction. This means that when an expression contains both multiplication/division and addition/subtraction, the multiplication/division operations will be performed first. Therefore, the correct answer is False.

Rate this question:

• 11.

### You specify a default button by setting the form’s AcceptButton property to the name of the button.

• A.

True

• B.

False

A. True
Explanation
To specify a default button in a form, the AcceptButton property needs to be set to the name of the button. This means that when the user presses the Enter key, the button specified as the default will be triggered. Therefore, the given statement is true.

Rate this question:

• 12.

### Whish property controls the caption displayed on the Forms title bar?

• A.

Text

• B.

TitleBar

• C.

Name

• D.

Caption

A. Text
Explanation
The property that controls the caption displayed on the Form's title bar is "Text". This property allows the developer to set the text that appears in the title bar of the Form. By assigning a value to the "Text" property, the developer can customize the caption to display any desired text.

Rate this question:

• 13.

### The tool that displays text which the user is not allowed to edit while the application is running is _____.

• A.

Label

• B.

Text Box

• C.

• D.

Button

A. Label
Explanation
A label is a tool that displays text which the user is not allowed to edit while the application is running. It is typically used to provide information or instructions to the user. Unlike a text box, radio button, or button, a label is a static element that cannot be modified by the user.

Rate this question:

• 14.

### TOE stands for

• A.

Text, Object, Environment

• B.

• C.

• D.

Explanation
The correct answer is "Task, Object, Event". In the context of computer programming, TOE is an acronym that represents the three fundamental components of an object-oriented system. A task refers to a specific action or behavior that an object can perform. An object is an instance of a class and represents a specific entity or concept in the system. An event is a trigger or notification that occurs within the system. Therefore, "Task, Object, Event" accurately describes the key elements of an object-oriented system.

Rate this question:

• 15.

### A variable that can only be true or false is what kind?

Boolean
boolean
Explanation
A variable that can only be true or false is called a boolean. In programming, boolean is a data type that represents true or false values. It is often used in conditional statements and logical operations to make decisions in a program. The term "boolean" is typically spelled with a lowercase "b" in programming languages like Java, while "Boolean" with an uppercase "B" is used in some other languages.

Rate this question:

• 16.

### The name of a Visual Basic .NET variable must begin with a(n) _______.

• A.

Letter

• B.

Digit

• C.

Hyphen

• D.

Underscore

A. Letter
Explanation
A Visual Basic .NET variable must begin with a letter. This is because variable names in Visual Basic .NET must follow certain naming conventions, and one of those conventions is that the name must start with a letter. Starting a variable name with a letter helps to differentiate it from other elements in the code and makes the code more readable and understandable.

Rate this question:

• 17.

### The equals sign (=) is called the ________________ operator

• A.

Equal

• B.

Assignment

• C.

Validation

• D.

Evaluation

B. Assignment
Explanation
The equals sign (=) is called the assignment operator because it is used to assign a value to a variable. In programming, the assignment operator is used to store a specific value in a variable, making it the most appropriate term to describe the equals sign.

Rate this question:

• 18.

### Memory locations where programs store data are called:

variables
Variables
variable
Variable
Explanation
Memory locations where programs store data are called variables. In programming, variables are used to store and manipulate different types of data, such as numbers, strings, or objects. They act as containers that hold values that can be accessed and modified throughout the program. The use of variables allows for dynamic and flexible programming, as the stored data can be changed as needed during the execution of the program. Therefore, the correct answer is variables.

Rate this question:

• 19.

### Red/green color blindness is common. When considering using those colors you should keep what in mind?

• A.

Red and green have specific meanings

• B.

Shape, position, or texture should also be used

• C.

Contrasting colors can often highlight each other

• D.

All of the above

D. All of the above
Explanation
When considering using red and green colors, it is important to keep in mind that red and green have specific meanings. Additionally, shape, position, or texture should also be used to convey information effectively. Moreover, using contrasting colors can often highlight each other and improve visibility. Therefore, all of the above factors should be considered when using red and green colors.

Rate this question:

• 20.

### If I have a button that adds tax to a product price, what would be the most appropriate caption?

• A.

• B.

• C.

• D.

Explanation
The most appropriate caption would be "Add Tax" because it is clear and concise. It effectively communicates the action of adding tax to a product price. The use of capital letters is not necessary as it does not add any additional clarity to the caption.

Rate this question:

• 21.

### Consider the following code sum = sum + Convert.toString(TextBox.Text) The variable sum is called a

• A.

Counter

• B.

Property

• C.

Accumulator

• D.

Parameter

C. Accumulator
Explanation
The variable "sum" in the given code is being used to accumulate or accumulate the value of the converted text from the TextBox. It is not being used as a counter, property, or parameter. Therefore, the correct term to describe the variable "sum" in this context is an accumulator.

Rate this question:

• 22.

### If I want to combing the contents of two text boxes into one label, which statememt would I use?

• A.

TextBox1.Text + TextBox2.text = Label1.text

• B.

Label1.text = TextBox1.Text + TextBox2.text

• C.

Label1 = TextBox1 + TextBox2

• D.

Label1.text(TextBox.Text1, TextBox2.text)

B. Label1.text = TextBox1.Text + TextBox2.text
Explanation
To combine the contents of two text boxes into one label, the correct statement to use is "Label1.text = TextBox1.Text + TextBox2.text". This statement assigns the concatenated value of the text in TextBox1 and TextBox2 to the text property of Label1, resulting in the combined contents being displayed in the label.

Rate this question:

• 23.

### Complete the following code by computing the total cost of purchasing show tickets that includes the service charge per ticket and tax Dim n as Innteger = Convert,toString(txtNumberofTickets.Text) Dim c as Double = Convert.toDouble(txtCostperTickket.Text) Dim service as Double = 2.75 ' Added on to each ticket Dim salesTax as Double = 0.075 lblTotalCost.text = ' Write the appripopriate expressionin the answer block

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

• Current Version
• Feb 23, 2024
Quiz Edited by
ProProfs Editorial Team
• Oct 18, 2012
Quiz Created by
KretschK

Related Topics