Coaching & Educational Academy (Chiniot) : Objective Type

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

Bismillah Pak Forces

Coaching & Educational


‫ش‬ ‫ ت‬Academy (Chiniot) ‫ٹ‬
‫ے کم از کم ی ن ب ار درود ریف پڑھ لی ں‬‫ہ‬
‫سٹ سے پ ل‬ ‫ی‬
Student Name: Roll No: Date: / /
‫ش‬ ‫خ‬
‫معا رہ ب دلی ں‬،‫سوچ ب دلی ں‬ Class: 2nd Year Ch#1 ‫ وش رہ ی ں‬،‫ثم ب ت سوچ ی ں‬
T- Marks - 40 Subject: Computer Time: 45 - M Obtained -Marks:
Objective Type
Q# Encircle the Correct Option 10X1=10
1

1. A collection of related fields is called:


a Character b Record c Database d File
2. All records in a file have the same:
a Content it b Structure c Order d Key
3. A collection of data that consists of name , address and email of a person is called:
a Byte b Record c Character d Field
4. A record in a database is the information refers to:
a Person b Product c Event d All
5. Each item of information within a record is called:
a File b Field c Both a and b d Byte
6. A logical grouping of characters is a:
a Field b Record c File d All
7. A field is to a recorded as:
a Data are to files b A column is to a row c Files are to tables d Attributes are to
columns
8. A database containing all students in a class would store database of a student in:
a Record b Field c Cell d File
9. A database containing all students in a class would store Roll No of a student in:
a Record b Field c Cell d File
10. A database containing all students in a class would store the information of individual students in:
a Record b Field c Cell d File

Q#2 Short Questions 10 × 2 = 20


1. What is database?2. Define information.
3. Define file? 4. How many types of file?
5. What is network model? 6. Write advantage of database management.
7. Write some features of a DBMS. 8. How do we organized the file on storage media?
9. Describe the different database models. 10. Define data.

Q#3 Long Questions 2x5 =10


1. Advantages of database.
2. Write the disadvantages of database.
Student Name: Roll No: Date: / /
‫ش‬ ‫خ‬
‫معا رہ ب دلی ں‬،‫سوچ ب دلی ں‬ Class: 2nd Year Ch#2 ‫ وش رہ ی ں‬،‫ثم ب ت سوچ ی ں‬
T- Marks - 40 Subject: Computer Time: 45 - M Obtained -Marks:
Objective Type
Q# Encircle the Correct Option 10X1=10
1

Mail ID: [email protected]


Bismillah Pak Forces
Coaching & Educational
‫ش‬ ‫ ت‬Academy (Chiniot) ‫ٹ‬
‫ے کم از کم ی ن ب ار درود ریف پڑھ لی ں‬‫ہ‬
‫سٹ سے پ ل‬ ‫ی‬
1. Insert command is used to insert:
a New table b New record c View d Dependencies
2. The row of a relation can be of _____ order.
a Any b Same c Sorted d Constant
3. The column of a relation can be of _____ order.
a Any b Same c Sorted d Constant
4. All the intersection of rows and columns must have:
a Single value b Constant value c Multiple values d No value
5. Views are also called:
a Complex tables b Simple tables c Virtual tables d Actual tables
6. The SQL statement to create a view is:
a CREATE VIEW b MAKE VIEW c SELECT VIEW d INSERT VIEW
7. The views are used:
a To hide columns b To hide rows c
To hide complex d All of the above
SQL statements
8. A virtual table that is constructed from other tables is called :
a Table b View c Relation d Tuple
9. The number of characters in fixed length field is is:
a Constant b Variable c 10 d 100
10. The number of characters in variable length field is:
a Constant b Variable c 10 d 100

Q#2 Short Questions 10 × 2 = 20


1.Data handling in file management system? 2. Define attributes row?
3. How create a table? 4. Write the names of properties of relation.
5. How many type of key? 6. Define data administrator.
7. Discuss the data manipulation in DBMS system.
8. What is a view. How do we create it?
9. How the record and file are constructed in traditional file management system.
10. How the table/relation are formed in DBMS.

Q#3 Long Questions 2x5= 10


1. Explain the keys.
2. Write the properties of relation.
Student Name: Roll No: Date: / /
‫ش‬ ‫خ‬
‫معا رہ ب دلی ں‬،‫سوچ ب دلی ں‬ Class: 2nd Year Ch#3 ‫ وش رہ ی ں‬،‫ثم ب ت سوچ ی ں‬
T- Marks - 40 Subject: Computer Time: 45 - M Obtained -Marks:
Objective Type
Q# Encircle the Correct Option 10X1=10
1

1. Customers, cars and parts are examples of:


a Entities b Attributes c Cardinals d Relationships
2. In an E-R diagram, a rectangle represent:
a Entity b Attribute c Relationship d None
3. Which of the following is NOT included in the definition of an entity?
a Person b Object c Concept d Action
Mail ID: [email protected]
Bismillah Pak Forces
Coaching & Educational
‫ش‬ ‫ ت‬Academy (Chiniot) ‫ٹ‬
‫ے کم از کم ی ن ب ار درود ریف پڑھ لی ں‬‫ہ‬
‫سٹ سے پ ل‬ ‫ی‬
4. A person's name, birthday and social security number are examples of:
a Attributes b Entities c Relationship d Descriptors
5. A technique for physical arranging the record of a file on secondary storage device is called:
a Physical pointer b Retrieval program c File organisation d Update program
6. Afactor to consider when choosing a file organization is:
a Fast retrieval b Security c Efficient storage d All
7. Which of the following are ingredients of data modeling?
a Entities b Attributes c Relationship d All
8. The relationship can be:
a One-to-one b One-to-Many c Many-to-many d All
9. The advantage of partitioning is:
a Efficiency b Extra space c Reliability d Accuracy
10. A disadvantage of partitioning is:
a Complexity b Extra space and update c Inconsistent access d All
time speed

Q#2 Short Questions 10 × 2 = 20


1.Define data modeling. 2. Define database design?
3. What is physical database design. 4. What is index?
5. What is implementation? 6. ERD is a physical data model.
7. One to many is a uni-directional relationship. 8.The optional modality is represented.
9. In ERD model, our condition is mentioned in a diamond symbol?
10. Relationship defines the logical connection between entities.

Q#3 Long Questions 2x5= 10


1. Write the components of physical database design.
2. Write the conceptual (logical) database design.
Student Name: Roll No: Date: / /
‫ش‬ ‫خ‬
‫معا رہ ب دلی ں‬،‫سوچ ب دلی ں‬ Class: 2nd Year Ch#4 ‫ وش رہ ی ں‬،‫ثم ب ت سوچ ی ں‬
T- Marks - 40 Subject: Computer Time: 45 - M Obtained -Marks:
Objective Type
Q# Encircle the Correct Option 10X1=10
1

1. A rule that states that each foreign key value must match a primary key value in the other relation is called:
a Referential integrity b Key match rule c Entity key group d Foreign/primary
constraint rule match rule
2. Two or more attributes with different names but same meanings create a problem:
a Homonyms b Aliases c Synonyms d Alternate attributes
3. A constraint between two attributes is called:
a Functional relation b Attribute dependency c Functional d Functional relation
dependency constraint
4. The attribute on the left side of the arrow in a functional dependency is called:
a Candidate key b Determinant c Foreign key d Primary key
5. The goal of normalization is to:
a Get stable data b Increase number of c Increase d Remove constraints
structure relation redundancy
Mail ID: [email protected]
Bismillah Pak Forces
Coaching & Educational
‫ش‬ ‫ ت‬Academy (Chiniot) ‫ٹ‬
‫ے کم از کم ی ن ب ار درود ریف پڑھ لی ں‬‫ہ‬
‫سٹ سے پ ل‬ ‫ی‬
6. A relation is in 2NF if it is in 1 NF and all its non key attributes are:
a Dependent on part of b Dependent on the entire c Independent of the d Independent of any
the primary key primary key primary key other relation
7. Which form of dependency is removed in 2NF?
a Functional b Transitive c Associative d Partial
8. Which of the following are anomalies that can be caused by redundancy in tables?
a Insertion b Deletion c Modification d All
9. A functional dependency between two or more non key attributes is called:
a Partial functional b Partial non-key c Transitive d None
dependency dependency dependency
10. Which of the following anomalies result from a transitive dependency?
a Insertion b Modification c Deletion d All

Q#2 Short Questions 10 × 2 = 20


1. Define Data integrity.2. Define normalization. 3. What
is a transitive dependency? 4. What do we do to attain entity integrity? 5.Define
referential integrity? 6. Define the following terms: synonym and homonym. 7.What
are the database anomalies? 8. Define functional dependency.9. Define transitive
dependency. 10. Define redundancy.

Q#3 Long Questions 1x10= 10


Q1.Convert the ER diagram you have designin the previous exercise for the admission
system of your college to relational database. Also normalize the relation upto 3rd normal
form.
Student Name: Roll No: Date: / /
‫ش‬ ‫خ‬
‫معا رہ ب دلی ں‬،‫سوچ ب دلی ں‬ Class: 2nd Year Ch#5 ‫ وش رہ ی ں‬،‫ثم ب ت سوچ ی ں‬
T- Marks - 40 Subject: Computer Time: 45 - M Obtained -Marks:
Objective Type
Q# Encircle the Correct Option 10X1=10
1

1. A database consists of various component called:


a Tools b Properties c Entities d Objects
2. Which of the following database object is used to to retrieve data from Database?
a Queries b Forms c Reports d Tables
3. The output of the query is in the form of a:
a Table b Form c Report d Query
4. Which object is used to retrieve data from database and present in formatted way?
a Report b Form c Table d Query
5. Microsoft Access save the database with the extension:
a mdb b msdb c madb d Mxis
6. A report is a complete set of ____ field:
a Distinct b Related c Designed d All
7. MS Access table contain:
a Fields b Records c Characters d All
8. Which option in MS Access is used to create a new database from scratch?
a Access template b Blank database c Existing database d New folder
Mail ID: [email protected]
Bismillah Pak Forces
Coaching & Educational
‫ش‬ ‫ ت‬Academy (Chiniot) ‫ٹ‬
‫ے کم از کم ی ن ب ار درود ریف پڑھ لی ں‬‫ہ‬
‫سٹ سے پ ل‬ ‫ی‬
9. What is displayed in title bar of an open database?
a Program name b Database name c Object type d All of these
10. Which of the following is not a database object?
a Table b Query c Report d MS word

Q#2 Short Questions 10 × 2 = 20


1. Database window. 2. Write a database objects. 3. Define a table. 4.Differentiate
between form and report. 5.What is an IDE?6.What is meant by RDBMS? 7. Define
the use of toolbar in MS Access? 8. .Define the use of status bar and title bar in MS
Access.9. Write a procedive to open an existing database file.10. How is Microsoft Access
started or loaded?

Q#3 Long Questions 2x5=10


1. write the short note on database window.
2. Write the MS Access application window.

Student Name: Roll No: Date: / /


‫ش‬ ‫خ‬
‫معا رہ ب دلی ں‬،‫سوچ ب دلی ں‬ Class: 2nd Year Ch#6 ‫ وش رہ ی ں‬،‫ثم ب ت سوچ ی ں‬
T- Marks - 40 Subject: Computer Time: 45 - M Obtained -Marks:
Objective Type
Q# Encircle the Correct Option 10X1=10
1

1. The data in tables is entered in:


a Design view b Normal view c Data sheet view d Layout view
2. How many types of relationship can be used?
a 2 b 3 c 4 d 5
3. In an relational database, a single piece of information is called:
a Table b Record c Entity d Attribute
4. Which rule states that a record from a table cannot be deleted if its associated record exists in related tables?
a Referential integrity b Entity relationship c Normalization d All
5. How many tables views are available in Microsoft Access?
a 4 b 3 c 2 d 1
6. Which criteria can be used to find four-character name that starts with H?
a H*4 b H?4 c H??? d H####
7. Which button of find and replace dialog box is clicked to start the search process?
a Find b Find next c Search d Next
8. Which key is used to move from field to field in table window of data sheet view?
a Tab b Esc c Enter d Spacebar
9. Which of the following view in MS Access is used to define the structure of table?
a Data sheet b QBE c Relationship d Design
10. Which of the following is not displayed in design view?
a The data type of each b The contents of each c The properties of d The field names
field field the selected field

Mail ID: [email protected]


Bismillah Pak Forces
Coaching & Educational
‫ش‬ ‫ ت‬Academy (Chiniot) ‫ٹ‬
‫ے کم از کم ی ن ب ار درود ریف پڑھ لی ں‬‫ہ‬
‫سٹ سے پ ل‬ ‫ی‬
Q#2 Short Questions 10 × 2 = 20
1. What is memo? 2. What are relationship?3. How are relation defined in MS Access?
4. Define primary key.5. WhatWhat are wildcards? 6. Define the various type of queries.
7. How can you create a query in design view? 8. What is referential integrity?9.
Differentiate between relationship and join. 10. Discuss the advantage of query.

Q#3 Long Questions 1x10=10


Q1: Explain the types of queries?

Student Name: Roll No: Date: / /


‫ش‬ nd
‫خ‬
‫معا رہ ب دلی ں‬،‫سوچ ب دلی ں‬ Class: 2 Year Ch#7 ‫ وش رہ ی ں‬،‫ثم ب ت سوچ ی ں‬
T- Marks - 40 Subject: Computer Time: 45 - M Obtained -Marks:
Objective Type
Q# Encircle the Correct Option 10X1=10
1

1. Forms are designed to:


a Input data b Manipulate data c Accept change d All
2. A form that contains a subform is called:
a Form b Main form c Report d None
3. You can drag ______ Bar to move property sheet window around screen:
a Title bar b Status bar c Scroll bar d All
4. How many are basic layout of forms in Microsoft Access?
a 2 b 3 c 4 d 5
5. The forms are ______end of our database in Microsoft Access:
a Back b Front c Both a and b d None
6. Which auto form display one record at a time?
a Tabular b Columnar c Data Sheet d Justified
7. A report that provides a column for each field of the record in rows under the column headers is known as:
a Tabular report b Columnar report c Data sheet report d Justified report
8. Which of the following can be previewed on the screen before printing?
a Report b Form c Sub form d None
9. Which of the following is used to retrieve data from database and represent it to the user in a formatted way?
a Report b Form c Query d Table
10. How meni are layout of report?
a 2 b 3 c 4 d 5

Q#2 Short Questions 10 × 2 = 20


1. Define the different layouts of forms. 2. Differentiate between form and reports.
3. How is a form created by using form visit? 4. What is report?
5. How can create report from a single table? 6. How can report create for two table?
7. What is subform? 8. Define to create a report using the report wizard.9. How is a a
foam create by using the form visit.10. How can you save and close an auto report?

Mail ID: [email protected]


Bismillah Pak Forces
Coaching & Educational
‫ش‬ ‫ ت‬Academy (Chiniot) ‫ٹ‬
‫ے کم از کم ی ن ب ار درود ریف پڑھ لی ں‬‫ہ‬
‫سٹ سے پ ل‬ ‫ی‬
Q#3 Long Questions 2x5=10
1. Creating a switch board in Access.
2. Short note on check boxes and radio buttons.

Student Name: Roll No: Date: / /


‫ش‬ nd
‫خ‬
‫معا رہ ب دلی ں‬،‫سوچ ب دلی ں‬ Class: 2 Year Ch#8 ‫ وش رہ ی ں‬،‫ثم ب ت سوچ ی ں‬
T- Marks - 40 Subject: Computer Time: 45 - M Obtained -Marks:
Objective Type
Q# Encircle the Correct Option 10X1=10
1

1. A well-defined set of instructions given to the computer is called:-


a Hardware b Software c Bug d None
2. Computer programs are also known as:
a Hardware b Software c Firmware d None
3. C was developed in the year year:
a 1970 b 1972 c 1976 d 1995
4. E was developed in the year:
a 1969-70 b 1965-1975 c 1972-1988 d 1992-1996
5. Who developed C ?
a Von-Neumann b Al-khwarizmi c Charles Babbage d Dennis Ritchie
6. C was designed to write program for:
a Windows operating b Solaris operating c Unix operating d OS/2 operating system
system system system
7. C is a:
a High level language b Low level language c Assembly language d Machine language
8. Which of the following language provide the basis for the development of C?
a C++ b B c JAVA d Pascal
9. Turbo C++ compile:
a C program only b C and C++ programs c Turbo C program d Turbo C++ program
only only
10. An IDE typically consist of:
a Text editor b Compiler c Debugger d All

Q#2 Short Questions 10 × 2 = 20


1. Write short history of C? 2. Define santox errors. 3. Define runtime errors.
4. Define logical errors. 5.Define a bug. 6.Discuss some debugging features of turbo C++.
7. What is a programming language? 8.Discuss the two main categories of programming
language. 9. Describe characteristics of high level programming
language. 10.Define linker and loader

Q#3 Long Questions 2x5= 10


1. Write basic structure of C programe.

Mail ID: [email protected]


Bismillah Pak Forces
Coaching & Educational
‫ش‬ ‫ ت‬Academy (Chiniot) ‫ٹ‬
‫ے کم از کم ی ن ب ار درود ریف پڑھ لی ں‬‫ہ‬
‫سٹ سے پ ل‬ ‫ی‬
2. Write the error syntax, logical, runtime.

Student Name: Roll No: Date: / /


‫ش‬ nd
‫خ‬
‫معا رہ ب دلی ں‬،‫سوچ ب دلی ں‬ Class: 2 Year Ch#9 ‫ وش رہ ی ں‬،‫ثم ب ت سوچ ی ں‬
T- Marks - 40 Subject: Computer Time: 45 - M Obtained -Marks:
Objective Type
Q# Encircle the Correct Option 10X1=10
1

1. Which is true about a variable?


a The name and data b The name can change c The name cannot d The name and data
value can both change but data value cannot change but data value cannot change
value can
2. Which is not a rule for naming variables:
a Use a descriptive b Start name of a variable c Use nothing but d All of the above
name for the variable with a letter letters, digits or
underscore
characters
3. Variable and constant name cannot contain a(n):
a Number b Underscore c Letter d Period
4. Variables names cannot begin with a/an:
a Number b Underscore c Uppercase letter d Lowercase letter
5. Which of the following is not a valid identifier?
a Return b Mylnt c MyInteger d Total 3
6. Which of the following are valid variable names?
a Long b Integer c No long enough d Both b and C
7. Which term describes the kind of values that a variable can store?
a Variable name b Data type c Variable type d Variable size
8. Which statement is true about data type?
a Data type has no b Each data type has c Which data type has d None of the above.
memory requirement different memory the same memory
requirement requirement
9. Which data type is used to store numeric value with no decimal point?
a Int b Char c Float d All
10. Which is a numeric data type?
a Float b Int c Both a and b d Char

Q#2 Short Questions 10 × 2 = 20


1. Define identifiers. 2. Define standard identifiers. 3. Define user defined identifiers.
4. Write short note on keyboard. 5. Define variables. 6. Define a numeric constants.
7. Write relational operators with symbol expression. 9. Define expression.
8. Differentiate between increment and decrement operators. 10. Define comments.

Q#3 Long Questions 2x5= 10

Mail ID: [email protected]


Bismillah Pak Forces
Coaching & Educational
‫ش‬ ‫ ت‬Academy (Chiniot) ‫ٹ‬
‫ے کم از کم ی ن ب ار درود ریف پڑھ لی ں‬‫ہ‬
‫سٹ سے پ ل‬ ‫ی‬
1. How many type of operators are available in C? Describe bretly.
Also mention their precedence.
2. Assume that you have the following variable declaration:
Int: a,b,c,d,p float:v,w,x,y,z
Student Name: Roll No: Date: / /
‫ش‬ ‫خ‬
‫معا رہ ب دلی ں‬،‫سوچ ب دلی ں‬ Class: 2nd Year Ch#10 ‫ وش رہ ی ں‬،‫ثم ب ت سوچ ی ں‬
T- Marks - 40 Subject: Computer Time: 45 - M Obtained -Marks:
Objective Type
Q# Encircle the Correct Option 10X1=10
1

1. Which of the following things are determined by format specifier?


a Data type b Field width c Format of the value d All of these
2. Format specifier is started with symbol:
a ? b % c & d *
3. Which of the following format specifiers is used for integers data type?
a %d b %s c %c d %f
4. Which of the following format specifier is used for characters data type?
a %s b %c c %d d %f
5. Which of the following format specifier is used for float data type?
a %s b %f c %c d %d
6. Which of the following format specifier used for string?
a %f b %d c %c d %s
7. Which of the following is a possible value of flag?
a - b + c Space d All
8. Which of the following is not legal element of control string in printf statement?
a Ordinary characters b Escape sequence c Format specifier d Variables
9. The format specifier for output are:
a %d for int and %f for b %c for chat c %s for string d All
float.
10. The general form of format specifier for floating point value:
a % m.nf b m.n% c m%nf d m.n%f

Q#2 Short Questions 10 × 2 = 20


1. Write a program in example and using function. 2. Define the term escape sequence.
3. List name and uses any five of escape sequence.
4. What do we meant by standard input & output illustrate use of printf() & scanf() function.
5. Write the program that display the ASCII code of the character typed by the user.
6. Define scanf function. 7. Write the formatting integers. 8. Write the printf function.
9. write a program that adds two floating point numbers and show their sum on the screen.
10. Define field width specifier.

Q#3 Long Questions 1x10= 10


Q1. Write a program to convert the distance in kilometre into metres.
Student Name: Roll No: Date: / /
‫ش‬ ‫خ‬
‫معا رہ ب دلی ں‬،‫سوچ ب دلی ں‬ Class: 2nd Year Ch#11 ‫ وش رہ ی ں‬،‫ثم ب ت سوچ ی ں‬

Mail ID: [email protected]


Bismillah Pak Forces
Coaching & Educational
‫ش‬ ‫ ت‬Academy (Chiniot) ‫ٹ‬
‫ے کم از کم ی ن ب ار درود ریف پڑھ لی ں‬‫ہ‬
‫سٹ سے پ ل‬ ‫ی‬
T- Subject: Computer Time: 45 - M Obtained -Marks:
Marks - 40
Objective Type
Q# Encircle the Correct Option 10X1=10
1

1. The operators to compare operands and decide if the relation is true or false are:
a Arithmetic operators b Logical operators c Syntax operator d Relational operator
2. When a relational expression is false it has the value _____:
a 0 b 1 c <0 d 5
3. Which of the following statement is the simplest form of a decision structure?
a Select…case b If statement c Try…catch…finally d Nested if
4. ______ is used to specify two different choices with “if” statement :
a Switch b Else c If d If else
5. In if statement false is represented by:
a 0 b 1 c 2 d 3
6. In if statement true is represented by:
a 0 b 1 c 2 d 3
7. ______ refers to group of statement enclosed in opening and closing braces.
a Control structure b Compound statement c Sequencestructure d Instruction
8. The conditional portion of the if statement can contain:
a Any valid constant b Any expression that can c Any valid variable d Any valid constant or
be evaluated to a variable
Boolean value
9. Which of the following is not part of an if statement?
a A condition that b A condition that c A true block d All of are part of an if
evaluates as a Boolean evaluates as true or statement
false
10. An if statement inside the true block of another if statement is called:
a Nested if statement b Branched if statement c conditional operator d Relational operator

Q#2 Short Questions 10 × 2 = 20


1. Define control structure. 2. Define if statement. 3. A Program that calculates a route of
give number. 4. Write the switch statement. 5. How many selection statement are
available in C? 6. Define conditional operator. 7. Define switch statement.
8. Define if statement. 9. Define if else statement. 10. Define
simple if statement.

Q#3 Long Questions 1x10= 10


Q1. write an interactive program that contains and if statement that may be used to computer
the area of a square (area=side²) or a triangle (area=1/2×base×height) after the first character
of the figure name ( S or T).
Student Name: Roll No: Date: / /
‫ش‬ ‫خ‬
‫معا رہ ب دلی ں‬،‫سوچ ب دلی ں‬ Class: 2nd Year Ch#12 ‫ وش رہ ی ں‬،‫ثم ب ت سوچ ی ں‬
T- Marks - 40 Subject: Computer Time: 45 - M Obtained -Marks:
Objective Type
Q# Encircle the Correct Option 10X1=10
Mail ID: [email protected]
Bismillah Pak Forces
Coaching & Educational
‫ش‬ ‫ ت‬Academy (Chiniot) ‫ٹ‬
‫ے کم از کم ی ن ب ار درود ریف پڑھ لی ں‬‫ہ‬
‫سٹ سے پ ل‬ ‫ی‬
1

1. This is a control structure that causes a statement or group of statement to repeat:


a Decision statement b Loop c Sequential d Logical
2. One execution of a loop is known as a(an) :
a Cycle b Duration c Iteration d Test
3. How many types of loop structure are available in C?
a 4 b 3 c 2 d 6
4. Which of the following loop is available in C language?
a While b Do-while c For d All
5. A counter can be defined as:
a The final value of a b A variable that counts c The initial value of a d The step value of a
loop loop iterations loop loop
6. Where should be the loop control variable initialized?
a Before the loop starts b In first statement of the c In the last statement d Anywhere in the loop
loop body of the loop body body
7. Which loop structure always executes at least once?
a Do-while b For c While d All
8. In which loop the condition comes before the body of the loop?
a While loop b Do-while loop c For loop d b and c
9. In which look the conditions come after the body of the loop?
a While loop b Do-while loop c For loop d b and c
10. Which of the following loop is called counter loop?
a For b While c Do-while d All

Q#2 Short Questions 10 × 2 = 20


1. Define loop. 2. Define while loop. 3. Define do while loop. 4. Define for loop.
5. Write the program to point digits from 1 to 10. 6. Define nested loop. 7.
Define GOTOstatement. 8. How many loops are available in C? 9.
Compare the following loops: while loop and do while loop.
10. What is sentinal controlled loop and how it is implements?

Q#3 Long Questions 1x10=10


Q1. Write a program that produces the following output:. 0
0 1
0 1 2
0 1 2 3
0 1 2 3 4
0 1 2 3 4 5
Student Name: Roll No: Date: / /
‫ش‬ ‫خ‬
‫معا رہ ب دلی ں‬،‫سوچ ب دلی ں‬ Class: 2nd Year Ch#13 ‫ وش رہ ی ں‬،‫ثم ب ت سوچ ی ں‬
T- Marks - 40 Subject: Computer Time: 45 - M Obtained -Marks:
Objective Type
Q# Encircle the Correct Option 10X1=10
1

Mail ID: [email protected]


Bismillah Pak Forces
Coaching & Educational
‫ش‬ ‫ ت‬Academy (Chiniot) ‫ٹ‬
‫ے کم از کم ی ن ب ار درود ریف پڑھ لی ں‬‫ہ‬
‫سٹ سے پ ل‬ ‫ی‬
1. Which of the following is type of function available in C language?
a Defined b Built-in c Subprogram d Both a and b
2. Another name for built-in function is:
a User defined function b Library function c Arithmetic function d Both a and b
3. A type of function that is available as part of language is known as:
a User defined function b Library function c Subprogram d Both a and b
4. Function prototype for built-in functions are specified in:
a Source file b Header file c Object files d Image files
5. Global variables are created in:
a RAM b ROM c Hard disk d Cache
6. Memory is allocated to a local variable at the time of its:
a Declaration b Destruction c Definition d First reference
7. The name of actual and formal parameters:
a May or may not be b Must be same c Must be different d Must be in lowercase
same
8. Formal arguments are also called:
a Actual arguments b Dummy arguments c Originals argument d Referenced argument
9. The printf is a:
a Built-in function b User defined function c Local function d Keyword
10. A built-in function:
a Cannot be redefined b Can be redefined c Cannot return value d Should be redefined

Q#2 Short Questions 10 × 2 = 20


1. Write the type of function. 2. Writing function in C. 3. Define functional header.
4. Define return statement. 5. Define calling a function. 6.Define global variables.
7. Define a local variable. 8.Define function prototype. 9.Write importance of function.
10. What is user defined functions.

Q#3 Long Questions 1x10=10


Q1. Write A program function is ____ crime that has an input parameters i.e num and returns
a value of 1 if number is prime, otherwise returns a value of 0.

Student Name: Roll No: Date: / /


‫ش‬ ‫خ‬
‫معا رہ ب دلی ں‬،‫سوچ ب دلی ں‬ Class: 2nd Year Ch#14 ‫ وش رہ ی ں‬،‫ثم ب ت سوچ ی ں‬
T- Marks - 40 Subject: Computer Time: 45 - M Obtained -Marks:
Objective Type
Q# Encircle the Correct Option 10X1=10
1

1. Which escape sequence can be used to beep from speaker in C?


a \a b \b c \m d \n
2. Which escape sequence can be used to insert a tab in C?
a \a b \b c \t d \n
3. Which escape sequence can move the cursor at the beginning of current line in C?
a \a b \b c \m d \r
4. The escape sequence for backslashe is?
Mail ID: [email protected]
Bismillah Pak Forces
Coaching & Educational
‫ش‬ ‫ ت‬Academy (Chiniot) ‫ٹ‬
‫ے کم از کم ی ن ب ار درود ریف پڑھ لی ں‬‫ہ‬
‫سٹ سے پ ل‬ ‫ی‬
a \ \b c \\ d \t
b
5. Which function is used to input data in C program?
a Scanf b Getch ( ) c Gets ( ) d All
6. Getch ( ) stands for:
a Go character b Get character c Give character d All
7. %f is used for
a Double b Float c Integer d Short
8. Which character signifies the beginning of an escape sequence?
a | b \ c // d /
9. Which escape sequence is used to erase a character left to the cursor position?
a \b b \del c \f d \c
10. Which of the following is not a valid escape code?
a \t b \r c \y d \f

Q#2 Short Questions 10 × 2 = 20


1. Define text stream. 2. Define binary stream. 3. Define file pointer.
4. Write closing file. 5. What is string assignment. 6. What is stream?
7. Write a program to merge the contents of two text files.
8. Discuss the characteristics of different file opening modes.
9. Can be used for both input and output by the same program?
10. Differentiate between dedaring and initializing string variables.

Q#3 Long Questions 1x10= 10


Q1. Write the program that counts the number of words in a text files and display the count
on the screen.

Mail ID: [email protected]

You might also like