IST Midterm

Ace your homework & exams now with Quizwiz!

One byte has _______ bits.

8

The __________ indicates that you want the number to appear formatted in a specific way when it is returned as a string from the ToString method.

formatting string

Computer can execute the code in__________.

machine language

The last value printed in the Console will be? int counter = 0; while (counter < 100) { Console.WriteLine(counter); counter++; }

99

What Are the Components of Methods in C#?

A - access method B - Return Type C - Method name D - Parmater List E - Method body

Which of the following statements is true about C#.

-You use double-quotation marks to create a literal string. -If you make a mistake when writing code, you have to delete it all and start over. -C# is case insensitive. -Console is a method, and WriteLine() is a class.

The figure shows the Visual Studio IDE. What are the names of the four areas that are indicated in the figure?

1. toolbox 2.designer window 3.solution explore 4.properties window

What will be the output of the following C# code? for (int i = -3; i <= 3; i++) { switch (i) { case 0: Console.Write("zero"); break; } if (i > 0) Console.Write("A"); else if (i < 0) Console.Write("B"); }

BBBzeroAAA

Which method will wipe out all text on the screen?

Console.Clear();

(1 point Bonus Question - Multiple Choice) A is a field that cannot be changed by any statement in the class.

constant field

You can redeclare a variable.

false

A(n) is a set of instructions that a computer follows to perform a task.

program

An informal language that has no syntax rules and is not meant to be compiled or executed is called ___________ .

pseudocode

A file that contains program code is called a(n) .

source code file

How do you create a variable with the floating number 2.8?

double x+2.8D;

(Multiple Answers) Which of the following are legal C# variable names?

-delete_me -answer -value1

What is the name of the framework that C# runs on?

.NET

The rules that must be followed when writing a program are called ____________.

syntax

A namespace is a container that holds .

classes

A ____________ performs a calculation and gives a value.

math expression

Which data type is used to create a variable that should store text?

Txt

How you compile and run your C# project in Visual Studio?

-push the green start button on the toolbar -press f5 -choose debug>start debugging from the main menu

To close an application's form in code, you use the statement Close.This();

false

Today, CPUs are huge devices made of electrical and mechanical components such as vacuum tubes and switches.

false

When a Label control's AutoSize property is set to True, you can manually change the size of the control by clicking and dragging its bounding box.

false

When you append the letter D or d to a numeric literal, it is treated as a decimal and is referred to as a decimal literal.

false

The property holds the text that is displayed on the face of the button.

text

Which operator is used to add together two values?

the + sign

The part of a computer that runs programs is called ______________.

the CPU

C# ignores whitespace (spaces, tabs, newlines) as long as it can tell where one thing ends and the next begins.

true

C# is a case-sensitive language.

true

A can occupy multiple consecutive lines in a program.

block comment

A(n) expression has a value of either true or false.

boolean

A syntax error does not prevent a program from being compiled and executed.

false

Changing an object's Text property also changes the object's name.

false

If a do-while loop's condition is false initially, the loop's body may not run at all.

false

Images, such as the ones you make with your digital camera, cannot be stored as binary numbers.

false

In the decimal numbering system, all numeric values are written as sequences of 0s and 1s.

false

The assignment operator assigns the value that appears on its left side to the item that appears on its right side.

false

A(n) appears on one line in a program.

line comment

A decision structure is written inside another decision structure.

nested

Name the family of .NET methods that can be used to convert a string to any of the numeric data types.

parse methods

Fundamental types of data, such as strings, integers, and real numbers, are known as .

primitive data types

Which keyword is used to return a value inside a method?

return

A structure provides one alternative path of execution.

single-alternative decision

Because assembly language is so close in nature to machine language, it is referred to as a low-level language.

true

In the earliest computers, CPUs were huge devices made of electrical and mechanical components such as vacuum tubes and switches.

true

Main memory is commonly known as random access memory, or RAM. It is called this because the CPU is able to quickly access data stored at any random location in RAM.

true

The form's title is displayed in the bar along the top of a form.

true

When you double-click a control in the Designer, Visual Studio not only creates an empty event handler, but it also writes some code that you don't see, elsewhere in the project that is necessary for the event handler to properly function.

true

void means that a method does not have a return value.

true

A is a storage location in memory that is represented by a name.

variable

A ListBox's index numbering starts at .

0

What is a correct syntax to output "Hello World" in C#?

Console.WriteLine("Hello World");

How do you display a quote mark in Console App template?

Console.WriteLine("\"");

Which of the following statements is true about C#.

You use double-quotation marks to create a literal string.

A component that collects data from people or other devices and sends it to the computer is called ______________.

an input device

Why do computers use zeros and ones?

because digital devices have two stable states and it is natural to use one state for 0 and the other for 1.

Objects that are visible in a program's graphical user interface are commonly referred to as _____________ .

controls

A ____________ is commonly used to control the number of times that a loop iterates.

counter variable

A variable's indicates the type of data that the variable will hold.

data type

The section of a switch statement is branched to if none of the case values match the test expression.

default

A(n) _________ is an unexpected error that occurs while a program is running, causing the program to halt if the error is not properly dealt with.

exception

Buttons are the only controls that can respond to Click events.

false

C# is a special-purpose language optimized for making web applications.

false

C# only has binary operators but no unary or ternary operators.

false

Windows, Linux, macOS, iOS, and Android are all examples of application software. True

false

Word processing programs, spreadsheet programs, e-mail programs, Web browsers, and games are all examples of application software.

false

Which of the following has the largest range?

long

____________ programs are usually event driven.

Graphical user interface

____________is the physical aspect of the computer that can be seen.

Hardware

Which of the following options is the most precise?

decimal

In C#, you must __________ a variable before you can use it to store data.

declare

In the__________ part of the fetch-decode-execute cycle, the CPU determines which operation it should perform.

decode

What would you call a device that works with binary data?

digital device

C# provides only the basic keywords and operators that you need to construct a program.

true

In C# code, each opening brace must have a corresponding closing brace at some point later in the program.

true

In C#, there are three types of comments: line comments, block comments, and documentation comments.

true

Most controls have a ___________ property that determines whether the control is visible on the form at run time.

visible

Programmers commonly use blank lines and indentations in their code to create a sense of .

visual organization

What type of software controls the internal operations of the computer's hardware?

Operating system

The ________ property can be used to change the text's alignment in the label.

TextAlign

The physical devices that a computer is made of are referred to as ____

hardware

What determines an object's appearance and other characteristics?

An object's properties

_________ is a feature of Visual Studio that provides automatic code completion as you write programming statements.

IntelliSense

Can you use C# alone to perform advanced operations such as creating GUIs, reading data from a file, or working with databases?

No, because C# provides only the basic keywords and operators that you need to construct a program.

The ____________ translates an assembly language program to a machine language program.

assembler

The equal sign (=) is known as the __________ .

assignment operator

In the __________ numbering system, all numeric values are written as sequences of 0s and 1s.

binary

A(n) is the thin dotted line that encloses an object in the Designer.

bounding box

Which statement is used to stop a loop?

break;

A ___________ is enough memory to store a letter of the alphabet or a small number.

byte

Before GUIs became popular, the ___________ interface was the most commonly used.

command line

The int type can store any possible integer.

false

A belongs to the method in which it is declared, and only statements inside that method can access the variable.

local variable

. NET provides a class named , which contains numerous methods that are useful for performing advanced mathematical operations.

math

A program and its data must be moved into the computer's__________ before they can be executed by the CPU.

memory

A video display is a(n) _________ device.

output

You can use a(n) ____________ control to display a graphic image on a form.

pictureBox


Related study sets

Ch 9 - Cellular Respiration and Fermentation

View Set

ATI Medical-Surgical: Endocrine RSNG Spring 2018

View Set

Chapter 18- Patient Exams and Procedure

View Set

Chapter 13: Information Security and Controls

View Set

4.05 Unit Test: Recreation and Spending

View Set

APUSH: Inquisitive: Chapter 2: Beginnings of English America, 1607-1660

View Set

Week 8: Argentina, Tango, and Dance

View Set

OT Practice Models [Willard & Spackman's OT-12th Edition]

View Set