Unit 1 APCSA

Unit 1 APCSA

Assessment

Flashcard

Computers

9th Grade - University

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

29 questions

Show all answers

1.

FLASHCARD QUESTION

Front

Which of the following is not a primitive type? int, double, String, boolean, char

Back

String

2.

FLASHCARD QUESTION

Front

Which of the following statements is true about variables? The memory associated with a variable of a primitive type holds an actual primitive value. When a variable is declared final, its value can only be changed through a direct reassignment. A variable originally created as an int can be changed to store a double through casting. All of these choices are true.

Back

The memory associated with a variable of a primitive type holds an actual primitive value.

3.

FLASHCARD QUESTION

Front

What is the value of x after this code runs: int x = 5; x = 10; x*=2; x+=3;

Back

23

4.

FLASHCARD QUESTION

Front

What is the value of x after this code runs
int x = 5;
x = 10;
x = 4;

Back

4

5.

FLASHCARD QUESTION

Front

What is the proper syntax to declare and initialize a variable called temperature to have the value 70.4?

Back

double temperature = 70.4;

6.

FLASHCARD QUESTION

Front

What is the result of this expression? (int) (5 + 2 / 3 + 1)

Back

6

7.

FLASHCARD QUESTION

Front

Which expression returns the 1’s place of an integer x? Options: x % 10, x / 10, x % 100, x + 1, x / 100

Back

x % 10

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?