Page 118 - computer science (868) class 11
P. 118
Unsolved Questions
A. Tick ( ) the correct option:
1. What is the size of the char data type?
a. 2 bytes b. 8 bytes
c. 4 bytes d. 1 byte
2. How do you assign a String value?
a. string s="abc" b. String str="Abc";
c. String s=aa d. None of these
3. What will be the output of the following code?
double a=6.5, b=8.9;
int c= (int)(a+b);
System.out.println(c);
a. 12 b. 14
c. 15 d. 16
4. What is the wrapper class of long data type?
a. Float b. Character
c. Double d. Long
5. Which of the following is the range of ASCII values from A to Z?
a. 97 to 122 b. 48 to 57
c. 65 to 90 d. None of these
B. Fill in the blanks:
1. ………………… literals contain two values true or false only.
2. A constant is assigned to a variable using the symbol ………………… .
3. When a variable is initialised during the execution/run time of the program, it is known as ………………… .
4. ………………… are used to set the priority of a calculation by enclosing any part of an arithmetic, logical, or relational expression.
5. ………………… is used to access the scope of a function.
6. Non-graphical characters are known as ………………… .
7. The size of int data type is ………………… bytes.
8. The char data type is a single ………………… Unicode character.
9. When the variables and constants in an expression are of the same data type, then the expression is known as ………………… .
10. To assign a value of a larger data type to a smaller data type, the concept of ………………… data conversion is used.
C. Answer the following questions:
1. What do you mean by widening in implicit type conversion?
2. What is an Arithmetic expression? Write the names of different types of arithmetic expressions.
3. What are the rules of \', \", \\ and \0 escape sequences?
4. What are the rules that we must follow at the time of naming a variable?
116116 Touchpad Computer Science-XI

