Transcript Qno 1 (c)
XII CBSE Previous Year Question Paper
QUESTION NO 1 (C) 2 Marks
1(c) Rewrite the following program after removing the syntactical error(s), if any.
Underline each correction.
Delhi 2006 2 #include
( c) Corrected Program: Delhi 2006 #include
( ½ mark each for removing four errors)OR (1 Mark to be given for only identification of all the errors without rectification)
Note: If student replaces gets by cin>> or cin.getline( )and does not mention
(c) Rewrite the following program after removing the syntactical error(s), if any.
Underline each correction. OD 2006 #include
(c) #include
#include
(1 mark for identifying and correcting any one Error) (1 ½ mark for identifying and correcting any two errors) (2 marks for identifying and correcting more than two errors) OR (1 mark for only identifying all errors)
(c) Rewrite the following program after removing the syntactical error(s), if any. Underline each correction. Delhi 2007 2 #include
(c) #include
(½ Mark for each correction) OR (1 Mark for identifying at least three errors, without suggesting correction)
(c) Rewrite the following program after removing the syntactical error(s) if any.
Underline each correction. OD 2007 2 # include
(c) #include
(½ Marks for each correction) OR (1 Mark for identifying at least three errors, without suggesting correction)
(c) Rewrite the following program after removing the syntactical error(s) if any. Underline each correction. Delhi 2008 #include < iostream.h > void main ( ) 2 { First = 10, Second = 20; } Jumpto (First; Second); Jumpto (Second); } { void Jumpto (int N1, int N2=20) N1 = N1 + N2; cout<
#include
OR
#include
(½ Mark for each correction) OR (1 Mark for identifying at least three errors, without suggesting correction)
(c) Rewrite the following program after removing the syntax error(s), if any. Underline each correction. OD 2008 2 #include
319
} Arg1 = Arg1 + Arg2; cout<
#include
(½ Mark for each correction)
OR
(1 Mark for only identifying at least three errors, without suggesting correction)
(c) Rewrite the following program after removing the syntactical errors (if any). Underline each correction. Delhi 2009 2 #include [iostream.h] #include [stdio.h] { class Employee int EmpId = 901; char EName [20] ; public Employee ( ) { } void Joining () {cin>>EmpId; gets (EName);} void List ( ) {cout<
{ void main ( ) Employee E ; Joining.E ( ) ; } E. List ( )
Ans Delhi 2009 #include
void main () { Employee E; E.Joining (); E.List (); } (½ Mark for writing both header files inside < >) (½ Mark for removing = 901 from int Empld = 901;) (½ Mark for writing: after public and; after E.List()) (½ Mark for writing E.Joining ( ); correctly) Note: ½ mark for identifying any two errors without valid correction and 1 mark for identifying all five errors without valid correction
(c) Rewrite the following program after removing the syntactical errors (if any).Underline each correction. Outside Delhi 2009 2 include
{ void main ( ) MyStudent MS ; Register.MS( ) ; } MS.Display( ) ;
Ans # include
{ void main () MyStudent MS; MS. Register (); MS. Display () ; } (½ Mark for writing both include as #include) (½ Mark for removing = 1001 from int StudentId = 1001;) (½ Mark for writing: after public) (½ Mark for writing MS. Register ( ) ; correctly) Note: ½ mark for identifying any two errors without valid correction and 1 mark for identifying all five errors without valid correction
(c) Rewrite the following c++ program code after removing the syntax error(s) (if any). Underline each correction. Delhi 2010 include
2
{ long TrainNo; char Description[25]; public void Entry ( ) } { cin >>TrainNo; gets(Description);
Ans. #include
void Display () } { cout<
(½ Mark for writing # before include
(c) Rewrite the following C++ program code after removing the syntax error(s) (if any). Underline each correction. OD 2010
2
include
Ans. #include
correction)
void ShowInfo ( ) { cout<
(½ Mark for each correction) OR (1 mark for identifying at least three errors, without suggesting
(c) Rewrite the following program after removing the syntactical errors (if any).
Underline each correction. Delhi 2011 2 #include[iostream.h] typedef char Text(80) ; { void main ( ) Text T= "Indian"; int Count=strlen(T) ; cout<
{ Ans #include
(c) Rewrite the following program after removing the syntactical errors (if any).
Underline each correction. OD 2011 2 include
Ans #include
(½ Mark for writing # include
SAMPLE PAPER 2009 SET I c) Rewrite the following program after removing the syntactical errors (if any). Underline each correction.
#include [iostream.h] class PAYITNOW { int Charge; PUBLIC: void Raise(){cin>>Charge;} }; void Show{cout<
SAMPLE PAPER 2009 SET I void main() { PAYITNOW P; P.Raise(); Show(); }
SAMPLE PAPER 2009 SET I
Answer: #include
SAMPLE PAPER 2009 SET I
Answer: void main() { PAYITNOW P; P.Raise(); P.Show(); }
(1/2 Mark for correcting each error)
OR
(1 Mark for identifying all the 4 errors with no correction)
SAMPLE PAPER 2009 SET II
c) Rewrite the following program after removing the syntactical errors (if any). Underline each correction.
#include
SAMPLE PAPER 2009 SET II
{ void main() Pixels Point1=(5,3); ShowPoint(Point1); Pixels Point2=Point1; } Color.Point1+=2; ShowPoint(Point2);
{
SAMPLE PAPER 2009 SET II
#include
SAMPLE PAPER 2009 SET II Point1.Color
+=2; ShowPoint(Point2); }
(1/2 Mark for correcting each error)
OR
(1 Mark for identifying all the 4 errors with no correction)
SAMPLE PAPER 2010 SET I (c) Rewrite the following program after removing the syntactical errors (if any).
Underline each correction. SP 2010 2
#include [iostream.h] class MEMBER { int Mno;float Fees; PUBLIC: void Register(){cin>>Mno>>Fees;} void Display{cout<
SAMPLE PAPER 2010 SET I
{ void main() MEMBER M; Register(); } M.Display();
SAMPLE PAPER 2010 SET I (c) #include
{ class MEMBER int Mno;float Fees; public: void Register(){cin>>Mno>>Fees;} void Display(){cout<
SAMPLE PAPER 2010 SET I
{ main() MEMBER M; M.Register(); M.Display(); }
( ½ Mark each correction)
SAMPLE PAPER 2010 SET II (c) Rewrite the following program after removing the syntactical errors (if any).
Underline each correction. SP 2010 2
#include
SAMPLE PAPER 2010 SET II
{ void main() Pixels Point1=(5,3); ShowPoint(Point1); Pixels Point2=Point1; } Color.Point1+=2; ShowPoint(Point2);
SAMPLE PAPER 2010 SET II (c) #include
struct Pixels { int Color,Style; }; void ShowPoint(Pixels P) { } cout<
SAMPLE PAPER 2010 SET II
{ void main() Pixels Point1={5,3}; ShowPoint(Point1); Pixels Point2=Point1; Point1.Color+=2; ShowPoint(Point2); }
( ½ Mark for each correction)
SAMPLE PAPER 2012 SET I
SAMPLE PAPER 2012 SET I
SAMPLE PAPER 2012 SET II
SAMPLE PAPER 2012 SET II
Outside Delhi 2012
THANK
YOU