Search Header Logo

AP CSA Topic 1 Primitive Types

Computers

9th - 12th Grade

Used 6+ times

AP CSA Topic 1 Primitive Types
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the resulting value of x?


int x;

x = 2.3;

Error

2

2.3

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the resulting value of x?


double x;

x = (int) (2 + 3.3);

Error

5

5.3

5.0

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which variable type is NOT a primitive variable type?

boolean

String

int

double

char

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is a logic error?

An mistyped statement that causes the compiler to throw an exception.

An illegal operation that causes the compiler to throw an exception.

An illegal operation that causes the program to have a run-time error.

An error a programmer makes that causes the program to behave differently than expected.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the long form of x+=5?

x = 5;

x = + 5;

x = x + 5;

y = x + 5;

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Given this code, what will be the output

23

num19

Your num2 is 17

16

Your num2 is 18

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Given this code, what will be produced

17

Your num2 is 17

Your num2 is 18

18

compile time error

Access all questions and much more by creating a free account

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?