12th Computer Science Guess Papers +subjective + MCQs by Urdu Books

Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

Guess Paper Annual 2024 Computer Science 12

103. Predict the output of the following code segment: int a =2; while ( a< =7) { printf(\n a = %d”, a ); a + +
}
104. Rewrite the following code using do-while loop. void mian() { int x = 10; do { printf("%d \n", x%2);
x = x -1; } while(n >= 1); }
105. Write output. int x = 5, y = 3; do { x = x*2; y = y+2; } while(y < 7); printf("%d",x);
106. Define infinite loop?
107. Why is sentinel value used in loops?
108. Define for loop.
109. Find output of the following code. #include <stdio.h> void main { int i, p=1; for(i=1; i<6; i+=1) p*2;
printf("p is = %d",p); }
110. What is the final value of x after executing the following code? for(int x = 0; x < 10, x++)
111. Predict the output from the following code. int n; cirscr (); for(n = 5; n >= 1; n--) printf("%d\n",n);
getch();
112. Trace the output. int i, j = 10; for(i = 1; i <= 5; i++) { Prinft("\n Pakistan"); }
113. Define Compound Statement?
114. What is sentinel controlled loop?
115. Define goto statement.

LONG QUESTIONS
Section-II
(MS ACCESS!
Note : Attempt any ONE question.
1. What is File? Explain File types from storage point of view.
2. How would you define a table? Also write characteristics of tables.
3. Write down four major components of database system in detail.
4. What is Query? Discuss different types of queries.
5. Define ER Diagram. Explain it with the help of an example.
6. Write any four advantages of DBMS.
7. Discuss different methods of modifying a table in MS-Access.
8. Briefly explain the database design process with the help of diagram .
9. What is a form? Explain its uses and advantages.

Section-III
Note : Attempt any TWO descriptive answers ( either from “ C-Language” or from
“ Visual Basic” ) of the following questions.
( C- Language )
1. What is meant by programming language? Discuss different types of programming languages.
Page 24
Guess Paper Annual 2024 Computer Science 12
2. Write a program that inputs three numbers and displays the maximum number by using if-else, if
statement.
3. What is for loop? Write down syntax and working of for loop with example.
4. Write down the step-by-step procedure to create a C-program?
5. Write a program in C-language that accepts three numbers from user and display the largest number
using nested if.
6. What is nested loop? Write its syntax and explain its working with flowchart and example.
7. Describe characteristics of High Level Language.
8. What is Switch Statement? Write its syntax, draw flow chart and explain its working.
9. Write a program that inputs a number from the user and displays the factorial of that number.
10. Write any eight characteristics of C-Language.
11. What is if-else statement? Draw its flow chart, also explain its working with an example.
12. Write a program in C that inputs a number from the user and displays the table of that number using
for loop
13. Discuss printf function in detail.
14. What is nested “ if ” statement? Explain its working with example.
15. Write a program that displays counting from 10 to 1 using For loop

OR
( Visual Basic )
1. What is meant by programming language? Discuss different types of programming languages.
2. Write a program in VB that inputs three numbers and displays the maximum number by using nested
if statement.
3. What is for next loop? Write down syntax and working of for next loop with example.
4. How can we create a project in VB? Explain its different steps.
5. Write a program in VB that input three numbers by using three text box and display the largest
number.
6. What is nested loop? Write its syntax and explain its working with flowchart and example
7. Describe characteristics of High Level Language.
8. Write a program to swap the value of two variables without using third variable.
9. What is if-then-else statement? Draw its flow chart, also explain its working with an example. 8
10. Write a program in VB that inputs a number from the user and displays the table of that number
using For—Next loop
11. What is variable? Write down the rules to give name to the variable.
12. Define array. Explain its different types in Visual Basic (VB).
13. Write a program that displays counting from 10 to 1 using For-Next loop

Page 25
Guess Paper Annual 2024 Computer Science 12

COMPUTER SCIENCE
INTER PART-II
1 Which of the following type of file require largest processing time?
A Sequential file B Random file C Indexed sequential file D Direct access file
2 Which of the following may be a temporary file?
A Master file B Transaction file C Backup file D None of these
Which of the following represents a collection of concepts that are used to describe the structure of a
3 database?
A Data warehouse B Data model C Data structure D Data type
4 Which of the following data model is more flexible?
Hierarchical data Relational data
A Network data model B C D Object data model
model model
5 SQL is a(n):
Unstructured Object oriented
A language B Structured language C language D Software
6 The manipulated and processed data is called:
A Object B Information C Data D None
7 The process of arranging data in a logical sequence is called:
A Sorting B Summarizing C Data capturing D Classifying
8 A collection of raw facts and figures is called:
A Data B Information C Processing D None
9 The smallest meaningful unit of data in a database is called:
A Byte B Record C Character D Field
10 A collection of related fields is:
A File B Record C Database D None
11 ......... type requires largest processing time.
A Random file B Direct access file C Sequential file D Index sequential file
12 Which of the following may be temporary file?
A Master file B Data file C Transaction file D Program file
13 A logical grouping of characters is a:
A Filed B Record C File D All
14 A ......... can store text only.
A Binary B Text file C Exe file D Object file
15 Which one of the following type of file requires largest processing time?
Indexed sequential
A Sequential file B Random file C file D Direct access file
16 Data can be recovered in case of loss by using:
A Master file B Transaction file C Backup file D Data file
17 A database containing all students in a class would store basic data of students in:
A Record B Filed C Cell D File
Page 1
Guess Paper Annual 2024 Computer Science 12
18 Which file is used to store information that remains constant for a long time:
A Data file B Master file C Transaction file D Backup file
19 The extension of image file is:
A .exl B .doc C .bmp D .ppt
20 A database is an organized collection of ......... related data.
A Logically B Physically C Loosely D Badly
21 Which of the following database model is also referred an inverted tree?
A Hierarchal B Network C Relational D Object
22 Which one refers to the correctness and consistency of data?
A Data independence B Data integration C Data integrity D Data model
23 Multiple copies of the same data is referred to as:
A Data integrity B Data inconsistency C Data redundancy D Data isolation
24 SQL stands for:
Self-Quantifying- Structured Query Self Quantative
A Sort-Query-List B Language C language D language
25 Insert command is used to insert:
A A new table B A new record C A view D Dependencies
26 CREATE command is used to create a:
A Table B View C View D Query
27 SQL is used for:
Data definition and
A Data definition B Data manipulation C manipulation D Searching records
28 The foreign key is found in:
A Parent table B Dependent table C Pivot table D Index table
29 A table must have:
A Primary key B Secondary key C Composite key D Sort key
30 An entity related to itself in an ERD model refers to:
Recursive One-to-many Many-to-many
A relationship B relationship C relationship D One-to-one relationship
31 Which of the following keys does not hold uniqueness property?
A Candidate key B Foreign key C Primary key D Secondary key
32 Database development process involve mapping of conceptual data model into:
Object oriented Network data Implementation
A data model B model C model D Hierarchical data model
33 In relational database, a table is also called a:
A Tuple B Relation C File D Schema
34 A category of data or information that describes an entity is called a(n):
A Attribute B Data item C Record D Tuple
35 The row of relation can be of ......... order.
A Any B Same C Sorted D Constant
36 A relation is analogous to a:
A Table B Field C Record D Row
37 Which of the following is degree of a table?
Total number of Total number of Total number of foreign
A rows B columns C Total number of cells D keys
Page 2
Guess Paper Annual 2024 Computer Science 12
38 The row of table is also called:
A Entity B Attributes C Cell D Record
39 A relation is also known as:
A Table B Tuple C Relationship D Attribute
40 The columns of a table correspond to:
A Table B Record C Field D Cell
41 Which of the following is not included in the definition of entity?
A Person B Object C Concept D Action
42 Which of the following is used to associate entities with one another?
A Entity B Attribute C Identifier D Relationship
43 In MS Access, table contains:
A Fields B Record C Character D File
44 Views are also called:
A Complex tables B Simple tables C Virtual tables D Actual tables
45 To find all names start with M from student table, the criteria is:
A Like “M?” B Like “M – ” C Like “M# ” D Like “M * ”
46 A virtual table that is constructed form other tables is called:
A Tuple B Table C View D Report
47 A key that consists more than one attributes is called:
A Foreign key B Composite key C Primary key D Control key
48 The selected candidate key is called:
A Foreign key B Composite key C Primary key D Sort key
49 ......... key does not hold uniqueness property.
A Foreign B Candidate C Primary D Secondary
50 A table must have a:
A Primary key B Secondary key C Composite key D Sort key
51 Foreign key is found in:
A Parent table B Dependent table C Pivot table D Index table
52 How many primary keys can a relation have?
A At least once B Only one C No limit D Three
53 All the hardware costs are considered during:
Requirements
A Project planning B analysis C Feasibility study D Data analysis
54 In an E-R diagram, a rectangle represents a(n):
A Entity B Attribute C Relationship D None
55 ......... is used to define characteristics of an entity/object.
A Object B Attributes C Records D Files
56 In an E-R diagram, a diamond represents a(n):
A Attributes B Relationship C Entity D Modality
57 In ERD model, the relationships between two entities are represented by:
A Rectangle B Oval C Square D Diamond
58 Customers, cars and parts are examples of:
A Entities B Attribute C Cardinals D Relationships
59 Which one is not related to an entity?

Page 3
Guess Paper Annual 2024 Computer Science 12
A Person B Concept C Action D Object
60 Color of car is an example of:
A Entity B Attributes C Relation D Relationship
61 Which one of the following is used to associate entities with each other?
A Attributes B Relationship C Entities D Cardinals/Identifier
62 An entity related to itself in an ERD model refers to relationship:
A Recursive B One to many C Many to many D One to one
63 A relationship between countries and capitals is an example of relationship:
A One-to-one B One-to-Many C Many-to-Many D Many-to-One
64 Which of the following defines the nature of the relationship?
A Modality B Decision tree C Both A & B D None
65 Which of the following is not a basic data distribution strategy?
A Centralized B Partitioned C Replicated D Duplicated
66 In 3NF, which form of dependency is removed?
A Functional B Non-functional C Associative D Transitive
67 In relational database, a table is also called a:
A Tuple B Relation C File D Schema
68 Different attributes in two different tables having same name are referred to as:
A Synonym B Homonym C Acronym D Mutually exclusive
69 Every relation must have a:
A Primary key B Candidate key C Secondary key D Composite key
70 Transitive dependency is removed in:
A 1st normal form B 2nd normal form C 3rd normal form D 4th normal form
71 Two or more attributes having different names but same meaning is called:
A Homonyms B Aliases C Synonyms D Alternate attributes
72 Referential integrity is applied on:
A Foreign key B Composite key C Primary key D Sort key
73 A primary key that consists of two or more attributes of a relation is called:
A Sort key B Candidate key C Sub key D Composite key
74 Microsoft access saves the database with the extension:
A .mdb B .msdb C .madb D None of them
75 A database consists of various components called the:
A Tool B Properties C Entities D Object
76 Which of the following object of database is used to retrieve data from database?
A Queries B Forms C Reports D Tables
77 The output of a query is in the form of a:
A Table B Form C Report D Query
Which of the following object is used to retrieve data from database and present in a formatted
78 away?
A Report B Form C Table D Query
79 In access, the structure of a table is created in ......... view.
A Design view B Datasheet view C Both A & B D None of them
80 Which shortcut key is used to open an existing database in MS Access?
A Ctrl + N B Ctrl + S C Ctrl + O D Ctrl + Z

Page 4
Guess Paper Annual 2024 Computer Science 12
81 It makes very simple to create a database:
A Sample database B Wizard C Common standard D Easier programming
82 MS Access saves the database with the extension:
A .mbdq B .msdb C .ppt D .mdb
83 In relational database, a table is called:
A Tuple B Relation C File D Scheme
84 A set of related files created and managed by a DBMS is called:
A Field B Record C Database D Module
85 Which object is the output of a database application?
A Form B Query C Table D Report
86 A database consists of various components called:
A Tools B Properties C Entities D Objects
87 Which object is used to store data in database?
A Macro B Table C Form D Report
88 The output of the query is in the form of:
A Table B Form C Report D Query
89 Which of the following is not a database object?
A Table B Query C Report D MS Word
90 The example of popular DBMS is:
A MS Word B MS Access C MS Excel D MS PowerPoint
91 The graphical query tool is known as:
A Query grid B Design grid C Query form D Design form
92 In a relational database, a single piece of information is called:
A Field B Record C Entity D Attribute
93 The data in table is entered in:
A Design view B Normal view C Datasheet view D Layout view
94 How many table views are available in Microsoft access?
A 4 B 3 C 2 D 1
As in design view, you can move from field to field in the table window in datasheet view using .........
95 button.
A Tab B Esc C Enter D Spacebar
96 To find a four-character name that starts with H, the criteria is specified as:
A H*4 B H?4 C H???? D H####
97 Which of the following buttons of find and replace dialog box is clicked to start the search process?
A Find B Find next C Search D Next
The rule that a record from a table cannot be deleted if it’s associated record exits in a related table is
98 called ......... rule.
A Referential integrity B Entity–relationship C Normalization D All of them
99 The relationship between countries and their capitals is an example of ......... relationships.
A One-to-one B One-to-many C Many-to-many D None of them
100 The wildcard ......... Sal[ei]ma.
A Saleema B Salima C Both A & B D None of them
101 Each set of related items in a table is called:
A Table B Record C Field D Query

Page 5
Guess Paper Annual 2024 Computer Science 12
102 What is the default field size of a Text data type in MS-Access?
A 2 B 5 C 20 D 50
103 Which data type is default type in Access?
A Memo B Number C Text D Auto number
104 Every table must have a:
A Foreign key B Composite key C Primary key D Sort key
Which data type can be used to define a field that consists of only numbers to be used in
105 calculations?
A Text B Memo C Number D Date/time
Which data type can be used to define a field that consists of only numbers to be used in
106 calculations?
A Text B Memo C Number D Date/time
107 The column of a table corresponds to:
A Table B Field C Record D Cell
108 Which symbol indicates that you are editing a record?
A Pencil B Black arrow C Key D Asterisk
109 Which key is used to move field to field in table window in datasheet view?
A Tab B Esc C Enter D Spacebar
110 What command is required to actually execute a filter on a table?
A Remove filter B Apply filter C Clear grid D Find next
111 Which filtering method allows you to use data in a field as criterion for filtering?
A Filter by form B Apply filter C Clear grid D Find next
112 Which of the following is an example of a filter by form expression?
A Abdullah B 1985 C 4 OR 5 D None
113 What is Z to A order called?
A Ascending B Descending C Condescending D Alphabetical
114 The Sort Ascending button will:
Order all records
Order all records reverse Filter out selected
A alphabetically B alphabetically C records D Delete selected records
115 How find four names that starts with H, the criteria is specified as?
A H*a B H?4 C H???? D H##
116 The graphically query tool is known as:
A Query grid B Design grid C Query form D View form
117 How many query views are available in MS Access?
A 2 B 3 C 4 D 5
118 To find a name that start with S, the criteria is written as:
A S#? B S# C ?S D S*
119 ......... is used to retrieve data from one or more tables.
A Macro B Table C Query D Form
120 Forms are designed for:
A Input data B Manipulate data C Accepting change D All of them
121 How many are basic layouts of forms in Microsoft access?
A 2 B 3 C 4 D 5

Page 6
Guess Paper Annual 2024 Computer Science 12
122 The forms are the ......... end of our database in Microsoft access.
A Back B Front C Both A & B D None of these
123 A ......... auto form displays one record at a time.
A Tabular B Columnar C Datasheet D Justified
124 A form that contains the sub form is called:
A Form B Main form C Report D None of them
125 You can drag the ......... bar to move the property sheet window around on your screen.
A Title bar B Status bar C Scroll bar D All of them
A report provides a column for each field of the records in rows under the column header is known
126 as:
A Tabular B Columnar C Datasheet D Justified
127 ......... can be previewed on the screen before printing.
A Report B Form C Sub form D None of them
Which of the following is used to retrieve data from one or more tables of database and to present it
128 to the user in a formatted way?
A Report B Form C Query D Table
129 How many are the layout of report?
A 2 B 3 C 4 D 5
130 ......... auto form displays one record at a time.
A Columnar B Tabular C Datasheet D Justified
131 The forms are designed to:
A Data capturing B Data manipulation C Analysis D Managing output result
132 How many form layouts are provided by MS Access?
A 2 B 3 C 4 D 5
133 A form that contains a sub form is called:
A Form B Main form C Report D Child form
134 A form within another form is called:
A Sub-form B Main form C Multi-form D None
135 A sub form can be created using:
Drag and drop
A The form wizard B method C Sub form wizard D All of these
136 Which of the following is a one-to-many relation?
A Student-Reg no. B Mother-Daughter C Person-Date of birth D Country-Capital
137 A report may be based on:
A Table B Relationship C Form D Attributes
138 How many reports layouts are?
A 2 B 3 C 4 D 5
139 How many reports layouts are?
A 2 B 3 C 4 D 5
Which of the following is used to retrieve data from database and represent it to the user in a
140 formatted way?
A Form B Query C Table D Report
Which of the following is used to retrieve data from database and represent it to the user in a
141 formatted way?
A Form B Query C Table D Report
Page 7
Guess Paper Annual 2024 Computer Science 12
142 C is a:
A High level language B Low level language C Assembly language D Machine language
143 C was designed to write programs for:
Windows operating Windows operating Unix operating
A system B system C system D OS/2 operating system
144 Turbo C++ can compile:
Turbo C programs Turbo C++ programs
A C++ programs only B C and C++ programs C only D only
145 .exe file is produced by the:
A Linker B Loader C Compiler D Interpreter
146 Which of the following key is used to save a file?
A F2 B F3 C F5 D F9
147 Preprocessor directives are commands for:
A Microprocessor B Language processor C C preprocessor D Loader
148 Debug is the process of:
Creating bugs in Identifying and
A program B removing errors C Identifying errors D Removing errors
149 C-language was developed in:
A 1962 B 1969 C 1970 D 1972
150 The extension of C source program is:
A .h B .c C .obj D .exe
151 The process of converting source code into object code is knows as:
A Compiling B Executing C Linking D Saving
152 C statement end with a:
A Period B Comma C Colon D Semicolon
153 C-Language programs are divided into units called:
A Section B Syntax C Function D Debug
154 The statements written by programmer are called:
A Source code B Object code C Syntax D Debugging
155 The target code produced by the compiler is:
A Object code B Source code C Library code D Linked code
156 The target code produced by the compiler is:
A Object code B Source code C Library code D Linked code
157 ......... is a loop statement.
A If B If-else C Switch D For
158 Which of the following is used to donate preprocessor directives?
A % B $ C # D @
159 Header files in C contain:
Header information
A Compiler commands B Library functions C of C programs D Operators for files
160 Header files in C contain:
Header information
A Compiler commands B Library functions C of C programs D Operators for files
161 Which header file contains information about standard input/output functions?
A Stdio.h B Conio.h C String.h D Math.h
Page 8
Guess Paper Annual 2024 Computer Science 12
162 The name of header file is written between:
A [] B () C <> D << >>
163 The extension of the header file is:
A .c B .txt C .hf D .h
164 A table is a two dimensional structure that consists of:
A X and Y coordinates B Matrix elements C Rows and columns D Intersection of data
165 A program syntax error is detected by:
A Linker B Compiler C Loader D Debugger
166 The lowest level of programming language is:
A Java B Assembly language C Pascal D C++
167 Which of the following is not a low level language?
A BASIC B Machine C Assembly D None of these
168 Which of the following language requires no translator to execute the program?
A C B C++ C Machine language D Assembly language
169 Variables are created in:
A RAM B ROM C Hard disk D Cache
170 Which of the following is a valid character constant?
A A B B C 6 D =
When the result of the computation of two very small numbers is too small to be represented, this
171 phenomenon is called:
Arithmetic Arithmetic
A overflows B underflow C Truncation D Round off
172 The symbol = represents:
Comparison Assignment
A operator B operator C Equal to operator D None of these
173 Which of the following operators has lowest precedence?
A ! B + C = D ==
174 Relational operator is used to:
Establish a
relationship among Compare two Construct compound Perform arithmetic
A variables B values C conditions D operations
175 Which of the following is also known as control key?
A Foreign key B Composite key C Primary key D Sort key
176 Variable and constant names cannot contain a(n):
A Number B Underscore C Letter D Period
177 In C, the maximum length of text name is:
A 25 characters B 255 characters C 155 character D 55 characters
178 A memory location with some data that can be changed is called:
A Constant B Variable C Named constant D None
179 Which is a valid character constant?
A A B “Hello” C ‘6’ D =
180 The maximum length of text type field in MS Access is:
A 50 characters B 250 characters C 155 character D 255 character
181 Which term describes the kind of values that a variable can store?
A Variable Name B Data type C Variable type D Variable size
Page 9
Guess Paper Annual 2024 Computer Science 12
182 The number of bytes used by int data type in C is?
A 8 B 6 C 4 D 2
183 Number of bytes used by long double data type is:
A 4 B 8 C 10 D 12
184 The data type in C that can handle fractional values is called:
A Long B Char C Float D Int
185 Which is numeric data type with decimal point?
A Float B Int C Char D Long
186 Int is a ......... in C.
A Special word B key word C Cut word D First word
187 The only binary operator in the following is:
A ? B ++ C -- D +
188 Relational operators allow you to ......... values.
A Compare B Add C Multiply D Divide
189 When a relational expression is false, it has the value:
A Zero B One C Less than zero D Two
190 a+=b is equivalent to:
A b+=a B a=+b C a=a+b D b=b+a
191 The symbol “=” represents:
A Comparison B Assignment C Equal to D Logical
192 All of the following are logical operators except?
A NOT B AND C OR D =
193 The value of the C expression 5/9*2 is:
A 0.27 B 1.11 C 0 D 2
194 Which of the following is equivalent to (p>=q)?
A P<q B !(p<q) C p>q D !p<q
195 Which operator has lowest precedence?
A ! B + C = D ==
196 This means to increase a value by one:
A Modulus B Increment C Decrement D None of these
197 This means to increase a value by one:
A Modulus B Increment C Decrement D None of these
198 The value of logical operator OR will be 1 if:
A A=0 & B=1 B A=1 & B=0 C A=1 & B=1 D All of these
199 The value of logical operator OR will be 1 if:
A A=0 & B=1 B A=1 & B=0 C A=1 & B=1 D All of these
200 Logical operators are:
A NOT B AND C OR D All
201 For A = 4 and B =4 which expression evaluates as true?
A A>=B B A!=B C A<B D A>B
202 The expression p - = q is equivalent to:
A p=q-p B p=q-1 C p=p-q D q=p-q
203 An expression that uses a relational operator is known as:
A Operational B Sequential C Serial D Relational

Page 10
Guess Paper Annual 2024 Computer Science 12
204 An expression constant of:
A Operators B Operand C Both A & B D None
205 The escape sequence for backslash is:
A \ B \b C \\ D \t
206 The format specifier %u is used for:
A Integer B Unsigned short C Unsigned float D Unsigned long int
207 In C program, the number of columns that are printed are specified in:
A Format specifier B Field width specifier C Formatting integers D Both A & B
208 Escape sequence \\ is used to print:
A New line B Backslash C Space D Tab
209 Scanf function is used to input:
A Numeric value B String value C Both A & B D None of the above
210 The function getche() is defined in:
A stdio.h B string.h C math.h D conio.h
211 Getch( ) is a part of:
A Stdio B Conio C Math D All of above
212 A built-in function:
Cannot return a
A Cannot be redefined B Can be redefined C value D Should be redefined
213 Function prototypes for built-in functions are specified in:
A Source files B Header files C Object files D Image files
214 In a C program, two functions can have:
Same name and Same name but
A Same name B Same parameters C same parameter D different parameters
215 The escape sequence for carriage return is:
A \a B \c C \r D \f
216 The function that is used to display output on screen is called:
A Printf B Scanf C Pow D Display
217 How many variables can be used in one printf function?
A One B Two C Ten D Many
218 Format specifier starts with symbol:
A % B $ C # D @
219 Which escape sequence can be used to begin a new line in C?
A \ B \b C \m D \n
220 Which of the following is not a valid escape code?
A \t B \ C // D /
221 Which of the following format specifier is used for float data type?
A %e B %d C %f D %s
222 Printf() is a:
A Keyword B Built in function C Local function D User defined function
223 The format specifier % is used for:
A Integer B Unsigned short C Unsigned float D Unsigned long int
224 Which of the following format specifier is used for string?
A %f B %d C %c D %s

Page 11
Guess Paper Annual 2024 Computer Science 12
225 Which of the following things are determined by format specifier?
A Data type B Field width C Format of a value D All of these
226 The function used for input and output is stored in:
A Stdio.h B Conio.h C Math.h D Tan.h
227 Function which used to get input from the user:
A printf() B scanf() C clrscr() D puts()
228 The function getch() is defined in:
A Stdio.h B Conio.h C String.h D Math.h
229 The ASCII code for escape key:
A 27 B 28 C 29 D 30
230 Which programming structure executes program statements in order?
A Relation B Decision C Sequence D Repetition
231 Which programming structure makes a comparison?
A Relation B Decision C Sequence D Repetition
232 Another term for a computer making a decision is:
A Sequential B Selection C Repetition D Iteration
233 Another term for a computer making a decision is:
A Sequential B Selection C Repetition D Iteration
234 In if statement, true is represented by:
A 0 B 1 C 2 D 3
235 What is the simplest selection structure?
A If B Switch C If – else D Nested – if
236 Which of the following is used for making two way decisions?
A If B If – else C Nested if D Switch
237 Which keyword is not used in switch statement?
A Default B If C Case D Switch
238 Switch statement is an alternative of:
A If B If – else C Nested – if D Nested – if – else
239 The last statement of each case block in switch () structure must be:
A Default B If – else C Break D Else
240 The last statement of each case block in switch () structure must be:
A Default B If – else C Break D Else
241 The case block in switch () structure ends with:
A End select B Break C End case D Case else
242 Which of the following is called counter loop?
A Nested if – else B If – else C For loop D While loop
243 The conditional operator is used as alternative to:
A If B If – else C If – else if – else D Switch
244 Another term for a conditional operator is:
A Ternary B Binary C Byte D Iteration
245 Conditional operator takes:
A One operand B Two operands C Three operators D Four operands
246 Which operator is called a ternary operator?
A If B ++ C ? D ()

Page 12
Guess Paper Annual 2024 Computer Science 12
247 How many types of loop structures are present?
A 1 B 2 C 3 D 4
248 One execution of a loop is known as a (n):
A Test B Iteration C Duration D Integer
249 A loop that never ends is called:
A Infinite loop B Running loop C Nested loop D Continuous loop
250 One iteration of loop is known as:
A Iteration B Duration C Cycle D Repetition
251 While loop is also called:
A Conditional loop B Wend loop C Counter loop D None
252 ......... loop structure always executes at least once?
A Nested B FOR C While D Do While
253 Which of the following loop is available in C language?
A While-wend B For-next C Sequence D Do-while
254 Semicolon is placed at the end of condition in:
A Switch B For loop C While loop D Do-while loop
255 Semicolon is placed at the end of condition in:
A Switch B For loop C While loop D Do-while loop
256 The Do-while loop structure always ends with:
A Comma B Semi colon C Colon D Brace
257 ......... iterates at least once if condition is false.
A While loop B Do-while loop C For loop D All of these
258 What is the final value of x after executing the following code for (int x=0; x<,10; x++)?
A 8 B 9 C 10 D 11
259 If you want a user to enter exactly 20 values which loop would be the best to use?
A While B Do-while C Infinite D FOR
260 Which one is the loop structure?
A If B If-else C Switch D For
261 What is the final value of I after executing the following code for (int i=1; i<5; i+=2)?
A 7 B 5 C 6 D 9
262 A loop within a loop is called:
A Complex B Nested C Infinite D For
263 Which is a loop statement?
A If B If else C Switch D For
264 Printf() is a:
User-defined
A Built-in function B function C Local function D Keyword
265 A built-in function:
Cannot return a
A Cannot be redefined B Can be redefined C value D Should be redefined
266 Function prototypes for built-in functions are specified in:
A Source files B Header files C Object files D Image files
267 In a C program, two functions can have:
A Same name B Same parameters C Same name and D Same name but

Page 13
Guess Paper Annual 2024 Computer Science 12
same parameter different parameters
268 Which of the following looks for the prototypes of functions used in a program?
A Linker B Loader C Compiler D Parser
269 Which of the following is true about a function call?
Stops the execution Transfers control to Transfers control to Resumes the execution
A of the program B the called function C the main function D of the program
270 Memory is allocated to a local variable at the time of its:
A Declaration B Destruction C Definition D First reference
271 Global variables are created in:
A RAM B ROM C Hard Disk D Cache
272 May or may not be same
May or may not be May or may not be
A same B same C Must be different D Must be in lowercase
273 Formal arguments are also called:
A Actual arguments B Dummy arguments C Original arguments D Referenced arguments
274 Another name for built-in function is:
User-defined
A Library function B function C Arithmetic function D All of these
275 The first line of user-defined function is:
A Arguments B Header C Prototype D Calling
276 Multiple arguments to a function are separated by:
A Period B Colon C Commas D Semicolon
277 In C-Language, the first line of function definition is known as:
A Function header B Function body C Arguments D Parameters
278 A function that does not return any thing has return type:
A Nothing B Float C Void D Null
279 Function declaration is also known as function .........
A Definition B Header C Prototype D Parameters
280 Local variable are also called:
A Automatic variable B Static variable C Register variable D Run time variable
281 The scope of a variable refers to its:
A Length B Name C Accessibility D Data type
282 Memory allocated to a local variable at the time of its:
A Declaration B Destruction C Definition D First reference
283 A function can return ......... value.
A 1 B 2 C 3 D 4
284 A file is stored in:
A RAM B Hard Disk C ROM D Cache
285 Which of the following mode open only an existing file for both reading and writing:
A “w” B “w+” C “r+” D “a+”
286 On successfully closing a file, the f close() returns:
A NULL B 0(zero) C 1(one) D FILE pointer
287 An array subscript should be:
A Int B Float C double D An array

Page 14
Guess Paper Annual 2024 Computer Science 12
288 An array subscript should be:
A Int B Float C double D An array
289 An array subscript should be:
A Int B Float C double D An array
290 An array subscript should be:
A Int B Float C double D An array
291 An array subscript should be:
A Int B Float C double D An array
292 Which of the following functions is used to write a string to a file?
A Puts() B Pute() C Fputs() D Fgets()
293 The character conversion may occur in:
A Text stream B Binary stream C Input stream D Output stream
294 A sequence of characters from an input device to computer is called:
A Input stream B Text stream C Binary stream D Output stream
295 F open() function takes ......... parameters.
A 1 B 2 C 3 D 4
296 On successful closing a file, the f close() returns:
A Null B 0 (Zero) C 1 (One) D File pointer
297 Which mode opens only an existing file for both reading and writing?
A “w” B “w+” C “r+” D “a+”
298 Which of the following functions is used to read character from a file?
A getc() B putc() C fputs() D fgets()
299 Which of the following function is used to write string to a file?
A getc() B putc() C fputs() D fgets()
300 Which of the following character is used to mark the end of the string?
A \0 B /0 C \a D \n

OBJECTIVE

QUESTION NO. 2
Ch# 1,2,3,4,5,6,7
1. Differentiate between Data and Information.
2. Describe Data Capturing.
3. Describe Data Manipulation.
4. What is meant by Reproduction?
5. Define data inconsistency?
6. Define Data set.
7. List the file types from functional point of view.
8. Define program file with example.
9. What is meant by file organization?
Page 15
Guess Paper Annual 2024 Computer Science 12
288 An array subscript should be:
A Int B Float C double D An array
289 An array subscript should be:
A Int B Float C double D An array
290 An array subscript should be:
A Int B Float C double D An array
291 An array subscript should be:
A Int B Float C double D An array
292 Which of the following functions is used to write a string to a file?
A Puts() B Pute() C Fputs() D Fgets()
293 The character conversion may occur in:
A Text stream B Binary stream C Input stream D Output stream
294 A sequence of characters from an input device to computer is called:
A Input stream B Text stream C Binary stream D Output stream
295 F open() function takes ......... parameters.
A 1 B 2 C 3 D 4
296 On successful closing a file, the f close() returns:
A Null B 0 (Zero) C 1 (One) D File pointer
297 Which mode opens only an existing file for both reading and writing?
A “w” B “w+” C “r+” D “a+”
298 Which of the following functions is used to read character from a file?
A getc() B putc() C fputs() D fgets()
299 Which of the following function is used to write string to a file?
A getc() B putc() C fputs() D fgets()
300 Which of the following character is used to mark the end of the string?
A \0 B /0 C \a D \n

OBJECTIVE

QUESTION NO. 2
Ch# 1,2,3,4,5,6,7
1. Differentiate between Data and Information.
2. Describe Data Capturing.
3. Describe Data Manipulation.
4. What is meant by Reproduction?
5. Define data inconsistency?
6. Define Data set.
7. List the file types from functional point of view.
8. Define program file with example.
9. What is meant by file organization?
Page 15
Guess Paper Annual 2024 Computer Science 12
10. Differentiate between master file and transaction file.
11. Why is it important to specify data type and size of a field?
12. Define Database.
13. Define Data integration.
14. Define Data Integrity.
15. Define Data Consistency.
16. Enlist different types of Database Models.
17. Describe network model.
18. Write any two objectives of Data base management system.
19. What is data dictionary?
20. What is the use of Data Dictionary?
21. State the purpose/Use of Query Language.
22. What is the purpose of Backup and recovery?
23. Difference between DBMS and Database?
24. Define Field.
25. Define the term table of relation.
26. Enlist 4 different properties of a relation.
27. What are the properties of a relation?
28. Define an Entity.
29. Differentiate between parent table and child Table.
30. Distinguish between entity class and entity instance?
31. What is a view?
32. What down the basic purpose of using views.
33. Define Indexes.
34. Define composite key / concatenate key.
35. What is the use of foreign key?
36. Define foreign key attributes in database.
37. How a primary key is different than a candidate key?
38. What is the difference between primary key and foreign key?
39. Write three important characteristics of primary key?
40. Define candidate key also give an example.
41. Define End User.
42. Who is database administrator?
43. Write down the four responsibilities of database administrator.
44. Write the purose of feasibility study.
45. Define the term Analysis.
46. What is importance of project planning?
47. Which activities are involved in data analysis?
48. What is meant by data modeling?
49. Define Entity or Objects
50. What is an Entity in an ERD?
51. Define an attribute. Give an example.
52. What is the difference between Relation and Relationship?
53. Name any two types of relationship.
54. Define Cardinality.
55. Define the term cardinality of relation.
56. State the purpose of cardinality.
Page 16
Guess Paper Annual 2024 Computer Science 12
57. Define modality with the help of figure.
58. Differentiate between Cardinality and Modality.
59. Define E-R Diagram.
60. Write the Use of E-R Diagram.
61. What is meant by Entity Relationship Diagram(ERD)?
62. What is the primary objective of ER-diagram?
63. State the purpose of physical Database Design.
64. Differentiate between logical database design and physical database design.
65. What is meant by entity integrity?
66. How is Entity Integrity maintained?
67. What is meant by referential integrity?
68. Briefly explain Normalization.
69. What is homonym?
70. Define Mutual Exclusive of data.
71. How first normal form is achieved?
72. How second normal form is achieved?
73. What is partial dependency in Relation?
74. Write types of Anomalies.
75. What are Database Anomalies? Only list their names.
76. Define Insertion Anomaly.
77. What is meant by referential integrity?
78. What is a repeating group?
79. When does an insertion anomaly occur?
80. When is referential integrity used?
81. What is Microsoft ACCESS?
82. What is the use of MS-Access?
83. Define the term RDBMS.
84. List advantages of RDBMS.
85. What is sample database?
86. What is Database wizard?
87. Define the term redundancy.
88. What do you know about Microsoft Access?
89. How to open existing database?
90. Differentiate between Menu bar and Toolbar.
91. List any five buttons available on Access Database Window?
92. Enlist different database objects in MS-Access.
93. Write down two database objects in MS-Access.
94. What is the role of query in database?
95. How Query is written?
96. How is query designed in Access?
97. Define a Form.
98. Enlist two uses of Form.
99. Differentiate between Form and Report.
100. Differentiate between Query and Report.
101. Enlist MS-ACCESS database major objects.
102. Define the term degree of relation.
103. Difference between degree of relation and cardinality of relation.
Page 17
Guess Paper Annual 2024 Computer Science 12
104. Define Integrated Development Environment (IDE).
105. List some advantages of IDE.
106. List two disadvantages of integrated development environment.
107. Write any two characteristics of table.
108. How is MS-ACCESS loaded?
109. What is the use of datasheet view?
110. How a new record is added to a table using data sheet view?
111. What is OLE object in MS-Access?
112. List any four field properties.
113. What is the use of Input Mask?
114. What is the use of text data type?
115. Why are field properties used in MS-Access?
116. Write two differences between relationship and join.
117. Define term sorting.
118. Write down the use of filters in MS-Access.
119. How is query designed in Access?
120. State the use of wild cards?
121. Name different types of queries.
122. Define Parameters Queries?
123. Enlist different types of forms in MS-Access.
124. What do you know about columnar Form?
125. Discuss the use of design view in MS-Access.
126. What is the difference between tabular form and columnar form?
127. Differentiate between Combo box and List box.
128. Write the purpose of radio button.
129. State the purpose of radio buttons.
130. What is the concept of Sub Form?
131. Distinguish between form and sub-form.
132. Define report.
133. Write the use of Switchboard.

QUESTION NO. 3
Ch # 8,9,14
1. Define program.
2. What is a computer program?
3. Write two characteristics of C-language.
4. List out two advantages of characteristics of C.
5. Write the use of Turbo C++.
6. Write at least two differences between Source Code and Object Code.
7. How a source code is different than an object code?
8. What is the use of linker in C-language?
9. Distinguish between source code and object code.
10. Write shortcut key for compiling and running a C-Program.
11. Write shortcut key to run a C program.
12. How executable file (.exe) is created?
Page 18
Guess Paper Annual 2024 Computer Science 12
13. Describe linker and loader.
14. What is the purpose of linker?
15. What is meant by structured programming language?
16. How program logic is implemented in un-strucured programming languages?
17. State the purpose of defining Preprocessor directives.
18. Differentiate between Preprocessor directives and header file.
19. Explain constant Macro with example.
20. What is main () function used in C program?
21. What do you mean by Delimiters?
22. What are delimiters in C?
23. State the purpose of header file.
24. What is the purpose of include directives?
25. What are delimiters in C language?
26. Define the term Debug.
27. What is Syntax?
28. Write down any two causes of Syntax Error.
29. Define Runtime Errors.
30. Differentiate between Logical Errors and Syntax Errors.
31. Why the logical error is the most difficult error to find?
32. What are programming Languages?
33. What is Machine Language?
34. Why does machine language program executes faster than high language?
35. Why machine language does execute faster?
36. Define assembly language.
37. What is the difference between machine language and assembly language?
38. Give any four example of High Level Language.
39. List any four commonly used high level languages.
40. Distinguish between Low Level and High Level Languages.
41. Differentiate between Compiler and Interperter.
42. What is an identifier? Give an example.
43. Write the legal characters of an identifier.
44. Differentiate between Standard Identifier and User-defined identifiers.
45. What do you mean by Case Sensitive in C-language?
46. C is a Case Sensitive Language. What does it mean?
47. Why is C known as strongly typed language?
48. What do you know about C statement?
49. Define Keywords.
50. Why is it important to assign a data type to a variable?
51. How a variable is declared in C?
52. Differentiate between declaring and defining a variable.
53. What is variable initialization?
54. Write any two rules for naming Variables.
55. Differentiate between constant and variable.
56. Differentiate between function definition and declaration.
57. Differentiate between keyword and identifier.
58. How a variable is declared in C? Give an example.
59. Write two rules for naming variables.
Page 19
Guess Paper Annual 2024 Computer Science 12
60. Define Constant.
61. Define Character constant.
62. Differentiate between string constant and character constant.
63. Define string constant. Give two examples.
64. Define Data Type. Give example.
65. Identify the errors in the following lines: Integer A = 2 + 3; Float B = 5; int C = A + B;
66. What is the value of Y after the following code executes? float y - 3.4 + sqrt (25.0)
67. Find the Errors in the following code. #include <std10.h> void main (void) { int x, y, z z=x+y
+z}
68. Write C statement to print the value of unsigned long x.
69. Find out the errors from the following code. { char ch, ch2; ch1 = '2'; ch2 = '6'; }
70. Write a statement to declare an integer Variable Initialized to 10.
71. Write a single C-statement to initialize two integer variable x and y to 0?
72. Write a C-statement to initialize three integer variables named A, B and C and assign them the values
10, 20 and 30 respectively?
73. Write a C-statement which declare three floating point variable a, b and c in a single line ?
74. Determine the output of the following code? int b = 9; b = 9/2; printf(“%d” , b);
75. How many bytes are occupied by Long and Double Data Types?
76. List three problems while working with floating point numbers.
77. What is the use of AND logical operator?
78. What is the use of | | (OR) Operators?
79. What do you know by assignment operator.
80. What is the use of assignment statement?
81. Differentiate between increment and decrement operators.
82. What is a compound assignment operator?
83. Trace the output; int n = 6; n + +; printf ("%d, n")
84. Trace the output; int number = 6; x = - - number printf ("%d",x);
85. Predict the output of the following code: int number = 6; + + number; printf ("%d \n", number);
86. Trace the output in the following code: int x = 10 y = 15; x = x + +; y = + + y; printf ("%d %d", x,y);
87. Define the concept operators precedence.
88. Differentiate between Unary and binary operator.
89. What is compound condition? Give an example?
90. What is the purpose of Module Operator?
91. What are logical operator? Name any two.
92. Write down the names of logical operators available in C-language.
93. What is an Expression?
94. What is Arithemetic Expression?
95. Describe the purpose of file handling.
96. Define stream.
97. Define the stream in C Language.
98. What do you mean by text stream?
99. Compare binary and text stream.
100. How is a file opened in C?
101. Define EOF marker in file.
102. Why is it important to close a file?
103. Which function has been used to close a file in C language?
104. What is String?
Page 20
Guess Paper Annual 2024 Computer Science 12
105. How string value is displayed in C-language?

QUESTION NO. 3
Ch # 10,11,12
1. List some important functions for output.
2. What is the use of printf() function?
3. Write the syntax of printf() statement.
4. Find the output of the following code segment. int x = 10; int y = 5; int z = x + y; printf ("%d %d %d", x,
y, z);
5. Trace the Errors. int b = 8; int c = 0 c = number print f ("%f", x)
6. Find Errors. main[ ]; ( float n; print f ("%d";n); }
7. Find errorr. { float area, r; printf ("Enter radius"); }
8. Trace the errors: #include <stdio.h> void main () { printf ("High Level Language") }
9. Find the output of the following code. #include <stdio.h> void main () { int x = 10, y = 20, z =
30; x = x + y' y = y + z; z = x - y; printf ("result = %d%d%d", x,y,z);
10. Write the Output of the following code: main() { printf("444\n"); printf("44"); }
11. Trace the error. #include <stdio.h> Void main (void) printf("Hellow world");
12. Find Errors in the following code. void main ( ) { int num = 10 num + =; printf("\n
%d", num); }
13. Find the errors in the following code. void main( ); { int A = 10; printf("d%d , a); }
14. Discuss the purpose of % C format Specifier.
15. What is the use of Format specifier?
16. Define the format specifier used in printf () and scanf () functions.
17. Trace the errors in the following code. #include <stdio.h> void main (void) { int x = 4 y=x
+ 10 printf("%d", x + y); }
18. Trace the output. void main (){ int a, b, temp; a = 10; b = 20; tem = b; b = a; a = temp; printf ("%d\n" ,
a); printf ("%d\n" , b); getch ();}
19. Trace the output. #include <stdio.h> void main (void) { int x = 1; int y = 2; x = x + 1;
y = y + x; printf("%d \n %d", x, y); }
20. Fint the output of the following code. int a = 10, b = 12; int sum = a + b; printf ("%d", sum);
21. Trace output: void main() { int a, b; a = 10; b = 12; int c = a + b;
printf ("c = %3d", - - c); }
22. Write the output of the following code. int x = 3; printf("%d" , x); printf("%d", x + +); printf("%d" , +
+x);
23. Predict the output of the following. float f = 3.14159 print f =("f = %4.2f", f);
24. Find the error. void main () { int a = 10; printf ("%s", b); }
25. Trace the output of the following. x = 5; y = x ++; printf("%d %d", x, y);
26. y; printf("result = %d%d%d\n", x, y,z); getch();}
27. Trace error. int x = 5; int y y = x + 3 printf("%d",y); printf ("666"); }
28. What will be the output of the following code? int x = 15; int y = 5; printf (“%d and %d” , x% y, x / y);
29. Write the use of field width specifiers in C-Language.
30. Define standard input.
31. Why & operator used in scanf() function?
32. What is the use of "scan f" function? Also write its syntax.
33. Write the output of the following code. int x, y, z, r; printf("Enter three number;"); scanf("%d %d %d"
,&x, &y, &z); r = x + y * z; printf ("%d" ,r);
Page 21
Guess Paper Annual 2024 Computer Science 12
34. Trace out errors in the following code. float r; clrscr (); printf ("enter radius); scanf ("%f"; r);
35. Trace the error in the following code. #include<stdio.h> void mani () { scanf ("%d", i); printf("%d, i); }
36. What is the use of getch function?
37. Differentiate between getch() and getche().
38. Name any two control structrs.
39. Describe sequence structure.
40. What do you mean by selection?
41. How are instructions executed in repetition structure?
42. Define compound statement.
43. Convert the following conditional expression into if-else statement? x < y ? y = 10 : z = 20
44. Convert the following conditional expression into if-else statement? (x > y)? x * y : x + y;
45. Find out errors: #include<Stdio> void main() [ if(50 > 20) then printf("Islamic Country"); getch() ]
46. Find error. int price = 10 if(price! = 10) price=0
47. Find Errors. #include (Stdio.n); #include <conio.c> void main() { if(16 > 10) then printf("%C",
"Pakistan"); getch(); } }
48. Find error from the following: int y;z; if(y = = z) printf("yes")
49. Trace the error in the following code. void main (void); { int a,b; a = -10 b = 40 if(a < 0); b = SQRT(a);
printf("result = %f", b); getch(); } }
50. Trace out errors in the following code. void main() { int R; r = 17; if(R>0) { R=R*3.14*3.14; };
printf("the value of R is = %f", R); getch(); }
51. Trace the output of the following code. int a = 4, b = 2, c = 5; if(a > b) a = 5; if(c = = a) a = 6;
printf("%d", a);
52. What is the error in the following code? Int x = 10, y = 20; if(x > 10 & y < 30) printf("%d", x+y);
53. What is the use of if-else statement?
54. Trace error. void main() { void main() int a = 2; if (a = = 1) printf("ok"); else printf("cancel");
getch(); }
55. Find output of the following code. int a = 1, b = 6; if(a + b < 7); { printf("%d",a); } else { printf("%d",b);
}
56. else printf("Bye") }
57. Find output. int p = 3, q = 5; if((p > q) || (q! = 4)) p = p + 1; else p = p * 2; printf("p = %d", p);
58. Predict the output for the following code. int a,b,c; a = 10; b = 3; if(a%b = = 1) c = 0; else c = 1;
printf("%d",c)
59. Find errors. void main() { Int a;b; a = 10, b = 5 if(a = < b) printf('A is less than B'); getch(); }
60. Trace the output. void main() { int p,q,r; p = 10; q = 3; r = 2; if ((p+q) < 14 && (r < q -3)) printf("%d",r);
else printf("%d",p); getch(); } }
61. Trace the error. void main() { int a,b a = -10 b = 40 if(a < 0); b=sqrt(a); printf("Result= %f", b);
getch();} }
62. Trace the errors in the following codes. void main() int x,y = 5; if (x>y); printf("x is largest"); else
printf("y is largest"); getch();
63. Trace the output. int a = 5, b = 10; if a > b; printf("Low Triangle"); else printf("Huge Triangle");
64. Trace the errors from following code segments. void main(); {int x = 10; int y = 15; if(x=y) printf("x is
equal"); else printf("x is not equal") }
65. Write use of if,else if statements.
66. Trace error of the given code: void main() { far(int n = 1 ; n < = 5, n ++) printf(“%d”,n) }
67. Write down errors in following code: intx,y; x=15 y=10 if(x/y=0); printf(“ok”)
68. Write output of the following code: int a = 1 , b = 6; iF(a + b < 7) printf(“%d”, a); else printf(“%d”,b);
Page 22
Guess Paper Annual 2024 Computer Science 12
69. What is the output of the following code? int a, b, c; a = 10; b = 3; if ( a % b = = 1) c = 0; else c = 1;
printf (“%d” , c);
70. Trace output of following code: int p, q, r; p = 10 ; q = 3 ; if ( p % q = = 3) r = 0; else r = 1; print f ( “
%d” , r ) ;
71. Determine the output of the given code: int a = 1; int b =6; if( a = b < 7) printf(“%d” , a ); else
printf(“%d”,b);
72. What will be the output of the given code? Int a, b, c; a=10; b=3; if(a%b==1) c=0; else c=1;
printf(“%d”,c);
73. Predict the output of the following code segment. int a = 1 , b = 2, c=3; if ((a = = b )\\ (b = =) \\(c =
=4)) printf(“Yes”); else printf(“No);
74. Determine the output of following code: for ( i = 1 ; i< = 15 ; I + +) if ( i % 2 = = 0 ) print f (“%d”, i);
75. Find the error in the following code: code segment: int a, b; a = --10; if (a < 0); b= a*a; print f (“Result
= % f” ,b )
76. Find error: if(x = 1 or 2) printf(“%d”, m); If(x==1||x==2)
77. Trace output: int x = 5 , y = 10; if (x > y) y=y + 1; printf(“Value of y=%d”, y);
78. Why default keyword is used is switch statements?
79. Write two rules of using Switch case in C program.
80. What is the use of Switch Statement?
81. Why break statement is used in switch statement?
82. Printf("A"); case 'b': Print("B") }
83. What is conditional operator? Write its syntax.
84. Write the syntax of Conditional Operator (ternary operator).
85. Distinguish between break and continue statements used in loop?
86. Write the purpose of Continue Statement?
87. Define while loop.
88. Make a flowchart of while loop.
89. What is the output of the following code? { int n = 1; while(n <= 5); { printf("Islam Zindabad"); n=n+1;
} getch(); }
90. Trace the output. int a = 1; while(a <= 6) { printf("\n a = %d", a); a += 1; }
91. Convert following loop code into while loop code. for(i = 10; i>0; i--) { printf("i = %d",i); }
92. Write the output of the following program fragments. n = 0; while(n <= 4) { printf("%3d %3d \n", n,
10-n); n++; }
93. Convert the following loop code into Do-while loop code. int n = 1; while (n <= 10) { printf("*\n");
n++; }
94. What is Counter Controlled Loop?
95. Write output of the following code: int n =10 while (n > = 1) { printf(“Value = % d\ n “ , n ) ; }
96. Determine the output of the following code segment: int j = 5; While (j < =15) { Printf(“Pakistan”\n”)
j=j + 2; }
97. Find the errors in the following code segment: a=10; Avg = 0; While (a <= 10); Avg + = a
98. Determine the output of the following code: int x = 1; int y = 10; while (x < = 5 \\ y > =1){ printf(“%d--
%d”, x,y); x = x + 1; y = y-1 }
99. Trace out the errors from the following code: int k = 1 while (k < =5); { k = k + 1 printf(“%C” k) }
100. Determine the output of the following code: inti ; i = 10 ; while ( I> = 10 ) { prinf f ( “%d”
101. Predict the output of the following code segment: int x =3; while (x < =12) { print(“ x is %d\n”, x); x=
x+2; }
102. Find the error from the following code segment: int x = 1; while(x < = 6); { printf(“%d” x); x++ }
Page 23
Guess Paper Annual 2024 Computer Science 12
103. Predict the output of the following code segment: int a =2; while ( a< =7) { printf(\n a = %d”, a ); a + +
}
104. Rewrite the following code using do-while loop. void mian() { int x = 10; do { printf("%d \n", x%2);
x = x -1; } while(n >= 1); }
105. Write output. int x = 5, y = 3; do { x = x*2; y = y+2; } while(y < 7); printf("%d",x);
106. Define infinite loop?
107. Why is sentinel value used in loops?
108. Define for loop.
109. Find output of the following code. #include <stdio.h> void main { int i, p=1; for(i=1; i<6; i+=1) p*2;
printf("p is = %d",p); }
110. What is the final value of x after executing the following code? for(int x = 0; x < 10, x++)
111. Predict the output from the following code. int n; cirscr (); for(n = 5; n >= 1; n--) printf("%d\n",n);
getch();
112. Trace the output. int i, j = 10; for(i = 1; i <= 5; i++) { Prinft("\n Pakistan"); }
113. Define Compound Statement?
114. What is sentinel controlled loop?
115. Define goto statement.

LONG QUESTIONS
Section-II
(MS ACCESS!
Note : Attempt any ONE question.
1. What is File? Explain File types from storage point of view.
2. How would you define a table? Also write characteristics of tables.
3. Write down four major components of database system in detail.
4. What is Query? Discuss different types of queries.
5. Define ER Diagram. Explain it with the help of an example.
6. Write any four advantages of DBMS.
7. Discuss different methods of modifying a table in MS-Access.
8. Briefly explain the database design process with the help of diagram .
9. What is a form? Explain its uses and advantages.

Section-III
Note : Attempt any TWO descriptive answers ( either from “ C-Language” or from
“ Visual Basic” ) of the following questions.
( C- Language )
1. What is meant by programming language? Discuss different types of programming languages.
Page 24

You might also like