Jagran Josh Logo
  1. Home
  2. |  
  3. Board Exams|  

CBSE Class 12 Computer Science Sample Paper 2017

Mar 21, 2017 11:00 IST

    CBSE Class 12 Computer Science Sample Paper 2017

    Download CBSE Sample Paper PDF for Class 12 Computer Science board exam 2017. All the questions of this Sample Paper are very important for coming Class 12 Computer Science board exam 2017.

    About CBSE Sample Paper for Class 12th Computer Science

    This Sample Paper is based on latest CBSE syllabus and the format of the question paper is almost similar to per latest CBSE Sample Paper issued by the board. This 70 marks paper is to be solved within 3 hours of duration.

    Some randomly selected questions from this sample paper

    Q. What is the difference between Implicit & Explicit type casting? Give suitable examples to support your answer.

    CBSE Class 12 Computer Science Syllabus 2017

    Q. Name the header file(s) that shall be needed for successful compilation of the following C++ code:

    void main( )

    { clrscr();

    char name[20];

    gets(name);

    if(strcmp(name,”VIDYA”)==0)

    cout<<”String matched!!!”;

    else

    cout<<”Not matching!!!”;

    }

    Class 12 Computer Science Sample Paper by CBSE

    Q. Rewrite the following program after removing the syntactical error(s), if any. Underline each correction.

    #include <iostream.h>

    class InService

    { intgroup_no;

    PUBLIC:

    void get_info(){cin>>group_no;}

    void disp_info{cout<<group_no;}}

    void main()

    { InServiceI;

    I.get_info();

    disp_info();}

    Q. Find the output of the following program assuming all necessary header files are included:

    void Encoding(char E[])

    { for (inti=strlen(E);i>=0;i-=2)

    if (E[i]==’A’ || E[i]==’E’)

    E[i]=’^’;

    else if (isupper(E[i]))

    E[i]=tolower(E[i]);

    else E[i]=’%’; }

    void main()

    {char line[]=”VidYa BAl BHaWaN”;//The two

    words in the string

    //line are separated by single space

    Encoding(line);

    cout<<line<<endl;

    }

    Q. Find the output of the following program-

    #include<iostream.h>

    class student

    {

    public:

    student()

    {

    cout<<”\n Computer Science“;

    }

    ~student()

    {

    cout<<” subject”;

    }

    }st;

    void main()

    {

    cout<<“is my favourite”;

    }

    Q. Study the following program and select the possible output from it. Also find the maximum & minimum value of count

    #include<iostream.h>

    #include<stdlib.h>

    constintVAL=3;

    void main( )

    { randomize( );

    intcount;

    count=70+random(VAL);

    for(intx=count;x>=70;x--)

    cout<<x<<”*”;

    }

    (i) 70*71*

    (ii) 71*70*

    (iii) 73*72*71*70*

    (iv) 70*71*72*

    Q. Observe the program segment given below carefully, and answer the question that follows:

    class Candidate

    {

    long CId;                    //Candidate’s Id

    char CName [20] ;    //Candidate’s Name

    float Score;              //Candidate’s Score

    public:

    void Enroll ( );

    void Disp ( ) ;

    void MarksScore ( ); //Function to change

    Score

    longR_CId () {return CId;)

    } ;

    void ScoreUpdate (long Id)

    {

    fstream File;

    File.open (“Candi.DAT”,ios::binary|ios::in|ios::out);

    CandidateC;

    int Record = 0, Found = 0 ;

    while (!Found &&File.read((char*) &C, sizeof(C)))

    {

    if(Id ==C.R_CId ( ))

    {

    cout<<”Enter new Score” ;

    C.MarksScore ( );

    ______________ / / Statement 1

    ______________ / /Statement 2

    Found = 1;

    }

    Record ++;

    }

    if (Found ==1) cout<<”Record Updated”;

    File.close ( ) ;

    }

    Write the Statement1 to position the File Pointer at the beginning of the Record forwhich the Candidate’s ld matches with the argument passed, and Statement2 to write the updated

    Record at that position.

    (b) Write a function that calculate the average word size in a text file “CONSOLIDATE.TXT” where each word is separated by a single space.

    (c) Write a function in C++ to search for anOrder

    No from a binary file “Order.DAT”, assuming

    the binary file is containing the objects of the

    following class. 3

    class ORDER

    {

    intOrder_no;

    char Member_type[20];

    public:

    intRet_Ord_no(){return Order_no;}

    void get_val(){cin>>Order_no;gets(Member_

    type);}

    void disp_val(){cout<<Order_no<<Member_

    type<<endl;} };

    Download CBSE Class 12 Computer Science Sample Paper 2017

    Latest Videos

    Register to get FREE updates

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

    • By clicking on Submit button, you agree to our terms of use
      ajax-loader
    • A verifcation code has been sent to
      your mobile number

      Please enter the verification code below

    Newsletter Signup
    Follow us on
    X

    Register to view Complete PDF