Data types and type conversions

Data types and type conversions

9th Grade

12 Qs

quiz-placeholder

Similar activities

Python Data Types

Python Data Types

9th - 12th Grade

10 Qs

Computer Quiz

Computer Quiz

9th Grade

12 Qs

Loops

Loops

9th - 12th Grade

10 Qs

C++ cap. 4

C++ cap. 4

9th - 12th Grade

15 Qs

Java switch/for/while

Java switch/for/while

9th - 12th Grade

15 Qs

Basics in Java

Basics in Java

9th - 12th Grade

15 Qs

Variables

Variables

9th - 12th Grade

17 Qs

Recursion in Java

Recursion in Java

9th - 12th Grade

10 Qs

Data types and type conversions

Data types and type conversions

Assessment

Quiz

Computers

9th Grade

Medium

Created by

RAVINDRA INDURTHI

Used 2+ times

FREE Resource

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is not a primitive data type?

Boolean

Character

Arrays

Integer

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default value of boolean?

true

false

'1'

'0'

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this program?

public class TestMain {

public static void main(String[] args) {

int abc;

System.out.println(abc+" default value");

}

}

0 default value

Compile time error - Local variable may not have been initialized

Run time error - Local variable may not have been initialized

None of Above

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this program?

public class TestMain {

          static int abc;

          public static void main(String[] args) {

                   System.out.println(abc+" default value");

          }}

0 default value

Compile time error - Class variable may not have been initialized

Run time error - Class variable may not have been initialized

None of Above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following can be a valid value for a char data type?

"A"

'A'

65

Both b and c

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a primitive data type in Java?

float

void

char

short

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type would be most suitable for storing the price of an item in a store?

int

double

boolean

char

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?