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

Class9 Practice Session Solved

Gjdvygnxbn

Uploaded by

deviljoy001
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)
32 views3 pages

Class9 Practice Session Solved

Gjdvygnxbn

Uploaded by

deviljoy001
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
You are on page 1/ 3

COMPUTER APPLICATION PRACTICE SESSION – 1

NAME __________________________________________________

CLASS __9__SECTION ____ ROLL ____ DATE___03.06.24____ MARKS OBTAINED__________

A. CHOOSE THE CORRECT OPTION. [1X10 =10]

1. _____________converts the source program into the object program one line at a
time.
a. Compiler
b. Assembler
c. Interpreter
d. Developer
2. In Object Oriented Programming, using a function for many purposes is termed as
a. Polymorphism
b. Encapsulation
c. Data Abstraction
d. Inheritance
3. In class student, name, roll number are the state of the class student. What is state
with respect to Object Oriented Programming.
a. State in a class are the attributes of the class
b. State in a class are the methods of the class
c. State in a class are the values of a class
d. State in a class are the data types of the class
4. \t is the escape sequence of:
a. New line feed
b. Horizontal tab
c. Carriage return
d. Form feed
5. Which one is not a token in JAVA?
a. &&
b. \n
c. ;
d. new
6. Class is a _____
a. Non-primitive data type
b. Object Factory
c. Composite data type
d. All are correct
7. Datatype to store “M” is _________, ‘M’ is ____________
a. String, character
b. String, char
c. char, String
d. Char, string
8. int a=5 then if(a==6) returns
a. 5
b. 6
c. TRUE
d. FALSE
9. System.out.print(“Welcome\n to Kolkata”);
a. Welcome to Kolkata
b. Welcome \n to Kolkata
c. “Welcome\n to Kolkata”
d. Welcome
to Kolkata
10. The method use to input String a = “Welcome to the world of JAVA programming”;
a. next()
b. nextLine()
c. nextInt()
d. nextcharAt(0);

B. Answer the following questions: [2X5 = 10]

1. Write the java expression of: (a+b)2 = a2+b2+2ab

(a+b)*(a+b)=a*a+b*b+2*a*b

2. Find the output of int a=4, b=3, c=8, d= 9; ((c/a)<=(d/b)) ? (c-a) : (d-b)

((8/4)<=(9/3))?(8-4):(9-3)

(2<=3)?4:6

(TRUE)  4 (ans)

3. Output of: a+= a++ + ++a + --a + a-- ; when a=7

a = a+ a++ + ++a + -- a + a—

= 7+7+ (8+1) + ( 9-1) + 8

=14+9+8+8

=39

4. Write one difference of runtime and syntax error.

A syntax error is a mistake in the code's structure, while a runtime error occurs during the
program's execution.

5. State the value of n and ch

char c =’A’;
int n = c+1;
char ch = (char)n;

n=66
ch=B

You might also like