1. Home
  2. |  
  3. CBSE Board |  

CBSE Class 12 Computer Science Question Paper 2017: Delhi

Aug 9, 2017 11:00 IST

    CBSE Class 12 Computer Science Question Paper 2017: Delhi

    Download CBSE Class 12 Computer Science 2017 board exam’s question paper (Delhi, Set 4). CBSE Class 12 Computer Science board exam was held on 27th March 2017 10:30 AM to 1:30 PM. With this article, students can download the complete question paper in PDF format. This paper is very helpful for the students preparing for CBSE Class 12 board exam 2018.

    Some sample questions from the question paper are given below:

    Question 1: (a) - Write the type of C++ tokens (keywords and user defined identifiers) from the following:

    (i) For

    (ii) delete

    (iii) default

    (iv) Value

    CBSE Board Exam 2017: Class 12 Chemistry Paper Analysis and Review

    (b) - Anil typed the following C++ code and during compilation he found four errors as follows :

    (i) Function strlen should have a prototype

    (ii) Undefined symbol cout

    (iii) Undefined symbol endl

    (iv) Function getchar should have a prototype

    On asking his teacher told him to include necessary header files in the code. Write

    the names of the header files, which Anil needs to include, for successful

    compilation and execution of the following code :

    void main()

    {

    char S[] = "Hello";

    for(int i = 0; i<strlen(S); i++)

    S[i] = S[i]+1;

    cout<<S<<end1;

    getchar();

    }

    (c) Rewrite the following C++ code after removing any/all syntactical errors with each

    correction underlined.

    Note : Assume all required header files are already being included in the program.

    void main()

    {

    cout<<"Enter an integer”;

    cin>>N;

    switch(N%2)

    case 0 cout<<"Even"; Break;

    case 1 cout<<"Odd"; Break;

    }

    (d) Find and write the output of the following C++ program code :

    Note : Assume all required header files are already included in the program.

    #define Big(A,B) (A>B)?A+1:B+2

    void main()

    {

    char W[] = "Exam";

    int L=strlen(W);

    for(int i=0; i<L–1; i++)

    W[i] = Big(W[i],W[i+1]);

    cout<<W<<end1;

    }

    CBSE Board Exam 2017: Class 12 Maths Paper Analysis

    CBSE Board Exam 2017: Class 12 English Paper Analysis

    CBSE Board Exam 2017: Class 12 Business Studies Paper Analysis

    (e) Find and write the output of the following C++ program code : 3

    Note: Assume all required header files are already being included in the program.

    void main()

    {

    int A[]={10,12,15,17,20,30};

    for(int i = 0; i<6; i++)

    {

    if(A[i]%2==0)

    A[i] /= 2;

    else if(A[i]%3==0)

    A[i] /= 3;

    if(A[i]%5==0)

    A[i] /=5;

    }

    for(i = 0; i<6; i++)

    cout<<A[i]<<”#”;

    }

    (f) Look at the following C++ code and find the possible output(s) from the options

    (i) to (iv) following it. Also, write the maximum values that can be assigned to each

    of the variables R and C. 2

    Note :

    • Assume all the required header files are already being included in the code.

    • The function random(n) generates an integer between 0 and n – 1.

    void main()

    {

    randomize();

    int R=random(3),C=random(4);

    int MAT[3][3] = {{10,20,30},{20,30,40},{30,40,50}};

    for(int I=0; I<R; I++)

    {

    for(int J=0; J<C; J++)

    cout<<MAT[I][J]<<" ";

    cout<<end1;

    }

    }

    (i)

    (ii)

    10   20  30

    20  30   40

    30  40   50

    10  20  30

    20  30  40

    (iii)

    (iv)

    10   20

    20   30

    10  20

    20  30

    30  40

    Question:

    (a) Which of the following can be used as valid variable identifier(s) in Python?

    (i) total

    (ii) 7Salute

    (iii) Que$tion

    (iv) global

    (b) Name the Python Library modules which need to be imported to invoke the

    following functions :

    (i) ceil()

    (ii) randint()

    (c) Rewrite the following code in Python after removing all syntax error(s). Underline

    each correction done in the code.

    TEXT=""GREAT

    DAY""

    for T in range[0,7]:

    print TEXT(T)

    print T+TEXT

    (d) Find and write the output of the following Python code :

    STR = ["90","10","30","40"]

    COUNT = 3

    SUM = 0

    for I in [1,2,5,4]:

    S = STR[COUNT]

    SUM = float (S)+I

    print SUM

    COUNT–=1

    (e) Find and write the output of the following Python code :

    class ITEM:

    def_init_(self,I=101,N="Pen",Q=10): #constructor

    self.Ino=I

    self.IName=N

    self.Qty=int(Q);

    def Buy(self,Q):

    self.Qty = self.Qty + Q

    def Sell(self,Q):

    self.Qty –= Q

    def ShowStock(self):

    print self.Ino,":",self.IName,"#",self.Qty

    I1=ITEM()

    I2=ITEM(100,"Eraser",100)

    I3=ITEM(102,"Sharpener")

    I1.Buy(10)

    I2.Sell(25)

    I3.Buy(75)

    I3.ShowStock()

    I1.ShowStock()

    I2.ShowStock()

    (f) What are the possible outcome(s) executed from the following code ? Also specify

    the maximum and minimum values that can be assigned to variable N.

    import random

    SIDES=["EAST","WEST","NORTH","SOUTH"];

    N=random.randint(1,3)

    OUT=""

    for I in range(N,1,–1):

    OUT=OUT+SIDES[I]

    print OUT

    (i) SOUTHNORTH

    (ii) SOUTHNORTHWEST

    (iii) SOUTH

    (iv) EASTWESTNORTH

    Download CBSE Class 12 Computer Science Question Paper 2017 (Delhi) in PDF format

    Latest Videos

    Register to get FREE updates

      All Fields Mandatory
    • (Ex:9123456789)
    • Please Select Your Interest
    • Please specify

    • ajax-loader
    • A verifcation code has been sent to
      your mobile number

      Please enter the verification code below

    This website uses cookie or similar technologies, to enhance your browsing experience and provide personalised recommendations. By continuing to use our website, you agree to our Privacy Policy and Cookie Policy. OK
    X

    Register to view Complete PDF