View
218
Download
0
Category
Preview:
Citation preview
8/16/2019 ICS Computer Science Important
1/25
e | 1
ICS COMPUTER SCIENCE
CHAPTER-1+2 PART -2 Important Question for ICS Computer Science Part-2
Chapter-01+ 02(Data Basics + Basic concepts and Terminoloies of Data!ases"Q-1: Chose the correct option. 1x14=14
1 The process of arranging data in a logical sequence is called.
Sorting Summarizing ata capturing classif!ing
" # collection of related fields is
$ile %ecord ata&ase 'one
( )*S stands for:
ata&ase
modeling
s!stem
ata&ase
*anagement
S!stem
ata &usiness
model s!stem
ata &usiness
*anagement
ser+ices
4 ,hich of the folloing is handled &! *S/
ata integrit! ata securit! ata
independence
#ll
0 The maor components of *S is called
ata&ase
manager
$ile manager ata manager #ll
2 SQ3 is a n5
6nstructured
language
Structured
language
7&ect
orientedprogramming
Softare
8 # stands for:
ata&ase
administrator
ata &asic
#dministration
ata&ase
#pplication
ata&ase authorit!
9 # primar! e! that consists of more than one attri&ute is called a:
$oreign e! Composite e! *ultimedia e! ;lo&al e!
< ,hich of the folloing descri&es the primar! e!/
t must &e
unique
t helps in
indexing of alarge data&ase
t maes
sorting quicer
#ll
1> #n attri&ute is also non as :
Ta&le %elation %o $ield
11 # relation is also non as:
Ta&le Tuple %elationship #ttri&ute
The Royal College & Computernstitute Feroza
8/16/2019 ICS Computer Science Important
2/25
e | 2
1" SQ3 is used for:
ata
definition
ata
manipulation
ata definition
and
manipulation
Searching records
1( #n index can &e used to:
mpro+e the
performance
of the
data&ase
ocument the
structure of the
data&ase itself
%educe data
dependence!
for application
program
#ll
14 # e! that is used strictl! for data retrie+al purposes:
Secondar! e! Candidate e! Composite e! )rimar! e!
Q-2: Write short answers any TEN, each question carry 2 marks. 2x10=20
i. e!ne ata"ase.ii. Who is #ata a#ministrator$iii. What you know a"out %orei&n key.i'. e!ne (an#i#ate key ) a*ternate key$'. What is +rimary key.'i. Write the names o% #ierent keys which use in #ata"ase,'ii. What is entity$ i'e an exam+*e.'iii. What is secon#ary key$ix. Write a#'anta&es o% /.x. e!ne consistency constraints$
xi. What is /$xii. escri"e ata mani+u*ation.xiii. e!ne ata +rocessin&.
Q-: Write #etai* answers o% the %o**owin& questions. 2x=13i. What is a key$ escri"e #ierent ty+es o% keys use# in #ata"ases.ii. What is /$ /rie4y #escri"e the a#'anta&es an# #isa#'anta&es o% /.
ICS Computer Science Chapter-3 part-2 BISE Important Question for ICS Computer Science Part-2
Chapter-0# (Data!ase Desin Process"
1. Data stored data single site is in ____________ databasemodel. In Centralized database system, all the data is stored ata single site.Design Centralized Partitionized Storage
2. In ERD model, the relationship beteen to entities is
The Royal College & Computernstitute Feroza
8/16/2019 ICS Computer Science Important
3/25
e | !
represented by a"
DiamondSymbol
Re#tang$larbo%
&'al symbol (ine
!. ) data model is
) logi#alrepresentation
o* the str$#t$reo* the database
Shon as anentity+
relationshipdiagram
rans*ormedinto tables and
relationship
)ll
-. )n Inde% may be #reated on"
Primary ey Se#ondaryey
/oreign ey )ll
0. hi#h o* the *olloing is $sed to asso#iate entities ith oneanotherEntity )ttrib$te Relationship Identi*ier
3. ) relationship #an be"
&ne to &ne &ne to many 4any to many )ll
5. In an E+R diagram, a re#tangle represents a 6n7
Entity )ttrib$te Relationship 8one
9. hi#h o* the *olloing are basi# data distrib$tion strategiesCentralized Partitioned Repli#ation )ll
:. hi#h o* the *olloing represent the entities
ea#her St$dent Prin#ipal )ll
1;. ) te#hni
12. hi#h o* the *olloing is an e%ample o* one to onerelationship4other+da$ghter
>i?e+Re#ord St$dent+Reg8o
Client+phone+no
1!. ) relationship beteen #o$ntries and #apitals is an e%ample o* ___________ relationship.&ne to many &ne to &ne 4any to many 4any to
one1-. ____________ are the basis o* $sage paterns o* the database.
Data 'ol$me and =sage analysis are $sed to estimate the sizeor 'ol$me and the $sage patterns o* the database.De#isionables
8ormalizeRelations
=sage )nalysis
(ogi#alDesign
Q-"" rite short ansers any E8, ea#h
8/16/2019 ICS Computer Science Important
4/25
e | -
'iii. hy is re
8/16/2019 ICS Computer Science Important
5/25
e | 0
:. hi#h o* the *olloing anomalies res$lt *rom a transiti'edependen#yInsertion 4o*i*i#atin Deletion )ll
1;. ) relation that #ontains minimal red$nden#y and allos easy$se is #alled"
Clean Simple Comple% ellStr$#t$red
11.
hen all the non ?ey attrib$tes are *$lly dependent onprimary ?ey then the state is ?non as ____________ .EntityIntegrity
/o$rth8ormal /orm
Se#ond8ormal /orm
/$n#tionalDependen#y
12. ) relation R #an be in ____________ i* all $nderlyingdomains #ontains atomi# 'al$es. /o$rth8ormal/orm
/irst 8ormal/orm
Re*erentialIntegrity
Consistent8ormal /orm
1!. ____________ m$st re*er to the P in another table or itm$st be n$ll.
Red$ndantIn*ormation
Simple Datastr$#t$re
ransiti'edependen#y
Re*rentialIntegrity
1-. hi#h o* the *olloing states that no attrib$te o* a primary?ey sho$ld #ontain n$ll 'al$eRed$ndantIn*ormation
ransiti'edependen#y
Data Se#$rity EntityIntegrity
The Royal College & Computernstitute Feroza
8/16/2019 ICS Computer Science Important
6/25
e | 3
Q-2: Write short answers any TEN, each question carry 2 marks. 2x10=20
i. Write the names o% three ty+ica* +ro"*em in mer&in& re*ations.
ii. (om+are norma* %orm an# norma*i5ation.
iii. escri"e transiti'e #e+en#ency.
i'. ierentiate "etween +artia* #e+en#ency an# transiti'e #e+en#ency.'. What is +artia* #e+en#ency$
'i. What are the #ata"ase anoma*ies$
'ii. escri"e re+eatin& &rou+.
'iii. e!ne %unctiona* #e+en#ency.
ix. e!ne Norma*i5ation.
x. e!ne mutua* exc*usi'eness o% #ata.
xi. e!ne the term o% re#un#ancy.
xii. What is meant "y entity inte&rity$
xiii. e!ne re%erentia* inte&rity.
xi'. 6ow is entity inte&rity attaine#.
Q-: Write #etai* answers o% the %o**owin& questions. 2x=13
What is %unctiona* #e+en#ency$ Ex+*ain with exam+*e.
. 7++*y !rst norma* %orm on this ta"*e.
e+t8No e+t8Nam
e
Em+8no Em+8Nam
e
20 tichin& 01
02
9a'i#
/i*a*
0 inance 10
11
7*i
7"#a*
10 ana&eme
nt
12
1
;han
7si%
ICS Computer Science Chapter-5 part-2 BISEImportant Question for ICS Computer Science Part-2$ Important notes for ICS computer Science fo
all Boards and %ederal Board&
Chapter-0(Introduction to ,icrosoft ccess"
1 hi#h o* the *olloing is the #orre#t asso#iation
/ile @ #ol$mn Re#ord @ ro /ield @ro
Re#or d @table
2 ) #olle#tion o* data that #onsists o* name, address andemail o* a person is #alled"
The Royal College & Computernstitute Feroza
8/16/2019 ICS Computer Science Important
7/25
e | 5
>yte Re#ord Chara#ter
/ield
! he smallest meaning*$l $nit o* data in a database is #alled"
>yte Re#ord Chara#ter
/ield
- Ea#h separate pie#e o* in*ormation stored in a re#ord is#alled a"/orm /ield able Cell
0 ) report may be based on a
able B$ery >oth aand b
8one
3 ) database may #ontain"
&nly one table )t most to tables )t mostthreetables
8one
5 he #oml$mn o* a table #orresponded to"
able Re#ord /ield Cell
9 ) database #onsists o* 'ario$s #omponents #alled"
ools Properties Entities &bAe#ts
: he o$tp$t o* the othre#ordsand*ields
8oneo*these
12 hi#h o* the *olloing is 8& a database obAe#t"
able B$ery Report 4Sord
1! hi#h o* the *olloing are obAe#ts in an 4S )##essdatabase"able, *orms,
8/16/2019 ICS Computer Science Important
8/25
e | 9
)##ess template
>lan? database E%istingdatabase
8e*older
The Royal College & Computernstitute Feroza
8/16/2019 ICS Computer Science Important
9/25
e | :
Q-"" rite short ansers any E8, ea#h
8/16/2019 ICS Computer Science Important
10/25
e | 1;
he graphi#al
8/16/2019 ICS Computer Science Important
11/25
e | 11
Q-"" rite short ansers any E8, ea#h
8/16/2019 ICS Computer Science Important
12/25
e | 12
.hat is lin?ing o #an an obAe#t *rom other database be lin?ed in 4S )##ess.
E%plain the pro#ed$re o* #reating a s$b*orm $sing s$b*orm izard.
hat is #onditional *ormatting E%plain ith e%ample.
hat is *orm E%plain its $ses and ad'antages.
Dis#$ss di**erent options *or editing *orms in 4S )##ess.
ICS Computer Science Chapter-0#($ettin% Starte &ith C" part-2
mportant Question for ICS Computer Science Part-2$ Important notes for ICS computer Science for all Boards and
%ederal Board&
Chapter-0(ettin Started 3ith C"
1 C lang$age as de'eloped in the year"
1:3:+5; 1:30+50 1:52+99 1:00+05
C as de'eloped byNNNNNNN.."
on+8e$mann
Dr. )bd$lSlam
Charles>abbage
DenisRit#hie
C lang$age is a
igh le'ellang$age
(o le'ellang$age
)ssemblylang$age
4a#hinelang$age
hi#h o* the *olloing lang$age pro'ided the basis *or thede'elopment o* C
> COO )) P)SC)(
)n IDE stands *or"
Integratedde'elopmentEn'ironment
Inp$t dataerror
Inp$t Dataen'ironment
Internal Dis?error
hat does the H sign indi#ate in an instr$#tion o* Clang$age
Instr$#tion*or $ser
Instr$#tion *or lin?er
Instr$#tion *or #ompiler
Instr$#tion*orprogrammer
Comp$ter programs are also ?non as"
So*tare Pro#ed$re ardare )lgorithm
hi#h one o* the *olloing translates so$r#e #ode to obAe#t#ode as a hole
The Royal College & Computernstitute Feroza
8/16/2019 ICS Computer Science Important
13/25
e | 1!
Interpreter Compiler Deb$gger (in?er
hi#h o* the *olloing lang$age is ideal to rite b$sinessappli#ation
C&>&( >)SIC )ssemblylang$age
8one
)n assembly lang$age $ses"
Englishords
4nemoni##odes
>inary digit 8one
11 ) programQs synta% errors is dete#ted by"
Compiler (in?er (oader Deb$gger
12 ) set o* r$les that m$st be *olloed to de'elop a program is#alled"
Synta% Prepro#essor >$g Deb$g
1! SDI& stands *or"
Standardinp$t o$tp$t
Symboli#inp$t o$tp$t
Simple inp$to$tp$t
String inp$to$tp$t
1- he e%tension o* &bAe#t *ile is"
.# .t%t .obA .h
The Royal College & Computernstitute Feroza
8/16/2019 ICS Computer Science Important
14/25
e | 1-
Q-"" rite short ansers any E8, ea#h
8/16/2019 ICS Computer Science Important
15/25
e | 10
G V O U
Data type int #ontains types"
1; - 2 13
hi#h is the name *or a ord that has a spe#i*i# meaning in
Ceyords Comments o?en &perators
o add a 'al$e 1 to 'ariable y, yo$ rite"
y O @1W y @ yO 1W y @1 O yW )ll
he e%pression ;V- has a 'al$e e
8/16/2019 ICS Computer Science Important
16/25
e | 13
Q-"" rite short ansers any E8, ea#h
8/16/2019 ICS Computer Science Important
17/25
e | 15
he general *orm o* *ormat spe#i*ier *or the *loating point'al$e"
Vm.n* m.nV mV.n* m.nV*
hi#h o* the *olloing is 8& legal element o* #ontrol stringin print* statementK
&rdinary#hara#ters
Es#apese 8one
11 he *ormat spe#i*ier V$ is $sed *or"
Integer =nsignedshort
=nsigned *loat=nsignedlong int
12 hi#h o* the *olloing is an inp$t *$n#tion"
s#an* print* s
8/16/2019 ICS Computer Science Important
18/25
e | 19
Q-"" rite short ansers any E8, ea#h QW
ord!@ YCQW
Print*6JV# V# ord!K, ord1, ord27W
i'. rite a C statement to print the 'al$e o* $nsigned long y.
'. (ist o$t the names o* di**erent *$n#tions $sed *or #hara#ter inp$t.
'i. E%plain J#ls#rK.
'ii. E%plain Jget#hK.
'iii. (ist o$t di**erent types o* *ormat spe#i*iers.
i%. hi#h symbol is $sed to start *ormat spe#i*iers
%. (ist some important *$n#tions *or inp$t.
%i. De*ine standard inp$t.
%ii. hat is #ontrol string in print* *$n#tions
%iii. State the p$rpose o* Vd *ormat spe#i*ier.
B+!" rite detail ansers any 2 *rom the *olloing
8/16/2019 ICS Computer Science Important
19/25
e | 1:
Conditional operator taes(
/#ree
operands
/"o
operands
ne
operandsone
/#e case loc ends "it#(
nd Select nd Case rea* elseIn if statement, true is represented (
0 1 2 3
#ic# of t#e follo"in$ statements is t#e simplest
form of a decision structure%
Select4.caseIfstatement
/r4 catc#4finall
ested if
#en a relational expression is false,it #as t#e
+alue 444 .
5ero ne 6ess t#an 0 one
#ic# pro$rammin$ structure executes pro$ramstatements in order%
7elation 8ecision Se9uence 7epetition
:not#er term for a computer main$ a decision is(
Se9uential Selection 7epetition Iteration
11 7elational operators allo" ou to 44 numers.
Compare :dd ;ultipl 8i+ide
12 #ic# of t#e follo"in$ is e9ualent to
9 ?
9 p&9 ?p>9
13#ic# of t#e follo"in$ are +alid case statements ina s"itc#%
case 1( case x>@( case Aa* case 1.!(
1@ In statement, false is represented (
0 1 2 3
The Royal College & Computernstitute Feroza
8/16/2019 ICS Computer Science Important
20/25
e | 2;
Q-2( rite s#ort ans"ers an /, eac# 9uestion carr 2 mars. 2x10=20
i. 8efine control structure.
ii. rite t#e names of control structure.
iii. 8escrie tpes of selection strure.
i+. 8ra" t#e flo" c#ar of if statement.
+. #ic# is t#e asic control structures for "ritin$ a pro$ram%+i. #at is output of t#e follo"in$ code%
f
printf
8/16/2019 ICS Computer Science Important
21/25
e | 21
*or 6int %@;W % 1;W %OO7
1; : ; 1
hat is the 'al$e o* a a*ter e%e#$tion o* the *olloing
#ode
Int a @ 20W
*or 6int # @;W #-W #OO7
a @ a +1W
a @ a O!W
2! 2- 20 2;
he body o* hile loop ith m$ltiple statements ends
ith"
Right
bra#?etF
Right
bra#esTComma,
Semi
#olonW
hi#h is a loop statement
i* i*+else sit#h 8one
Semi#olon is pla#ed at the end o* #ondition in"
hile loop Do+hileloop
/or loop )ll
hile loop is also #alled"
Conditional
loop
end
loopCo$nter loop 8one
his means to in#rease a 'al$e by one"
4od$l$s In#rement De#rement 8one
his statement may be $sed to stop a loopQs #$rrentiteration and begin ne%t oneW
Contin$e >rea? erminate 8one
) *or statement #ontains three e%pressions"
initialization , test, __________ .
The Royal College & Computernstitute Feroza
8/16/2019 ICS Computer Science Important
22/25
e | 22
8$ll alidationIn#rement]de#remen
t8one
) spe#ial 'al$e that mar?s the end o* a list o* inp$t data
is #alled"
erminal
'al$e
Sentinel
'al$e(oop #ontrol 'al$e
Inp$t
'al$e
11 &ne e%e#$tion o* a loop is ?non as a 6n7.
Cy#le D$ration Iteration est
12 o many types o* loop are a'ailable in # lang$age
2 ! - 0
1! hile loop str$#t$re alays e%e#$tes at least on#e
Do+hile /or hile 8one
1-hi#h o* the *olloing loop is #alled #o$nter #ontrol
loop
/or hile Do hile 8one
The Royal College & Computernstitute Feroza
8/16/2019 ICS Computer Science Important
23/25
e | 2!
B+2" rite short ansers
De*ine loop.
. rite to ad'antages o* loop.
i. De*ine JhileK loop.
'. De*ine do+hile loop.'. Des#ribe the synta% o* do+hile loop ith e%ample.
'i. Des#ribe the synta% o* J*orK loop.
'ii. hat is J*orK loop.
'iii. hat is #o$nter #ontrolled loop
%. hat is sentinel #ontrolled loop.
%. De*ine sentinel 'al$e.
%i. Des#ribe nested loop.
%ii. De*ine in*inite loop.
%iii. o many times ill the *olloing loop display J&RI)( )C)DE4^K.
or 6int i @2;W i ;W iOO7
print*6J)?ram >hattiK7W
B+!" rite detail ansers
rite a program that $ses a hile loop to enter a n$mber *rom the $ser and then display it. he loop is
erminated hen the $ser enters +1.
E%plain J*orK loop E%plain its or?ing.
ICS Computer Science part-2 Chapter-*3 Functions in CImportant Question for ICS Computer Science Part-2, Important notes for ICS computer Science for all
Intermediate Boards.
Chapter-1#(%unctions in C"
1 ) type o* *$n#tions ritten by the programmer is ?non as"
=serde*ined
S$bprograms S$b *$n#tions>$ilt in*$n#tions
(o#al 'ariables are also #alled"
)$tomati# 8ormal lobal 8one
) 'ariable de#laration o$tside any *$n#tion is ?non as"
lobal (o#al 'ariable E%ternal Stati#
The Royal College & Computernstitute Feroza
8/16/2019 ICS Computer Science Important
24/25
e | 2-
'ariable 'ariable
he s#ope o* a 'ariable re*ers to its"
(ength 8ame )##essibility Data type
he parameters in *$n#tion de#laration are #alled"
/ormalparameters
)#t$alparameters
>oth ) and > 8one
hat is the 'ariable name that is $sed by a *$n#tion to re#ei'epassed 'al$es
/$n#tion Parameter E%pression Constant
he *irst line o* *$n#tion de*inition is ?non as"
/$n#tionheader
/$n#tiono$tp$t
In'o?ing a*$n#tion
8one
he pro#ess o* sending an arg$ment to a *$n#tion is #alled"
Sending /iltering Deli'ering PassingIn a C program, to *$n#tions #an ha'e"
Same nameSameparameters
Same nameand sameparameters
Same nameb$t di**erentparameters
/$n#tion de#laration #onsists o*"
/$n#tionname
/$n#tionret$rn type
8$mber andtypes o*parameters
)ll
11 ) b$ilt in *$n#tion"
CanQt berede*ine
Can berede*ine
CanQt be ret$rna 'al$e
Can be ret$rna 'al$e
12 he name o* a#t$al and *ormal parameters"
4ay or maynot be same
4$st be same4$st bedi**erent
4$st be inloer #ase
1! 4emory is allo#ated to a lo#al 'ariable at the time o* its"
De#laration Destr$#tion De*inition/irstre*eren#e
1- lobal 'ariables are #reated in"
R)4 R&4 ard Dis? Ca#he
Q-"" rite short ansers
i.
De*ine global 'ariable.
The Royal College & Computernstitute Feroza
8/16/2019 ICS Computer Science Important
25/25
e | 20
ii.
Compare lo#al and global 'ariable.
iii.
De*ine lo#al 'ariable.
i'.
State the $se o* *ormal parameters.
'.
o does a *$n#tion ret$rn 'al$e
'i. o does a *$n#tion ret$rn 'al$e
'ii. hat is *$n#tion #all
'iii. hat is *$n#tion de*inition
i%. De*ine *$n#tion body.
%. De*ine *$n#tion header.
%i.
Des#ribe b$ilt in *$n#tion.
%ii.
o does a *$n#tion ma?e programming easier
B+!" rite detail ansers
>rie*ly e%plain the bene*its o* $sing *$n#tions.
rite a program that inp$ts a n$mber in main *$n#tion and passes the n$mber to a *$n#tion. he
$n#tion displays table o* that n$mber.
The Royal College & Computer
Recommended