0% found this document useful (0 votes)
10 views3 pages

Complete Consolidated Test Part 2

The document is a test paper for Class XII Computer Science at Army Public School & College Jinnah Campus, Gujranwala Cantt, covering various topics such as process states, programming concepts, C++ coding, and software development life cycle. It consists of multiple sections with questions that require both theoretical explanations and practical coding tasks. The test is designed to assess students' understanding and application of computer science principles and programming skills.

Uploaded by

hassamsalman098
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

Complete Consolidated Test Part 2

The document is a test paper for Class XII Computer Science at Army Public School & College Jinnah Campus, Gujranwala Cantt, covering various topics such as process states, programming concepts, C++ coding, and software development life cycle. It consists of multiple sections with questions that require both theoretical explanations and practical coding tasks. The test is designed to assess students' understanding and application of computer science principles and programming skills.

Uploaded by

hassamsalman098
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Army Public School & College Jinnah Campus, Gujranwala Cantt

Consolidate Test XII (March – 2025)

Name: __________________
Class: XII (____)
Subject: Computer Science Time Allowed: 2 hr 40 Mins Marks: _____ / 62

SECTION -B (Marks 42)


Q2. Attempt all parts from Section ‘B’. Each question carries equal marks (14x 3 = 42)
Differentiate between multi-
Describe the five states of process with
(i) 3 OR programming and time-sharing 3
diagram. Just need to draw a diagram.
operating systems?
List out the main activities that are
Differentiate between functional and
(ii) involved during the deployment / 3 OR 3
non-functional requirements.
implementation phase
Write down the out of the following
code segment.
int p,q,r;
How is a project manager responsible for
p=10; q=3;
(iii) planning execution and closing of a 3 OR 3
if (p%q==3)
project?
r=0;
else
r=1; cout<<r;
Write a C++ code that prints the sum of Write down the purpose the functions
(iv) following array elements. 3 OR Sizeof(),strlen()andstrcat() 3
Int arr[10]={1,2,3,4,5,6,7,8,9,10} functions in programming
Given the array definition:
float a[5]={1,2,3};
a) How many elements are there in Write down at least 3 rules to declare
(v) 1+2 OR 3
the array? the variable in c++ programming.
b) What are the values of the first
and last elements?
How we can minimize the wastage of
Differentiate between the Arguments the CPU time with usage inline
(vi) 2+1 OR 3
and Parameters with example? function. Discuss its importance
shortly?
Explain constructor and destructor class Reproduce following code using while
member functions with examples? Can loop in c++ programming.
(vii) 2+1 OR 3
we call data member and member For(int i=0 ; i<=10;i++)
function without creating object? { cout<<i<<endl ; }

Why nested loop are used in


How differ pointer declaration and
(viii) programming shortly describe the 3 OR 3
importance of nested loop?
initialization with help of code ?
Finding the Output: Finding the Errors from the following:
int a = 5, b = 100; int a = 5: b=100:

int * ptr = &a; cout<< I love APS college :


(ix) 3 OR 3
ptr = &b; if (i==0): [

std::cout << *ptr; }

Write down the program that print


Explain the working of ternary
reverse of the number on screen
(x) operator in programming what when 3 OR 3
using functions. (example let n=1234
we prefer to use this in the code?
then reverse would be n=4321)
Explain how a pointer can be
declared and initialized Why escape sequence used in
simultaneously in a program. programming list out at least 3 escape
(xi) 3 OR 3
Additionally, discuss potential pitfalls sequence with the usage of each
of uninitialized pointers and their separately.
impact on program behavior
Which one is best to use for beginner
Write a program that print the sum of
Graphical user interface or command
(xii) 3 OR all even number upto 50. Using for loop 3
line interface and explain why prefer using C++ programming.
this one?
In what ways does a class serve as the
Why feasibility study is important at
fundamental building block of object-
(xiii) the start of the project? Explain 3 OR 3
oriented programming, and how does it
technical feasibility. contribute to code reusability?
Write a C++ program implementing Why file handling is crucial in c++ and
(xiv) inheritance between Employee (base class) 3 OR with using file handling we can store 3
and Manager (derived class). the data permanently.
SECTION-C (Marks 20)
Note: Attempt all questions. Marks of each question are given. (4 x 05 = 20)
Why operating system in important to Explain the all phases/Steps of
run the machine and explain all types of software development life Cycle, each
Q.3 operating systems in details? 5 OR 5
phase in detail and draw the diagram
of software development life Cycle?
Write down the code to print the Write the c++ program using following
following pattern on the screen. array.
int num={40,50,27,45,01,09} 1+1+
Q.4 1=1 OR 1+1+
5 a) Find and print sum of elements
1+2=3 1
b) Find and print average
1+2+3=6
c) Print the minimum element
1+2+3+4=10
d) Print the Maximum element
What is the function discuss Scope of Write down c++ program that print all
different variables and life time of 1+2 the positive odd number upto 30
Q.5 OR 5
local and global variables +2 skipping those that are divisible by 5
using continue statement.
What is decision control structure? How would you define a pointer in
Explain all types of if statements with
Q.6 OR programming, discuss any four key 5
syntax and examples. 5
advantages of using pointers, and
demonstrate their declaration and
initialization with the help of a relevant
code example?

You might also like