Computer Application Test
Computer Application Test
co m/
Sample Paper 2012 Class X Subject Computer Application Time: 2 hour M.M 100 General Instructions to Solve the Paper Each paper consists of two Sections Attempt all questions in Section A and any four questions in Section B. Section A is of 40 marks and Section B is of 60 marks. In Section B each program should e written using !aria le description. SE TI!"#$ %$ttempt all &uestions' (uestion 1. %)*2+10' "a# $ifferentiate etween class !aria le and Instance !aria le. " #%ention two difference etween Binary search and &inear search' "c# $efine wrapper class. "d#(hat do you mean y r!alue and l!alue' "e# (hy is class also called composite data type' )i!e an e*ample also. (uestion 2. %)*2+10' "a# State the difference etween +onstructor and %ethod. " #$efine fall through. "c# (hat is the difference etween ordinary compilation and ,a!a compilation' "d#(hat is the difference etween String and StringBuffer' "e# (hat is meant y pri!ate !isi ility of a method' (uestion ,. "a# -ame the keyword that %,' "i# .ransfers the control to the eginning of the loop and skips the rest of the loop ody. "ii# .he !aria les whose single copy is made for all the o /ects of a class. "iii# .he keyword that is used to distinguish etween instance !aria le and local !aria les. " #)i!e the output of the following0 %2' int *1203 int y1403
www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.aipmtguess.com | www.aieee.com | www.niosguess.com | www.iitguess.com
http://www.icseguess.co m/
if""*5y#66"*17#820# System.out.print"y#3 else System.out.print"*#3 "c# (hat will e the output of the following program segment' String name9:1;<Board=>=E*aminations=?3 System.out.println"name90:.length"##3 System.out.println"name.length"##3 "d#@ind the output class Aa ; !oid display"# ; int a9:1;4>7>A>7>B?3 int i143 a9i:C1"a9iC2:CC#D"DDa9iD2:#3 for"i103i573iCC# System.out.println"a9i:#3 ? ? "e# $ifferentiate etween ase and deri!ed class.
"f# (rite the /a!a e*pressions for
%2'
%,'
%2'
%2' "g#(rite function prototype that returns a Boolean !alue and takes two characters as parameter. %2' "h#In ,a!a !arious %ath functions are defined in which class and under which package. %2' "i# (rite a single line statement using ternary operator to find the ma*imum of three num ers. %2' SE TI!"#%$ttempt an. /our &uestions /rom this Section' (uestion 0. $efine a class Salary in ,a!a with the following details0 $ata mem ers0 name9: array to store names of 40 employees.
www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.aipmtguess.com | www.aieee.com | www.niosguess.com | www.iitguess.com
http://www.icseguess.co m/
netsal9: array to store net salary of 40 employees. %em er functions0 !oid input"# to accept names of 40 employees and their corresponding net salaries. !oid selection"# to sort the array netsal in descending order and arrange the names accordingly. Ese selection sort technique. !oid print"# to print the sorted data in the following format. -et Salary -ame FFFFFFFFF. FFFFFFFFF. FFFFFFFFF. FFFFFFFFF. %1)' (uestion ). (rite a program to accept any string0 +ount and print the num er of pairs of consecuti!e letters present in words in the forward direction only. Assume that all the letters in the string are in the same case> consecuti!e letters in two different words are not counted and GHaI or GJAI in any word is not a consecuti!e pair. %1)' @or e*ample0 I-KE.0 Enter String0 ABS.LA+. S.LI-) IS BEI-) +ME-.E$ E$E+A.IM-A&&N. ME.KE.0 Kairs of consecuti!e letter0 B (usetion 1. (rite a program to store following num ers in an array and shift all negati!e elements of an array to right hand side of the array without altering the original sequence "without another array#. %1)' i.e. if array contains0 7> D4> B> D4> 6> D22> 24> DA> O .hen output will e0 7> B> 6> 24> O> D4> D4> D22> DA (uestion 2. (rite a menu dri!en program using function o!erloading "the function name is display# to perform the following0 "a# .o find the sum of the series up to the limit gi!en y user i.e. 4CBC7CPC22C FFFFF.. %2' " #.o print the following pattern0 %3' 000
www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.aipmtguess.com | www.aieee.com | www.niosguess.com | www.iitguess.com
http://www.icseguess.co m/
002 020 022 200 202 220 222
Question 8.
(rite a program to store n num er of state name and its capital in ascending order and then input a state name and print its capital if it is in the list otherwise print the appropriate message using inary search. %1)' (uestion 4. a# (AK to calculate the sum of the following series. S 1 QR D 4S7R D 4S20R C AS2PR T 26S46R T B4SBPR C 64S70R FF..n terms # (AK to display the chain of 7 consecuti!e composite num ers within 2 to 200. e.g 44> 47> 46> 4P> 4A
Paper Su6mitte7 -.: "ame Si77hartha Shan8er Misra Email ssmisra9g8:.ahoo.co.in Phone "o. 401)2)31)1
www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.aipmtguess.com | www.aieee.com | www.niosguess.com | www.iitguess.com