Ajay Chaudhary Classes Being Brilliant:-: Computer Test (Full Syllabus) Time: 2 Hrs
Ajay Chaudhary Classes Being Brilliant:-: Computer Test (Full Syllabus) Time: 2 Hrs
SECTION – A
(40 MARKS)
ATTEMPT ALL QUESTIONS FROM THIS SECTION.
Question 1. [2x3]
Question 2. [2x3]
b) Arrange the given data types in descending order of their size: char, long, float, Boolean
Question 3. [2x6]
1) System.out.print(Math.ceil(-6.25)); 2) System.out.print(Math.Floor(-6.25));
e) Write one similarity and one difference between for loop & while loop.
SECTION – B
(60 MARKS)
(Attempt any four in this section)
(Each program should be written using variable description)
Question 4.
The International Standard Book Number (ISBN) is a unique numeric book identifier which is printed on every
book.
The ISBN is based upon a 10-digit code. The ISBN is legal if: 1xdigit 1 + 2xdigit2 + 3xdigit3 + …………….+ 10xdigit10 is
divisible by 11
Sum= 1x1 + 2x4 + 3x0 + 4x1 + 5x6 + 6x0 + 7x1 + 8x4 + 9x9 = 253 , which is divisible by 11.
ii) If the ISBN code is not a 10-digit integer, output the message, “Illegal ISBN” and terminate the program.
iii) If the ISBN code is a 10-digit, extract the digits of the code and compute the sum as explained above.
If the sum is not divisible by 11, output the message “Illegal ISBN
Question 5.
12345
11234
11123
11112
11111
2+5+10+17+26--------------
Question 6. Write a menu driven program in Java to input a number and check whether it is a: [15]
Note:
DISARIUM: A number will be called DISARIUM if sum of its digits powered with their respective
(Workings 11+32+53 = 135, some other DI SARI UM are 89, 175, 518 etc)
DUCK: A Duck number is a number which has zeroes present in it, but there should be no
For example 3210, 7056, 8430709 are all Duck numbers whereas 08237 is not.
Question 7.