CBSE Class 12 Computer Science (C++) 2018 Compartment Board Question Paper

Question Papers Class 12 PDF

This is the CBSE Class 12 Computer Science (C++) 2018 Compartment Board Question Paper. The paper is divided into three sections: Section A for C++, Section B for Python, and Section C which is compulsory. Candidates must choose either Section A or Section B. The exam is designed for a duration of 3 hours and carries a maximum of 70 marks. This previous year question paper provides an excellent opportunity for students to understand the exam pattern, question types, and difficulty level, thereby enhancing their preparation and boosting confidence for the upcoming board examinations.

Keep studying

Jump to solutions, books, papers, or another subject — without leaving NCERT Help.

Quick info

BoardCBSE
Class12
SubjectComputer Science (C++)
Session2018
LanguageEnglish
TypePrevious Year Question Paper
Exam typeBoard Exam

Paper pattern

The exam is divided into Section A (C++), Section B (Python), and Section C (Compulsory). Candidates must attempt either Section A or Section B. The total duration is 3 hours with a maximum of 70 marks.

Topics covered

Paper topics

  • C++ Tokens
  • Header Files
  • Syntactical Errors
  • Program Output
  • Programming Language Concepts

Important topics

  • C++ Keywords
  • User-defined Identifiers
  • ofstream
  • strcpy
  • strcat
  • Typedef
  • For Loop
  • Function Parameters
  • Pass by Reference

PDF preview

Read page by page below. PDF is streamed from the official NCERT website — no download button on this page.

Preparing PDF preview…
Page of
Loading page …

Question paper text

SET-4

Series : SGN/C

Code No. 91

Roll No.

Candidates must write the Code on

the title page of the answer-book.

Please check that this question paper contains 16 printed pages.

Code number given on the right hand side of the question paper should be written on the title page of the answer-book by the candidate.

  • Please check that this question paper contains 7 questions.
  • Please write down the Serial Number of the question before attempting it.
  • 15 minute time has been allotted to read this question paper. The question paper will be distributed at 10.15 a.m. From 10.15 a.m. to 10.30 a.m., the students will read the question paper only and will not write any answer on the answer-book during this period.

COMPUTER SCIENCE

Time allowed: 3 hours

Maximum marks: 70

General Instructions:

(i) SECTION A refers to programming language C++.

  1. SECTION B refers to programming language Python.
  2. SECTION C is compulsory for all.
  3. Answer either SECTION A or SECTION B.
  4. It is compulsory to mention on the page 1 in the answer book whether you are attempting SECTION A or SECTION B.
  5. All questions are compulsory within each section.

SECTION - A

(Only for Candidates, who opted for C++)

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

following: 2

  1. Struct (ii) return (iii) else (iv) stack

91 C/1 1

  1. The following C++ code during compilation reports errors as follows: 1 Error: 'ofstream' not declared Error: 'strcpy' not declared Error: 'streat' not declared Error: 'F' not declared Write the names of the correct header files, which must be included to compile the code successfully: void main() { ofstream F("WELCOME.TXT"); char Word1[]="WELCOME"; char Word2[]="C++"; char Word[40]; strcpy(Word, Word1); strcat(Word, Word2); F<<Word<<end1; }
  2. Rewrite the following C++ code after removing any/all syntactical errors with each

correction underlined. 2

Note: Assume all required header files are already included in the program. Typedef Number int; void main() Number N; cout<<"Enter an integer";</pre> <math>cin>>N</math>; for (I = 1; I<=N; I++) cout<< N "*" I <<endl;

  1. Find and write the output of the following C++ program code : 3 Note: Assume all required header files are already included in the program. void Turn(int &K, int Count=2) { Count=(Count%2==0) ?Count+1:Count-1; for(int I=1; I<=Count; I++)</pre> <math>K+=I</math>; } void main() int N=10,M=5; Turn (N, M); cout<<N<<"#"<<M<<endl; <math>M--;</math> Turn(N,M); cout<<N<<"#"<<M<<endl; Turn(N); cout<<N<<"#"<<M<<end1; }

91 C/1 2

Frequently asked questions

What is this document?

This document is the CBSE Class 12 Computer Science (C++) 2018 Compartment Board Question Paper.

What is the structure of the paper?

The paper has three sections: Section A (C++), Section B (Python), and Section C (Compulsory). Students must choose to answer either Section A or Section B.

What is the duration and maximum marks?

The allowed time for the exam is 3 hours, and the maximum marks are 70.

How can solving this paper help students?

Solving this previous year question paper helps students understand the exam pattern, identify important topics, and improve their problem-solving skills for the CBSE board exams.

What programming languages are covered?

This specific paper includes questions for C++ (Section A) and Python (Section B), with Section C being compulsory for all.

Content reviewed by the NCERT Help team. Editorial Team and update policy

Question Papers PDF on NCERT Help. URL unchanged for search indexing.