0% found this document useful (0 votes)
54 views4 pages

Class Xii: # Programming Related To C++ (Any One) (10 Marks)

This document contains instructions for a 3 hour exam with 30 marks for Class 12 students. It provides multiple programming questions in C++ related to arrays, functions, classes, files, sorting, searching and SQL queries on tables. Students are asked to write C++ programs to perform tasks like linear search, bubble sort, queue implementation using arrays, file handling, and more. It also contains the class definitions for Student and Employee to be used in some questions.

Uploaded by

sankalptiwari
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views4 pages

Class Xii: # Programming Related To C++ (Any One) (10 Marks)

This document contains instructions for a 3 hour exam with 30 marks for Class 12 students. It provides multiple programming questions in C++ related to arrays, functions, classes, files, sorting, searching and SQL queries on tables. Students are asked to write C++ programs to perform tasks like linear search, bubble sort, queue implementation using arrays, file handling, and more. It also contains the class definitions for Student and Employee to be used in some questions.

Uploaded by

sankalptiwari
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

CLASS XII

SET II TIME:3Hrs MM : 30

(C++)
# Programming related to C++ (any one) (10 marks) 1 Write a program in C++ using function(s) within a c ass to search the gi!en string in an arra" of #ifferent strings using $inar" search%
& 'uppose ()*)C are arra"s of integers of si+e M), an# M+, respecti!e "% The num$ers in arra" ( an# * appear in ascen#ing or#er% -i!e the necessar" #ec aration for arra" ()* an# C in C++% Write a program with function to pro#uce thir# arra" C $" merging arra" ( an# * in ascen#ing or#er% Write a C++ program on stac. using in. ist% Write a C++ program to rea# an# #isp a" information a$out #ifferent stu#ents of 0(1 'choo % 0(1 wi $e the $ase c ass an# 'T20 wi $e the su$ c ass%

3 /

Base lass !A"


Pri#ate mem$ers o% 'name C ass (##ress P&$li mem$ers o% Input() 4utput() Pri#ate mem$ers o% 5o no Tota 6mar.s P&$li mem$ers o% 7ee#() 0isp a"() lass !A" &0 characters 3 characters &0 characters lass !A" function to fee# the !a ues of sname)c ass an# a##ress function to #isp a" the recor#s lass ST'! integer integer lass ST'! function to fee# the !a ues of ro no an# tota 6mar.s an# a so ca s the input() of $ase c ass% function to #isp a" the recor#s of su$ c ass an# the $ase c ass% Cont#%&

!eri#ed lass ST'!

8&8

9II :5(CTIC(;

3 = >

Write a C++ program on <ueue using arra"% Write a program which wi re!erse the create# in. ist% Create a $inar" fi e in C++ using c ass ?emp o"ee? with the fo owing specification: Class em(loyee@ Int empnoA8 Char enameB&0CA :u$ ic: 1oi# get#ata()A 1oi# show#ata()A D Write a program in C++ using function(s) within a c ass to sort an arra" using $u$$ e sort% (num$er of e ements #epen#s on users choice) 0ec are a c ass to represent $an. account of 10 customers with the fo owing #ata mem$ers% ,ame of the #epositor) (ccount num$er) T"pe of account) (' for sa!ing an# C for current)) *a ance amount% The c ass a so contains mem$er function to #o the fo owing : 1% To initia i+e #ata mem$ers% &% To with#raw mone" after chec.ing the $a ance(minimum $a ance is 5s% 1000) 3% To #isp a" the #ata mem$ers%

E F

10 Create a fi e ?st&d)dat? on the $asis of gi!en c ass ST'!E*T Pri#ate mem$ers o% lass ST'!E*T (#mno integer 'name &0 characters Eng)math)science f oat Tota f oat Ctota () function to ca cu ate eng+mat+science P&$li mem$ers o% lass ST'!E*T Ta.e#ata() function to accept !a ues for a#mno)sname)eng)math) science an# in!o.e ctota () to ca cu ate tota % 'how#ata() function to #isp a" a the #ata mem$ers on the screen% 11 Write a program in C++ using function(s) within a c ass to sort an arra" using se ection sort%(num$er of e ements #epen#s on users choice) Cont#G3 838 9II :5(CTIC(;

1& (ssuming the c ass 'T4CH) write a C++ program to perform fo owing(fi e) i% Write the o$Iects of 'T4CH to a $inar" fi e% ii% 5ea# the o$Iects of 'T4CH from $inar" fi e an# #isp a" them on screen%

13% Write a program in C++ using function(s) within a c ass to search the gi!en !a ue in an arra" of #ifferent integers using inear search%
1/% Write a program in C++ using function(s) within a c ass to create a in.e# ist an# #e ete the no#e from the ast %(no#e contains integer !a ue) 13% Write a program to create an# tra!erse the in.e# ist% The in.e# ist contains 0ata of t"pe integer%

S+L
# ,i#e +&ery $ased -&estions $ased on a S+L ta$le .relation (ony one) (/ marks)
1% Write 'J; comman#s for the fo owing statements on the gi!en ta$ e ?H4':IT(;? Ta$le0 12SPITAL *o) 1 & 3 / 3 = > E F 10 a% $% c% #% e% *ame (5:IT L(5I,( H(5EEM (52, L2*I, HET(HI (,HIT( L(5EE, H2'H 'HI;:( Age =& && 3& 1& 30 1= &F /3 1F &3 !e(artment '25-E5K E,T 45TH4:E0IC '25-E5K E,T E,T C(50I4;4-K -K,(EC4;4-K C(50I4;4-K ,2C;E(5 ME0ICI,E C3arges 300 &30 &00 300 &30 &30 E00 300 E00 /00 Se4 M 7 M M M 7 7 7 M 7

'e ect a the information of patients of car#io og" #epartment% To ist the names of fema e patients who are in E,T #epartment% To #isp a" :atientMs name) Charges) (ge for on " ma e patients% To insert a new row in the H4':IT(; ta$ e with the fo owing #ata: 11)?(7T(*?)&/)?'25-E5K?)300)?M? -i!e the output of fo owing 'J; statements: i% 'e ect C42,T(0I'TI,CT Charges) from H4':IT(;A ii%'e ect MI,((ge) from H4':IT(; where 'eN8?7?A iii%'e ect '2M(Charges) from H4':IT(; where 0epartment8?E,T?A I!%'e ect C42,T(O) from H4':IT(; WHE5E (ge P 30A ContG / 8 /8 9II :5(CTIC(;

&

Write 'J; comman#s for the fo owing statements on the gi!en ta$ e ?C;2*? Ta$le 0 CL'B
C2AC15 I! C2AC1*A6E A7E SP28TS PA9 SEX

1% &% 3% /% 3% =% >% E% F% 10%

H2H5EQ( 5(1I,( H(5(, T(52, L2*I, HET(HI L(5EE, (,HIT( H2'H 'H(I;K(

33 3/ 3/ 33 3= 3= 3> 3F /1 3>

H(5(TE H(5(TE 'J2('H *('HET*(;; 'WIMMI,'WIMMI,H(5(TE 'J2('H 'WIMMI,*('HET*(;;

1000 1&00 &000 1300 >30 E00 1100 &&00 F00 1>00

M 7 M M M 7 7 7 M M

(a) To show a information a$out the swimming coaches in the c u$% ($) To ist names of a coaches with their pa" in #escen#ing or#er% (c) To #isp a" a report) showing coachname)pa" )age an# $onus (13R of pa") for a coaches% (#) To insert a new row in the C;2* ta$ e with the fo owing #ata: 11)S:5(H('HS)3>)S'J2('HS)&300)SMS (e) -i!e the output of fo owing 'J; statements : (i) 'e ect count(#istinct(sports)) from c u$A (ii)'e ect min(age) from c u$ where seN 8 TfSA (iii)'e ect a!g(pa") from c u$ where sports 8 T.arateSA (i!)'e ect sum(pa") from c u$ where seN8SmS # Pro:e t ;ork ) # Pra ti al ,ile # "i#a "o e (/ marks) (/ marks) (/ marks)

the

You might also like