Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
48 views
4 pages
Computer SC (Ha)
Uploaded by
Saira Khalid
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Computer Sc (Ha) (1) For Later
Download
Save
Save Computer Sc (Ha) (1) For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
48 views
4 pages
Computer SC (Ha)
Uploaded by
Saira Khalid
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Computer Sc (Ha) (1) For Later
Carousel Previous
Carousel Next
Download
Save
Save Computer Sc (Ha) (1) For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 4
Search
Fullscreen
BERBER eR eRe eR Re RRR RRR Ree eee eee Sit (OMOMOMEO) Answer Shest No. Sign. of Candidate Sign. of invigilator © ® ©0600 ©0@¢ © ©®00 ©®00 ©0202000 0000 Ce OMOMOMOMG) ®00®8 ®@©02020080 fete usmle Atel 2 COMPUTER SCIENCE tance ‘ovet te te Cane Surender HSSC-I Rea pancie eS rstatenes Denekse SECTION — A (Marks 18) Time allowed: 20 Minutes Lil hy Mifare P paiaLying Sid net gut emia hee Fill the relevant bubble against each quostion: efron Compare wo Combine two Comparetwo Combine ivo 1, The 88 and | operators: O numeric rumerle Boolean ©) Boolean values values values vaties : ay Oniyityou ‘To member Only to pubic 2, I @ class defnon, data or functions (> function in the C) know the functions of — C) members of designated private ore accossile Aneto ea thatcase the cass IF jae integer type and kis ong ype, KH) e : 3. ould represent whic ype of value’ Mteuer © Float O bong Crete In time sherng system, the term Unt reters _ — 4. {0 allocation of resources to program for () Time slice © Response time © Timeevent ©) siccation Tnitedarouns of imei alee Retumsa Reluns a Disrlays@ “Does not charater charactor aepay a 5.” The getche( library function: oO when any key when Enter is Mis ecteen character on is pressed pressed when any Key the eeaon . Airstindrst 6 The det member Anindex 6. Anarray element is accessed using or oan Ou \Which ofthe foowina state tenons NOT + filocked to Ready to Blocked to Running 0 7 possible? O Running = © Running OO Ready Blocked In which SDLC stage the process of trining + System system system system 8 personnel tose the new system is done?” Analysis. © © Design © bevetopment © implementation | When the process is having all the resources 9. excopt processor then its considered in) Waling -C) Ready =) Ruming ©) New State? Which SDLC stage is lnvowed in the 20. monitoring, evaluation, repairing and () Development © Maintenance ©) Analysis © Testing improving in an already developed system? Page 1 of2Teterio ihe rer owe pee ‘ae tthe “The expression ‘test can be sald to: Bepointeo © coiantsof — C) Rerelerenee © variable fea pamtd by Relat Apa adcres ot Anineaton pvarabe for The dala ype 12 Apple's: The adress of (> ofthevaratle sleing Catan adress toe nent attretses varie Who spend most of The time in the - Bevin stages of SOLS In TBKNg VN gam roe a 13. enbusea, geterng” inematen, CY rseet Top Manager © System documenting system and processing anal ° Manager ° Pestana souls? Wakes Takes Consens Rana vale a he Varble able C> warabe vse) metry hen when Be deel) Wg O wrseversi OQ toonyone © atunetionis funtion is not iincions noon hateweeuing executing : The progam The fray furcion ext causes an edt cy Theloopin. > The bockin Cy Thefuncfonin ca TG 3 from O whieh itoccurs Q which t oscars O which teccurs © inven cecurs 2a 22128121 (HA) ROLL NUMBER T LI Page 2 of 2Time allowed: 2:40 Hours COMPUTER SCIENCE HSSC-I Total Marks Sections B and C: 60 NOTE: Answer any twelve parts from Section ‘B’ and any three questions from Section ‘C’. Use supplementary answer sheet i.e. Sheet-B if required. Write your answers neatly and legibly. Statistical table will be provided on demand. SECTION -B (Marks 36) Q.2 Attempt any TWELVE parts. All parts carry equal marks. (12x3 = 36) () Whois programmer? List any four responsibilities of the programmer. (ii) Briefly describe how is the functionality of a system ensured? (ii) What kind of program elements are the following? a4 bo 4 «42 4. class e —oless() f class" (iv) Answer the following questions: a. Write a statement that displays the variable FBISE in a field 10 characters wide. b. Write a statement that gets a numerical value from the keyboard and places itn the variable temp. c. What header file must be included in program to use setw()? (Vv) What is process? And state different process states with their functions, (vi) Write a do-while loop that displays the numbers from 100 to 10. (vii) List key differences between process and thread (ull) Answer the following questions: a. Write a statement that defines a one-dimensional array called ABC of type double that holds 100 elements, b. Write a statement that takes element jof array PR and writes it to couts< Write a statement that defines an array BILLS of type int and initializes it to the values of Pakistani curreney notes (10,20,50, 100,500, 1000,6000). (ix) Look at the following array definition int sales (8](10} a. How many rows does the array have? b. How many columns does the array have? . _ Howmany elements does the array have? d. Write a statement that stores a number in the last column of the last row in the array. 2. Write a statement that stores @ number in the 7% column of the 3" row in the array. f. Write a statement that replaces the value of the 7 column of the last row in the array. (%) Write declarations for two overloaded functions named FBISE(). The both have return type int. The first takes one argument of type char, and the second takes two arguments of type char. If this is impossible, justify why? (xi) Answer the following questions: ‘a, Whats the significance of empty parentheses in a function declaration? b. What is the purpose of using argument names in a function declaration? ©. How many values can be returned from a function? (xi) Write a code that uses a for loop to write the numbers 1 to10 to a file and reads all of the numbers from the file, and displays them, (xii) What is a pointer variable? Differentiate between reference operator (&) and dereference operator (*)? age 1 of 2 (Computer Science)a4 as (xiv) Answer the following questions: a. Write statements that will create an object called XYZ of the ofstream class and associate it with the file called SALES. te b. Write an if staternent that checks whether an ifstream object called XYZ had reached the end of file. ©. Write a statement that writes a single character to an object called XYZ, which is of class ofstream. (xv) Answer the following questions a Write switch code that prints Yes if variable ch is 'y’, prints No if ch is‘n’, and prints Unknown response otherwise, b. Write a statement that uses a conditional operator to set ticket to 1 if speed is greater than 55, and to 0 otherwise ©. Write an expression involving a logical operator that is true if limit is equal to 65 and speed is greater than 55. (xvi) What three steps must be taken when a file Is used by a program? SECTION C (Marks 24) Attempt any THREE questions. All questions carry equal marks. (3x8 24) a. Whatis an array? Write its advantages. (04) b. Write a program that lets the user enter 10 values into an array. The program should then display the largest and smallest values stored in the array. (04) Create the equivalent of a four-function calculator. The program should ask the user to enter a number, an operator, and another number. It should then carry out the specified arithmetical operation: Adding, subtracting, ‘multiplying, or dividing the two numbers. Use a switch statement to select the operation. Finally, display the result. When it finishes the calculation, the program should ask whether the user wants to do another calculation. ‘The response can be ‘y’ or 'n’. Some sample interaction with the program might look like this: (08) Example Output Ener first number, operator, second number: 10/3 Answer = 3.333333 Do another (yin)? y Enter first number, operator, second number: 12+100 Answer = 112 Do another (yin)? n Raising a number n to a power p is the same as multiplying n by itself p times. Write a function called power() that takes a long int value for n and an int value for p, and returns the result as a long int value. Use a default argument of 2 for p, so that if this argument is omitted, the number n will be squared. Write ‘@ main() function that gets values from the user to test this function. (08) a. Write a class declaration named Circle with a private member variable named radius. Write set and get functions to access the radius variable, Add a default constructor to the Circle the constructor should initialize the radius member to 0. Add on overloaded constructor to the Circle class the constructor should accept an argument and assign its value to the radius member variable. (04) . Describe the terms: (Inheritance (i) Polymorphism Each with an example from our daily life. (04) —2HAI 2212 (HA) — Page 2 of 2 (Computer Science)
You might also like
11CS_EM_PublicQns_2_2_2_1 (4)
PDF
No ratings yet
11CS_EM_PublicQns_2_2_2_1 (4)
6 pages
SECTION - A (Marks-12) : 10 To 10 10 To 10 10 To 10 10 To 10
PDF
No ratings yet
SECTION - A (Marks-12) : 10 To 10 10 To 10 10 To 10 10 To 10
2 pages
Updated COMPUTER HSSC II Pre Board 2020
PDF
No ratings yet
Updated COMPUTER HSSC II Pre Board 2020
4 pages
Computer Final Chap Wise Phases Xii
PDF
No ratings yet
Computer Final Chap Wise Phases Xii
8 pages
Paper Class 12 Computer Science - 045937
PDF
No ratings yet
Paper Class 12 Computer Science - 045937
3 pages
11th_Computer_Science_EM_Official_Answer_Keys_for_Public_Exam_May
PDF
No ratings yet
11th_Computer_Science_EM_Official_Answer_Keys_for_Public_Exam_May
6 pages
COMP. Midterm Paper X-SCI. OCTOBER.2023 - 2
PDF
No ratings yet
COMP. Midterm Paper X-SCI. OCTOBER.2023 - 2
2 pages
Computer Science 12
PDF
No ratings yet
Computer Science 12
3 pages
PAST PAPER 2024 First Annual COMPUTER SCIENCE FBISE
PDF
No ratings yet
PAST PAPER 2024 First Annual COMPUTER SCIENCE FBISE
4 pages
11th-Computer-Science-EM-Half-Yearly-Exam-2022-Original-Question-Paper-English-Medium-PDF-Download
PDF
No ratings yet
11th-Computer-Science-EM-Half-Yearly-Exam-2022-Original-Question-Paper-English-Medium-PDF-Download
2 pages
PLUS ONE COMPUTER APPLICATION XMAS EXAM 24 ANSWER KEY_hssreporter•com
PDF
No ratings yet
PLUS ONE COMPUTER APPLICATION XMAS EXAM 24 ANSWER KEY_hssreporter•com
5 pages
Class Xi Computer Science Paper For Half Yearly Exam 2010
PDF
60% (5)
Class Xi Computer Science Paper For Half Yearly Exam 2010
8 pages
PIC PYQ
PDF
No ratings yet
PIC PYQ
13 pages
Cs201 Midterm Solved Mcqs by Junaid Malik
PDF
No ratings yet
Cs201 Midterm Solved Mcqs by Junaid Malik
43 pages
11th Computer Science Half Yearly QP EM Thanjavur
PDF
No ratings yet
11th Computer Science Half Yearly QP EM Thanjavur
2 pages
Computer Science Assignment Xi
PDF
No ratings yet
Computer Science Assignment Xi
34 pages
HSSC-II Computer Science (2nd Set)
PDF
No ratings yet
HSSC-II Computer Science (2nd Set)
9 pages
11CS EM PublicQns-1
PDF
No ratings yet
11CS EM PublicQns-1
30 pages
Model Paper1
PDF
No ratings yet
Model Paper1
3 pages
C
PDF
No ratings yet
C
64 pages
Computer Science HSSC-II According To 2009 Syllabus PDF
PDF
No ratings yet
Computer Science HSSC-II According To 2009 Syllabus PDF
4 pages
General Instructions: 1. All Questions Are Compulsory. 2. Programming Language Is C++
PDF
No ratings yet
General Instructions: 1. All Questions Are Compulsory. 2. Programming Language Is C++
4 pages
Final HSSC-II Model Paper Computer Science
PDF
No ratings yet
Final HSSC-II Model Paper Computer Science
9 pages
Important Questions in B.tech C - Program
PDF
80% (5)
Important Questions in B.tech C - Program
9 pages
Heq Apr24 Cert Software development
PDF
No ratings yet
Heq Apr24 Cert Software development
4 pages
Computer Science B.SC - .Prog - .Sem - Nov Dec 2016
PDF
No ratings yet
Computer Science B.SC - .Prog - .Sem - Nov Dec 2016
98 pages
Computer Programming
PDF
No ratings yet
Computer Programming
36 pages
XII First Term Exam 2024
PDF
No ratings yet
XII First Term Exam 2024
5 pages
Exam 19 March Questions
PDF
No ratings yet
Exam 19 March Questions
13 pages
20CSS01 PPS Question Bank
PDF
100% (1)
20CSS01 PPS Question Bank
24 pages
cs kseeb preboard 24-25
PDF
No ratings yet
cs kseeb preboard 24-25
2 pages
Computer Programming
PDF
No ratings yet
Computer Programming
21 pages
C Important Questions PDF
PDF
100% (2)
C Important Questions PDF
9 pages
Computer Science SSC-II Solution
PDF
No ratings yet
Computer Science SSC-II Solution
11 pages
Computer Science HSSC-II Solution
PDF
No ratings yet
Computer Science HSSC-II Solution
12 pages
Computer Science HSSC-II Solution of 2nd Set Model Question Paper
PDF
No ratings yet
Computer Science HSSC-II Solution of 2nd Set Model Question Paper
13 pages
MCOA011 MAIN EXAM PAPER 2017
PDF
No ratings yet
MCOA011 MAIN EXAM PAPER 2017
10 pages
PC previous year question papers_adf4ff00-6ed5-4f5f-b59f-a12e0749d51e
PDF
No ratings yet
PC previous year question papers_adf4ff00-6ed5-4f5f-b59f-a12e0749d51e
5 pages
Paper Class 12 Computer Science - 045937
PDF
No ratings yet
Paper Class 12 Computer Science - 045937
6 pages
FinalAssesmentModel 2081(Student)
PDF
No ratings yet
FinalAssesmentModel 2081(Student)
3 pages
C ProgrammingClass Test, 2024 (1st Test) (By AB Sir's Coaching 8910350813)
PDF
No ratings yet
C ProgrammingClass Test, 2024 (1st Test) (By AB Sir's Coaching 8910350813)
2 pages
("!I9Cl. - Qggsgls:P11Glggltqlg$Ail: Examination Control Division
PDF
No ratings yet
("!I9Cl. - Qggsgls:P11Glggltqlg$Ail: Examination Control Division
30 pages
CS20110SolvedMidtermPApersin1File PDF
PDF
No ratings yet
CS20110SolvedMidtermPApersin1File PDF
105 pages
CS MSC Entrance Exam 2006 PDF
PDF
No ratings yet
CS MSC Entrance Exam 2006 PDF
12 pages
Final HSSC-II Model Paper Computer Science
PDF
No ratings yet
Final HSSC-II Model Paper Computer Science
9 pages
Computer Science SSC-II Solution of 2nd Set Model Paper
PDF
No ratings yet
Computer Science SSC-II Solution of 2nd Set Model Paper
10 pages
Computer Science 2018
PDF
No ratings yet
Computer Science 2018
6 pages
Final Model Paper Computer Science SSC-II
PDF
No ratings yet
Final Model Paper Computer Science SSC-II
7 pages
Final Model Paper Computer Science HSSC-II
PDF
No ratings yet
Final Model Paper Computer Science HSSC-II
9 pages
CS201 All Term Paperz in 1 File (Pages 1 To 63) Eagle - Eye
PDF
No ratings yet
CS201 All Term Paperz in 1 File (Pages 1 To 63) Eagle - Eye
63 pages
Computer Science Ssc-Ii: Answer Sheet No.
PDF
No ratings yet
Computer Science Ssc-Ii: Answer Sheet No.
8 pages
SSC-II Computer Science (2 Sets With Solutions) - Combined
PDF
No ratings yet
SSC-II Computer Science (2 Sets With Solutions) - Combined
37 pages
CS201Allmidtermpaperzin1filepages1to63eagle Eye
PDF
No ratings yet
CS201Allmidtermpaperzin1filepages1to63eagle Eye
63 pages
ComputerScience SQP
PDF
No ratings yet
ComputerScience SQP
15 pages
Computer Concept and Programming Questions
PDF
No ratings yet
Computer Concept and Programming Questions
15 pages
GE6151-Computer Programming PDF
PDF
No ratings yet
GE6151-Computer Programming PDF
7 pages