1. Keyword is a word used in a high-level language which has a special meaning attached to it.
a) True
b) False
2. A set of characters can be assigned to?
a) Static variable
b) Boolean variable
c) String variable
d) None
3. Which of the following type is an exact representation of fractional values?
a) char
b) double
c) byte
d) String
4. A constant which gives the exact representation of data is called?
a) Identifier
b) Variable
c) Literal
d) Character
5. Choose the correct option
a) boolean m = true
b) boolean m = “true”
c) boolean m = ‘true’
d) None
6. How is a character literal expressed?
a) {}
b) []
c) “”
d) ‘’
7. Which of the following results in integer type?
a) 13.8F/4.6F
b) 12/3
c) 11.4F/3.2D
d) None of these
8. A character literal is assigned to a:
a) Character literal
b) String variable
c) String literal
d) Character variable
9. What is the range of ASCII code of upper-case alphabets?
a) 65-90
b) 65-95
c) 60-85
d) 97-122
10. Choose the non-primitive data type among the following.
a) Long
b) Object
c) Char
d) Short
11. int x = ‘t’;
Which type of casting is shown by the above statement?
a) Explicit
b) Widening
c) Narrowing
d) Implicit
12. Which of the following is in correct ascending order?
a) double, char, int, byte
b) byte, int, char, double
c) byte, char, int, double
d) int, byte, double, char
13. Predict the return data type such that there is no error.
int p=0; double q=0.0;
r = p + q;
System.out.println(r);
a) Int
b) Double
c) Byte
d) Float