Upload
utkarsh-bajpai
View
219
Download
0
Embed Size (px)
Citation preview
7/26/2019 Revision Tour C++
1/13
Questions & Practice Sets
1) Name the header files that shall be needed for the following code:void main( ){
char String[ ] = String;cout
7/26/2019 Revision Tour C++
2/13
1) Name the header file to be included for the use of the following built in functions: (i)getc( )(ii)strcat()
1) Name the header file3 to which following built in function belong:(i) isu++er( ) ( ii)setw() (iii)e+( ) (iv)strcm+( )
1,) Why main( ) function is so s*ecial 4i5e two reasons61-) Name the header file of C++ to which following functions belong
(i)strcat( ) (ii) scan( ) (iii) getchar( ) (iv)c"rscr( )1.) Name the header files3 to which the following built in functions belongs to:
(i)cos( )(ii)setw( )(iii)tou++er( )(iv)strc+.( )1) Name the header files3 to which the following built in functions belongs to:
(i)cos( )(ii)setw( )(iii)tou++er( )(iv)strc+.( )10) Name the header file to3 which following built%in functions belong:
(i) strc+.() (ii) isdigit() (iii) "og() (iv) +uts()20) Name the header file to be included for the use of following built%in functions:
(i) re+() (ii) tou++er() [CBSE Sample Paper-2]21) Name the header flies of C++ to which the following functions belong:
(i) write() (ii) arc() (iii) o+en() (iv) str"en()22) Name the header files of C++ to which the following functions belong: [AI2002]
(i) get() (ii) o+en() (iii) a0s() (iv) strcat()
23) Name the header files of C++ to which the following functions belong: [Comptt. 2002](i) read() (ii) o+en() (iii) get() (iv) strcm+()
24) Name the header f7le3to which the following built%in functions belong:(i) strc+. % (ii) gets()
25) Name the header file3 to which the following built%in functions belong: [AI2003](i) strcm+() (ii) getc()
26) Write the names ofthe header flies to which the following belong:(i) s3rt() (ii) isa"+ha() (iii) +uts() (iv) strc+.()
27) Write the names ofthe header flies to which the following belong: [AI 2004](i) gets() (ii) strcm+() (iii) a0s() (iv) isa"num()
28) Write the name of header flies to which the following belong: [Comptt 2004](i) s3rt() (ii) strc+.() (iii) isa"+ha() (iv) o+en()
(2 8ar9s questions)
$) ewrite the following *rogram after remo5ing the syntactical error(s) if any ;nderline eachcorrection,
4inc"ude
7/26/2019 Revision Tour C++
3/13
1 (iv) DA 1 *?C 1 DA1
-) n the following *rogram3 find the correct *ossible out*ut(s)from the o*tions:4inc"ude
7/26/2019 Revision Tour C++
4/13
-o>o=random(2) 7 $;cout
=ut*uts:(i) SA8-? 1 '!S- 1 SA8-? 1 (ii) CAR-? 1 SA8-? 1 '!S- 1(iii) SA8-? 1 '!S- 1 E'S- 1 (iv) SA8-? 1 '!S- 1 '!S- 1
.) ewrite the following *rogram after remo5ing the syntactical error(s) if any ;nderline eachcorrection
4inc"udeustify your answer
4inc"ude
7/26/2019 Revision Tour C++
5/13
{ i(isu++er(Str[*ount]))Str[*ount]=to"ower(Str[*ount]);
e"se i (is"ower(Str[*ount]))Str[*ount]=tou++er(Str[*ount]);
e"se i(isdigit(Str[*ount]))Str[*ount]=Str[*ount]7$;
e"se Str[*ount]=,L,;} }
void main( ){ char -et[ ]=*&S' 'am 2%%;
int SiBe = str"en(-et);*onvert(-etSiBe);coutustify your answer !C"#$ 2&1&'4inc"ude
7/26/2019 Revision Tour C++
6/13
( 8ar9s questions:!Aots')
1)
7/26/2019 Revision Tour C++
7/13
cout
7/26/2019 Revision Tour C++
8/13
+=unc(3);cout
7/26/2019 Revision Tour C++
9/13
$$) Rewrite the o""owing +rogram ater removing the s.nta error(s) i an., 8nder"ine eachcorrection
4inc"ude
7/26/2019 Revision Tour C++
10/13
H, Rewrite the o""owing +rogram ater removing the s.ntactica" errors (i an.),8nder"ine each correction,
4inc"ude
7/26/2019 Revision Tour C++
11/13
out+ut o+tions1i) $ 2 G H P O $% $$ $2 $ii) % $ 2 G H Piii) $ 2 iv) $ 2 G H P
$$, Rewrite the o""owing +rogram ater removing a"" s.ntactica" error(s) i an., 8nder"ine each
correction,inc"ude
7/26/2019 Revision Tour C++
12/13
i (is"ower ( s [*] )s[*] = tou++er( s[*]);
e"se i (* I 2 == %)s[*] = \';
e"se
s[*] = to"ower( s[*]);}$, Read the +rogram careu"". and se"ect the +ossi0"e out+ut(s) rom it1
4inc"ude
7/26/2019 Revision Tour C++
13/13
ii)4inc"ude