• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 4 fuera de 39 páginas
Examen

CS 170 Midterm || All Correct.

Document preview thumbnail
Vista previa 4 fuera de 39 páginas

Q1. Software or programs, are generally stored on your hard or fixed disk, but are run by loading them: A. into your network adapter B. into secondary storage C. onto the CPU D. into main memory correct answers D. into main memory Q1 The devices that feed data and programs into computers are called ____. A. input devices B. output devices C. monitors D. printers correct answers A. input devices Devices like keyboards, mice and scanners, which your program uses to receive information, are called input devices. Q1 Which of the following is NOT part of the central processing unit? A. instruction register B. main memory C. program counter D. control unit correct answers B. main memory Q1 Programs that are designed to "work for you", carring out a task you specify, are known as: A. system programs B. operating systems C. utility software D. application programs correct answers D. application programs Q1 Each memory cell has a unique location in main memory, called the ____. A. unique identifier B. ID C. address D. cell location correct answers C. address Q1 When a Java string does not have surrounding double quotes, what type of error occurs? A. Logic error B. Run-time error C. Compile-time error D. Linker error correct answers C. Compile-time error Q1 In the DrJava IDE, you can evaluate and try out fragments of Java code without writing an entire program in the: A. Interactions Pane B. Interpreter Pane

Vista previa del contenido

CS 170 Midterm || All Correct.
Q1. Software or programs, are generally stored on your hard or fixed disk, but are run by loading
them:
A. into your network adapter
B. into secondary storage
C. onto the CPU
D. into main memory correct answers D. into main memory

Q1 The devices that feed data and programs into computers are called ____.
A. input devices
B. output devices
C. monitors
D. printers correct answers A. input devices

Devices like keyboards, mice and scanners, which your program uses to receive information, are
called input devices.

Q1 Which of the following is NOT part of the central processing unit?
A. instruction register
B. main memory
C. program counter
D. control unit correct answers B. main memory

Q1 Programs that are designed to "work for you", carring out a task you specify, are known as:
A. system programs
B. operating systems
C. utility software
D. application programs correct answers D. application programs

Q1 Each memory cell has a unique location in main memory, called the ____.
A. unique identifier
B. ID
C. address
D. cell location correct answers C. address

Q1 When a Java string does not have surrounding double quotes, what type of error occurs?
A. Logic error
B. Run-time error
C. Compile-time error
D. Linker error correct answers C. Compile-time error

Q1 In the DrJava IDE, you can evaluate and try out fragments of Java code without writing an
entire program in the:
A. Interactions Pane
B. Interpreter Pane

,C. Snippets Pane
D. Definitions Pane correct answers A. Interactions Pane. Definitions Pane is where you write
your code.

Q1 What is the computer component that stores program instructions during a program
execution?
A. Hard disk
B. Memory
C. DVD drive
D. Input correct answers B.Memory

Q1 Text, like everything else in your computer, is stored as raw binary numbers. To treat those
numbers as characters, they must be encoded. The encoding scheme used in Java is called:
A. EBCDIC
B. RSA
C. Unicode
D. SHA-256 correct answers C. Unicode

EBCDIC is a character encoding scheme, but not the one used in Java, which is Unicode.

Q1 If your Java source code program compiles, but displays an error message when you run it,
then it must have a:
A. spelling error
B. syntax error
C. runtime error
D. logic error correct answers C. runtime error

Q2 The elements inside the class body are surrounded with, or delimited by:
A. single-quotes
B. brackets [ ]
C. braces { }
D. double-quotes correct answers C. braces {}

Q2 Which of these must appear outside the body of a class?
A. variable definitions
B. comments
C. import statements
D. output statements correct answers C. import statements

Q2 In a main method definition, the symbols appearing inside the () are called the:
A. modifier
B. parameter list
C. access specifier
D. method return type correct answers B. parameter list

Q2 Which of these is a legal (that is, syntactically correct) Java identifier?

,A. U2
B. bo-Tox
C. 2LiveCrew
D. moo tunes correct answers A. U2

While letters, digits and underscores are legal in identifiers, you cannot start with a digit. You
also cannot have spaces or hyphens in an identifier. That leaves only U2.
identifiers can start with S signs or _ as well.

Q2 Which of these words that can appear in a Java program are identifiers?
A. static
B. public
C. void
D. out correct answers D. out

Only out is an identifier. void, public and static are all keywords that you've used in your
programs.

Q2A(n) ___________________ is a program that converts assembly language or high-level
language statements into machine code at the time the program runs.
A. interpreter
B. assembler
C. linker
D. compiler correct answers A. interpreter

A compiler converts an entire program to machine language. An interpreter converts your
program on a line-by-line basis while program runs. This resolved portability & translation
issues. An assembler is used to convert assembly to machine language for CPU to understand, it
needed to be written everytime for a new computer.

Q2 The early high-level programming language designed as a general-purpose numeric and
scientific programming language, and one which had a significant influence on the procedural
languages that we use today was named ___________________
A. Algol
B. LISP
C. COBOL
D. FORTRAN correct answers D. FORTRAN

fortran = scientists & engineers
cobol = buisness
LISP = math
algol - arithmetic for general purpouse

Q2 Method definitions should be placed:
A. inside the body of your class
B. after the class it is used in

, C. inside the Java class library
D. before the class it is used in correct answers A. inside the body of your class

method definition = (String[] args)

Q2 Here is a portion of the source code for a computer program:

69 6D 70 6F 72 74 20 6A-61 76 61 2E 61 77 74 2E
2A 3B 0D 0A 69 6D 70 6F-72 74 20 6A 61 76 61 2E
61 77 74 2E 65 76 65 6E-74 2E 2A 3B 0D 0A 69 6D

This program is an example of _____________________________.
A. high-level language
B. hard-coded language
C. assembly language
D. machine language correct answers D. machine language

Machine language is the numerical code that your CPU is programmed to respond to. Assembly
language is more english type of code used for people to understand.

Q2 Which of these identifiers follows the Java conventions (not just the syntax rules) for a
constant name?
A. TotalCost
B. TOTAL_COST
C. totalCost
D. total_cost correct answers B. TOTAL_COST

By convention, constants are all CAPS_WITH_UNDERSCORES separating the words.

Q3 The statement System.out.print("No" + 2 + 3 + "way"); produces the output:
A. No5way
B. No23way
C. None. Illegal statement.
D. No 2 3 way correct answers B. No23way

The concatenation "pastes" the 2 onto the end of "No" before the 3 could be added. The the 3 is
concatenated onto the result.

Q3 In a variable definition, the kind of value stored inside is called its:
A. type
B. name
C. initial value
D. modifier correct answers A. type. Variables are named storage area that holds a value. Syntax
of variable= modifier type name = intial value; int x =2; x = type where value is stored

Q3 To join two String objects together, use the __________ operator.

Información del documento

Subido en
25 de marzo de 2025
Número de páginas
39
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$15.19

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
SirAnton
3.7
(118)
Vendido
811
Seguidores
438
Artículos
40316
Última venta
1 semana hace




Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes