CBSE Class 12 Computer Science 2018 Compartment Exam Previous Year Question Paper (Set 4)
This is the CBSE Class 12 Computer Science 2018 Compartment Exam Previous Year Question Paper for the All India Set 4. The paper is designed for a duration of 3 hours and carries a maximum of 70 marks. It is divided into three sections: Section A (C++), Section B (Python), and Section C (compulsory for all). Candidates must choose to attempt either Section A or Section B. The question paper contains 16 printed pages and 7 questions in total. A 15-minute reading time is allotted before the exam begins. Solving this previous year's question paper is crucial for students to understand the exam pattern, question types, and marking scheme, thereby enhancing their preparation and performance in the board examinations.
Quick info
| Board | CBSE |
|---|---|
| Class | 12 |
| Subject | Computer Science |
| Session | 2018 |
| Language | English |
| Type | Previous Year Question Paper |
| Exam type | Board Exam |
Paper pattern
The exam is divided into three sections: Section A (C++), Section B (Python), and Section C (compulsory). Candidates must answer either Section A or Section B. The total duration is 3 hours and the maximum marks are 70.
Topics covered
Paper topics
- C++ Tokens
- Header Files
- C++ Syntax
- C++ Programs
- Python Programming
- Data Structures
- Database Management
- Networking Concepts
- Object Oriented Programming
- SQL Queries
Important topics
- C++ Tokens
- C++ Header Files
- C++ Syntax Correction
- C++ Program Output
- C++ and Python Sections
PDF preview
Read page by page below. PDF is streamed from the official NCERT website — no download button on this 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++.
- SECTION B refers to programming language Python.
- SECTION C is compulsory for all.
- Answer either SECTION A or SECTION B.
- It is compulsory to mention on the page 1 in the answer book whether you are attempting SECTION A or SECTION B.
- All questions are compulsory within each section.
SECTION - A
(Only for Candidates, who opted for C++)
- (a) Write the type of C++ tokens (keywords and user-defined identifiers) from the
following: 2
- Struct (ii) return (iii) else (iv) stack
91 C/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; }
- 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;
- 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 2018 Compartment Exam Previous Year Question Paper (Set 4), designed for board exam practice.
What is the duration and maximum marks for this paper?
The allowed time for this paper is 3 hours, and the maximum marks are 70.
How is the Computer Science paper structured?
The paper is divided into three sections: Section A (C++), Section B (Python), and Section C (compulsory). Students must attempt either Section A or Section B.
Why is solving previous year question papers important?
Solving previous year question papers helps students understand the board exam pattern, question difficulty, and marking scheme, improving their confidence and performance.
What topics are covered in this paper?
This paper covers topics related to C++ programming, Python programming, data structures, database management, networking, and SQL queries, as per the CBSE Class 12 Computer Science syllabus.
Content reviewed by the NCERT Help team. Editorial Team and update policy
Question Papers PDF on NCERT Help. URL unchanged for search indexing.