Watch Java videos
ICSE class IX computer practice Test
Section A
- What is data type? Give examples. [2]
- What is literal? Give an example. [2]
- What will be the value of c. [2]int a=9, b=5,c;c=a + b++ + --a;If a=19; [1]
- What will be the value of ~a.int a=25,b=23; [1]c=a|b;Value of c=__________________.
- Write the output generated by the following [1]100+5<200 || 950>300+2;
- Write difference between Implicit & Explicit type casting. [2]
- What is an object. [2]
- Write the expression in Java for [2]Sin x+ √(〖ax〗^2-bx+c)/2a
Section B
Write any one program from the following. [10]
Write a program to To find and display the factorial of a number input by the user ( the factorial of a non negative integer n , denoted by n!, is the product of all integers less than or equal to n.
Example:
Sample input : n =5
Sample output : 5!=1x2x3x4x5=120
write a class to input a number and print its odd factors [6 has odd factors 1,3]