Professional Documents
Culture Documents
Sample Questions For Mock, Practise, Assessment
Sample Questions For Mock, Practise, Assessment
Sample Questions For Mock, Practise, Assessment
input format 1
5
16
30
20
18
19
output format1
16 18 19 20 30
input format 2
-9
output format2
Invalid Size
input format 1
5
15
31
20
18
19
output format1
25.00
input format 2
-9
output format2
Invalid Size
input format 3
3
15
20
18
output format3
No prime number found
Q3. Accept size & values of an int array .
If the size is zero or negetive then display message "Invalid Size"
and quit the program.
Accept input in array,
1.each value must higher then 10 otherwise re-accept that number.
2.Find the odd numbers in it then ,
multiply the digits of each odd numbers and store the result
them in a second array in descending order.
hint :input:{24,45,11,14,23,70,18}
the odd numbers in the array{45,11,23}
multiply the digits of each number
4*5=20
1*1=1
2*3=6
output:20 6 1
input:6481937
output:3
Q5.Wap the will accept the size and elements in an int array.
*Find the repeating elements & arrange them in acsending order
in an output array.
*If the size is zero or negetive then display
"Invalid Size",
*if no repeating elements then display message "No Repeated Elements"
*if any element in input array is 0 or negetive then display message
"Invalid Input".
All text in bold corresponds to input and the rest corresponds to output.
is
20
All text in bold corresponds to input and the rest corresponds to output.
Ampphisoft
Amphi
Amphisoft
Amphi
All text in bold corresponds to input and the rest corresponds to output.
Ampphisoft
softi
Amphisoft
soft
All text in bold corresponds to input and the rest corresponds to output.
Indiasoft
Technologies
is
private
organization
All text in bold corresponds to input and the rest corresponds to output.
ITT
TTT
All text in bold corresponds to input and the rest corresponds to output.
All text in bold corresponds to input and the rest corresponds to output.
Amphisoft Technologies
A s
m e
p i
h g
i o
s l
o o
f n
t h
T e
e T
h t
n f
o o
l s
o i
g h
i p
e m
s A
All text in bold corresponds to input and the rest corresponds to output.
hello
All text in bold corresponds to input and the rest corresponds to output.
Excellent AXE
Q15. To "capitalize" a string means to change the first letter of each word in the
string to upper case (if it is not already upper case). For example, a capitalized
version of "Now is the time to act!" is "Now Is The Time To Act!". Write a program
to print the capitalized version of the input string.
Capitalized version: