0% found this document useful (0 votes)
4 views3 pages

Computer Brain Developer

The document contains a series of assertion-reasoning multiple choice questions and general multiple choice questions related to Java programming concepts, specifically focusing on data types and their characteristics. It includes questions about the final keyword, primitive data types, character sets, and type casting. Additionally, there are true or false statements to assess understanding of Java programming fundamentals.

Uploaded by

titusyt09
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views3 pages

Computer Brain Developer

The document contains a series of assertion-reasoning multiple choice questions and general multiple choice questions related to Java programming concepts, specifically focusing on data types and their characteristics. It includes questions about the final keyword, primitive data types, character sets, and type casting. Additionally, there are true or false statements to assess understanding of Java programming fundamentals.

Uploaded by

titusyt09
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Brain Developer

Application
Section 1: Objective Questions
Assertion Reasoning MCQs.
1. Assertion (A); Avariable declared with the final keyword in Java cannot be reassigned once it is
initialized.
Reason (R): The final keyword ensures that the variable can be asigned multiple values during its
lifetime.
a. Assertion and Reason both are correct. b. Assertion is true and Reason is false.

c Assertion is false and Reason is true. d. Assertion and Reason both are false.
2 Asertion (A;: The short data type in Java is a16-bit signed integer.
Reason (R; The short data type has a range from -32,768 to 32767.
69
a. Assertion and Reason both are correct. b. Assertion is true and Reason is false.
c. Assertion is false and Reason is true. d. Assertion and Reason both are false.
3. Assertion (A): The byte data type in Java is a signed &-bit integer.
Reason (R): The range of the byte data type is from -128 to 127.
a. Assertion and Reason both are correct. b. Assertion is true and Reason is false
c. Assertion is false and Reason is true. d. Assertion and Reason both are false.
4. Assertion (A): The char data type in Java can store any character from the Unicode character ut
Reason (R): The char data type in Java is 8 bits wide.
a. Assertion and Reason both are correct. b. Assertion is true and Reason is false.
c. Assertion is false and Reason is true.
d. Assertion and Reason both are false.
B. Multiple choice questions. Understanding | Recall
What does the given picture depict?
int float char Class
Array
a. Primitive data types b. Non-primitive data types
:. Variables d. Data types
2. Java uses Character set.
a. ASCI b. ISCII c. Unicode d. All of these
3. The ASCIl code of 'B' is
[ICSE-2022|
a. 67 b. 66 c. 98 d. 99
4. Adata type which contains integer as well as fractional part and occupies 32 bits. [ICSE-2022]
a. float b. char c. double d. byte
Which of the following are primitive data types? |ICSE-2020|
1. double 2. String 3. char 4. Integer
a. 1 and 2 b. 1 and 3 c. 3 and 4 d. 1 and 4
The size of the char data type is
a. 1 bit b. 1 byte c. 16 bits d, 8 byte
The number of bytes occupied by int data type
a. 2 bytes b. 1 byte c. 4 bytes d. 8 byte
Which of the following does not represent a character literal?
a. 'a' c.'\a d. "a"
9. Which of the following keyword is used to create symbolic constants in Java? (ICSE-2022)
a. final b. Final c. Constant d. Const
10, Reserved words are also called
a. identifier b. method c. keywords d. packages
11. Which keyword turns a variable declaration into constant declaration?
a. const b. constant c. fixed d. final
70
ih of the following is an escape sequence character in Java?
(ICSE-2024]
b. \t c. d. l/n
13 User defined type conversion is known as
a. coercion
b. type promotion c type casting d. implicit conversion
14 int x =98; char ch=(char)x; what is the value in ch2 [ICSE-2024)
a.b b. A c.B d. 97
15, intx =(char)32.8; is an example of typecasting. (ICSE-2023]
a. implict b. automatic
expliit d. coercion
16. Which of the following is a primitive data type?
a. array b. class .char d. reference
17. Arrange the following primitive datatypes in ascending order of their size:
char, byte, double, int
a. char, byte, double, int b. byte, char, int, double
c. byte, double, int, char d. byte, int, char, double
Recall
c State whether the given statements are True or False.

0
1. The smallest urit in a Java program is known as a token.
2. The Uricode character set uses between 8 and 32 bits per character.
3. In an escape sequence, a character is a preceded by a forward slash (/).
4. In Java, an identifier cannot begin with a $sign.
5. The boolean data types are used for storing logical values.
6. Char is a non-primitive data type. [ICSE-2022]
7. If aliteral constant contains a decimal point, then it is of the type double by default.

You might also like