Mock 1
Mock 1
(THEORY)
(Two Hours)
The time given at the head of this paper is the time allowed for writing the answers.
You are to answer all questions from Section A, and any four questions from Section B.
The intended marks for questions or parts of questions are given in brackets [ ].
SECTION – A ( 40 Marks )
QUESTION 1:
QUESTION 2:
QUESTION 3:
Each program should be written in such a way that it clearly depicts the logic of the problem.
Give the variable list used in the program. Flowcharts and algorithms not required
QUESTION 5: [15]
Write a program to input the length of the integer array as well as its elements in ascending order
from the user . Input the number to be searched. Perform binary search on the array.
QUESTION 6: [15]
Write a program in java to accept two words and check whether they are anagrams or not.
Anagram: A word that is made with the combination of the letters present in the original word.
Ex: FLOW and WOLF are anagrams, as the second word is made by rearranging the letters of the
first word.
QUESTION 7: [15]
Member functions:
int numberofwords( ) : to find and display the number of words in the string
QUESTION 8: [15]
ii) Series:
1, 11, 111, 1111, ……………… till the 6th element of the series
QUESTION 9: [15]
Define a class employee to input name , pan no, and salary of the employee. Calculate the tax
payable using the data given below
Write program using function overloading called to perform the following operations., to