You are on page 1of 3

Computer Dot Com

A complete computer education


Under W.B Government registered
Chapter -4 [Question]
Class date : 15-7-2020

Tick (√) the correct option.


1. Which among the following encoding system can represent 65536 characters?
a. ASCII b. Unicode
c. Both a and b d. None of these
2. Which among the following is not a Token?
a. Keywords b. Literals
c. Identifiers d. Data Type
3. Which among the following is a keyword but not a literal?
a. for b. null
c. true d. false
4. Which among the following is a valid float literal?
a. 12.36f b. 12.36F
c. 12.36 d. Both a and b
5. Which among the following is a valid octal integer literal?
a. 0178 b. 675
c. 0675 d. 0X675
6. Which among the following is a valid method of initialising?
a. boolean f=true; b. boolean f=True;
c. boolean f=’true’; d. None of these
7. Which among the following is not a punctuator?
a. ; semicolon b. , comma
c. : colon d. . dot
17 Computer Applications – IX (ICSE Course) Answers
8. Which among the following is not a primitive data type?
a. int b. float
c. String d. char
B. Fill in the blanks.
1. ______________ is a valid set of characters used in a Java language.
2. A ____________is a type encoding that can represent characters of all the languages of the world.
3. _______ is the fundamental building block of a program.
4. ________ are reserved words in Java that provide a special meaning to the java compiler.
5. The names given to different parts of a program are called ___________.
6. __________ integer literals are always prefixed with 0.
7. Literals that are enclosed within double quotes are called __________ literals.
SECTION A
A. Very short answer type questions
1. Identify the mistake in each of these lines and correct it:
a. int goto=5;
b. float a=12.3;
c. doubles b=15;
d. long b=1536458888397632;
e. String s= ‘Computer’;
2. State with reasons why are the following variable names invalid:
a. for
b. book list
c. 2ndTerm
d. hash#
e. sick@always
3. What is the resultant data type of the following mathematical expression?
a+b*c-d
a. where a is int, b is int, c is float and d is float type
b. where a is float, b is long, c and d are of int type
c. where a is of double and b,c and d are of int type.
d. where a is char and b,c and d are of int type
e. where a, b, c and d are of int type, however the expression is slightly modified as (a+b*c-d)/7.0
B. Short answer type questions
State with reasons why are the following initializations incorrect:
a. int a=5;
short b=a;
b. double a=5.3;
float b=a;
c. int a=01238;
d. float a=17.36f;
int b=a;
e. boolean a=true;
int b=a;
1. What is Character Set?
2. What are keywords?
3. What are Identifiers? State the rules while using Identifiers.
5. State the difference between a boolean literal and a character literal.
6. How are floating point numbers represented in Java?
7. What are variables? How are variables initialized?
8. How are symbolic constants represented in Java?
9. What are separators?
10. What is Type Conversion? Name the two type conversions in Java.
11. Name two keywords which are also literals in Java.
12. What do you understand by variable scope?

You might also like