0% found this document useful (0 votes)
49 views28 pages

Computer 12

The document outlines a series of short tests for Computer Science-12 at Taleem City Institute, covering various units and topics related to databases and programming. Each test includes multiple-choice questions, short answer questions, and a long question for detailed responses. The tests assess knowledge on data organization, database design, SQL, and programming concepts.

Uploaded by

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

Computer 12

The document outlines a series of short tests for Computer Science-12 at Taleem City Institute, covering various units and topics related to databases and programming. Each test includes multiple-choice questions, short answer questions, and a long question for detailed responses. The tests assess knowledge on data organization, database design, SQL, and programming concepts.

Uploaded by

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

TALEEM CITY INSTITUTE

Ameenpur, Faisalabad 03126987979


Name: Roll#: Class: Inter Part-II
Subject: Computer Science-12 Date: Time:
Test Type # Type 8 - Short Test (No Choice) - Marks=30
Test Syllabus: Unit-1,

Q.1 Circle the Correct Answers. (6x1=6)


i The process of arranging data in a logical sequence is called:
(A) Sorting (B) Summarizing (C) Capturing (D) Classifiyin
ii 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
iii In a relational database, a single piece of information is called:
(A) Table (B) Records (C) Entity (D) Attribute
iv Which of the following is also known as data set:
(A) Record (B) Field (C) File (D) Module
v Multiple copies of the same data is referred to as:
(A) data integrity (B) data inconsistency (C) data redundancy (D) data isolation
vi SQL stands for:
(A) Sort Query List (B) Self QWuantifying language
(C) Structured Query Language (D) Self Quantative language
Q.2 Write short answers of the following questions. (8x2=16)
i. Define Data.
ii. What is meant by Reproduction?
iii. Define Data set.
iv. What is Master File?
v. List the file types from functional point of view.
vi. Why is it important to specify data type and size of a field?
vii. What is the use of Data Dictionary?
viii. Why is report generator used in databse system?
NOTE: Attempt the long question. (4+4=8)
3. Describe different steps involved in designing a data base with the help of diagram.
MCQs Ans Key
Q:1 (A) Q:2 (B) Q:3 (B) Q:4 (A) Q:5 (B) Q:6 (C)
TALEEM CITY INSTITUTE
Ameenpur, Faisalabad 03126987979
Name: Roll#: Class: Inter Part-II
Subject: Computer Science-12 Date: Time:
Test Type # Type 8 - Short Test (No Choice) - Marks=30
Test Syllabus: Unit-2,

Q.1 Circle the Correct Answers. (6x1=6)


i The row of relation can be of ___________ order.
(A) Any (B) Same (C) Sorted (D) Constant
ii A relation is also known as:
(A) Table (B) Record (C) Field (D) Cell
iii The selected candidate key is called:
(A) Foreign key (B) Composite key (C) Primary key (D) Super key
iv Which of the following is also known as control key?
(A) Foreing key (B) Composite key (C) Primary key (D) Sort key
v A table must have a:
(A) Primary key (B) Secondary key (C) Composite key (D) Sort key
vi Which of the following key does not hold uniquenss property?
(A) Foreign key (B) Composite key (C) Primary key (D) Secondary key
Q.2 Write short answers of the following questions. (8x2=16)
i. Define an Entity.
ii. Distinguish between entity class and entity instance?
iii. Define primary key.
iv. Define alternate key.
v. How a primary key is different than a candidate key?
vi. What is the difference between primary key and foreign key?
vii. Write three important characteristics of primary key?
viii. Who is User or End User?
NOTE: Attempt the long question. (4+4=8)
3. Define Relation. Write down different properties of relation in detail.
MCQs Ans Key
Q:1 (A) Q:2 (C) Q:3 (C) Q:4 (D) Q:5 (A) Q:6 (D)
TALEEM CITY INSTITUTE
Ameenpur, Faisalabad 03126987979
Name: Roll#: Class: Inter Part-II
Subject: Computer Science-12 Date: Time:
Test Type # Type 8 - Short Test (No Choice) - Marks=30
Test Syllabus: Unit-3,

Q.1 Circle the Correct Answers. (6x1=6)


i In an E-R Diagram, a rectangle represnets a(n):
(A) Entity (B) Attributes (C) Relationship (D) Field
ii __________ is used to define characteristics of an entity/object:
(A) Objects (B) Attributes (C) Records (D) Files
iii In an E-R diagram, a diamond represents a(n):
(A) Attributes (B) Relationship (C) Entity (D) Modality
iv In ERD model, the relationships between two entities are represented by:
(A) Rectangle (B) Oval (C) Square (D) Diamond
v Which one of the following is used to associate entities with each other?
(A) Attributes (B) Relationship (C) Entities (D) Cardinals
vi An entity related to itself in a ERD model refers to relationship:
(A) Recursive (B) One to many (C) many to many (D) One to me
Q.2 Write short answers of the following questions. (8x2=16)
i. What is importance of project planning?
ii. Which activities are involved in data analysis?
iii. How relation is formed in database?
iv. Give one example of one-to-one relationship.
v. Define the term cardinality of relation.
vi. Define modality with the help of figure.
vii. State the purpose of database design process.
viii. How is database integrity maintained?
NOTE: Attempt the long question. (4+4=8)
3. Define data modeling? Describe its components indetail.
MCQs Ans Key
Q:1 (A) Q:2 (B) Q:3 (B) Q:4 (A) Q:5 (D) Q:6 (A)
TALEEM CITY INSTITUTE
Ameenpur, Faisalabad 03126987979
Name: Roll#: Class: Inter Part-II
Subject: Computer Science-12 Date: Time:
Test Type # Type 8 - Short Test (No Choice) - Marks=30
Test Syllabus: Unit-4,

Q.1 Circle the Correct Answers. (6x1=6)


i Two or more attributes having different names but same meaning are called:
(A) Homonyms (B) Aliases (C) Synonyms (D) Alternate Attributes
ii In 2NF, which form of dependency is removed?
(A) Functional (B) Partial (C) Associative (D) Transitive
iii In 3NF, which form of dependency is removed?
(A) Functional (B) Non-Functional (C) Associative (D) Transitive
iv Different Attributes in two different tables having same name are referred to as:
(A) Synonym (B) Homonym (C) Acronym (D) Mutually exclusive
v 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
vi In 3FN, a non-key arttirbute must not depends on a:
(A) Non-key attribute (B) Key attribute (C) Composite key (D) primary key
Q.2 Write short answers of the following questions. (8x2=16)
i. Define Entity Integrity.
ii. Define Synonym.
iii. Describe the term homonym.
iv. How second normal form is achieved?
v. What is partial dependency in Relation?
vi. What are Database Anomalies? Only list their names.
vii. Define Insertion Anomaly.
viii. What is a repeating group?
NOTE: Attempt the long question. (4+4=8)
MCQs Ans Key
Q:1 (C) Q:2 (B) Q:3 (D) Q:4 (B) Q:5 (D) Q:6 (A)
TALEEM CITY INSTITUTE
Ameenpur, Faisalabad 03126987979
Name: Roll#: Class: Inter Part-II
Subject: Computer Science-12 Date: Time:
Test Type # Type 8 - Short Test (No Choice) - Marks=30
Test Syllabus: Unit-5,

Q.1 Circle the Correct Answers. (6x1=6)


i 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
ii MS Access saves the database with the extension:
(A) .mbdq (B) .msdb (C) .ppt (D) .mdb
iii A database consists of various components called:
(A) Tools (B) Properties (C) Entities (D) Objects
iv The output of the query is in the form of:
(A) Table (B) Form (C) Report (D) Query
v A request for information from a database in database terminology is called:
(A) Report (B) Letter (C) Table (D) Query
vi Which of the following is not a database object?
(A) Table (B) Query (C) From (D) MS-Word
Q.2 Write short answers of the following questions. (8x2=16)
i. Define the term RDBMS.
ii. List advantages of RDBMS.
iii. List any four properties of relational databse management system.
iv. What is Database wizard?
v. Define two database objects.
vi. How is query designed in Access?
vii. Write two advantages of form.
viii. Differentiate between Form and Report.
NOTE: Attempt the long question. (4+4=8)
3. Briefly describe the advantages of using MS-ACCESS.
MCQs Ans Key
Q:1 (C) Q:2 (D) Q:3 (D) Q:4 (A) Q:5 (D) Q:6 (D)
TALEEM CITY INSTITUTE
Ameenpur, Faisalabad 03126987979
Name: Roll#: Class: Inter Part-II
Subject: Computer Science-12 Date: Time:
Test Type # Type 8 - Short Test (No Choice) - Marks=30
Test Syllabus: Unit-6,

Q.1 Circle the Correct Answers. (6x1=6)


i The degree of relation relation refers to the number of:
(A) Rows (B) Tables (C) Field (D) Columns
ii What is the default field size of a text data-type in MS-ACCESS?
(A) 2 (B) 5 (C) 20 (D) 50
iii Every table must have a:
(A) Foreign key (B) Composite key (C) Primary key (D) Sort key
iv Default field size of a text data type field is:
(A) 02 (B) 10 (C) 20 (D) 50
v The column of a table corresponds to:
(A) Table (B) Field (C) Record (D) Cell
vi To find a name that start with S, the criteria is written as:
(A) S#? (B) S# (C) ?S (D) S*
Q.2 Write short answers of the following questions. (8x2=16)
i. Difference between degree of relation and cardinality of relation.
ii. List two disadvantages of integrated development environment.
iii. Name three methods for creating tables in MS-Access.
iv. What is OLE object in MS-Access?
v. How does aninput mask help the user to enter data?
vi. List out different data type available in MS-Access?
vii. List some advantages of query.
viii. State the use of wild cards?
NOTE: Attempt the long question. (4+4=8)
3. Discuss different methods of modifying a table.
MCQs Ans Key
Q:1 (C) Q:2 (D) Q:3 (C) Q:4 (D) Q:5 (B) Q:6 (D)
TALEEM CITY INSTITUTE
Ameenpur, Faisalabad 03126987979
Name: Roll#: Class: Inter Part-II
Subject: Computer Science-12 Date: Time:
Test Type # Type 8 - Short Test (No Choice) - Marks=30
Test Syllabus: Unit-7,

Q.1 Circle the Correct Answers. (6x1=6)


i _________ auto form displays one record at a time.
(A) Columnar (B) Tabular (C) Datasheet (D) Justified
ii The forms are designed to:
(A) Data capturing (B) Data Manipulation
(C) Analysis (D) Managing output result
iii Which of the following is used to retrieve data from database and represent it to the user in a formatted way?
(A) Form (B) Query (C) Table (D) Report
Q.2 Write short answers of the following questions. (8x2=16)
i. Name any two types of forms used in MS-Access.
ii. Write use of Columnar Form in MS-Access.
iii. What is Autoform?
iv. Discuss the use of design view in MS-Access.
v. Define report.
NOTE: Attempt the long question. (4+4=8)
3. Discuss different options for Editing in MS-Access?
MCQs Ans Key
Q:1 (A) Q:2 (B) Q:3 (D)
TALEEM CITY INSTITUTE
Ameenpur, Faisalabad 03126987979
Name: Roll#: Class: Inter Part-II
Subject: Computer Science-12 Date: Time:
Test Type # Type 8 - Short Test (No Choice) - Marks=30
Test Syllabus: Unit-8,

Q.1 Circle the Correct Answers. (6x1=6)


i C-Language was developed in:
(A) 1962 (B) 1969 (C) 1970 (D) 1972
ii The process of converting source code into object code is known is:
(A) Compiling (B) Executing (C) Linking (D) Saving
iii Which of the following key is used to save a file?
(A) F2 (B) F3 (C) F5 (D) F9
iv _____ is a loop statement:
(A) if (B) if-else (C) switch (D) For
v Void occupies how many bytes in memory:
(A) Zero (B) One (C) Two (D) Four
vi The lowest level of programming language is:
(A) Java (B) Assembly Language (C) Pascal (D) C++
Q.2 Write short answers of the following questions. (8x2=16)
i. Write the use of Turbo C++.
ii. Why source code cannnot be executed directly?
iii. What is linking?
iv. Differentiate between linking and loading.
v. Distinguish between source code and object code.
vi. Differentiate between Preprocessor directives and header file.
vii. What is statement terminator?
viii. Why the logical error is the most difficult error to find?
NOTE: Attempt the long question. (4+4=8)
3. Define language processor or translator and also explain its types?
MCQs Ans Key
Q:1 (D) Q:2 (A) Q:3 (A) Q:4 (D) Q:5 (A) Q:6 (B)
TALEEM CITY INSTITUTE
Ameenpur, Faisalabad 03126987979
Name: Roll#: Class: Inter Part-II
Subject: Computer Science-12 Date: Time:
Test Type # Type 8 - Short Test (No Choice) - Marks=30
Test Syllabus: Unit-9,

Q.1 Circle the Correct Answers. (6x1=6)


i Which of the following is also known as control key.
(A) Foreign key (B) Composite key (C) Primary key (D) Sort key
ii In C, the maximum length of text name is:
(A) 25 characters (B) 255 characters (C) 155 characters (D) 55 characters
iii a + = b is equivalent to:
(A) b + = a (B) a = + b (C) a = a + b (D) b = b + a
iv 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
v Logical operators are:
(A) AND (B) OR (C) NOT (D) All
vi For A = 4 and B = 4 which expression evaluates as true?
(A) A > B (B) A ! = B (C) A < B (D) A > B
Q.2 Write short answers of the following questions. (8x2=16)
i. List two types of identifiers in C.
ii. Write the legal characters of an identifier.
iii. Define Keywords.
iv. Differentiate between declaring and defining a variable.
v. Find the Errors in the following code. #include <std10.h> void main (void) { int x, y, z z=x+y+z}
vi. Write a C-statement which declare three floating point variable a, b and c in a single line ?
vii. List any four types of operators in C.
viii. What is compound condition? Give an example?
NOTE: Attempt the long question. (4+4=8)
3. Write a program in C to Input single character during execution of program and show either it is vowel or
consonant.
MCQs Ans Key
Q:1 (D) Q:2 (B) Q:3 (C) Q:4 (D) Q:5 (D) Q:6 (A)
TALEEM CITY INSTITUTE
Ameenpur, Faisalabad 03126987979
Name: Roll#: Class: Inter Part-II
Subject: Computer Science-12 Date: Time:
Test Type # Type 8 - Short Test (No Choice) - Marks=30
Test Syllabus: Unit-10,

Q.1 Circle the Correct Answers. (6x1=6)


i How many variables can be used in one printf function?
(A) One (B) Two (C) Ten ` (D) Many
ii The escape sequence for backslash is:
(A) \ (B) \b (C) \\ (D) \t
iii Which escape sequence is used to begin new line?
(A) \a (B) \b (C) \m (D) \n
iv The function used for input and output is stored in:
(A) Sdio.h (B) Conio.h (C) Math.h (D) Tan.h
v Function which used to get input form the user:
(A) printf() (B) scanf() (C) clrscr() (D) puts()
vi The function getch() is defined in:
(A) Stdio.h (B) Conio.h (C) String.h (D) Math.h
Q.2 Write short answers of the following questions. (8x2=16)
i. 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);
ii. Trace the errors in the following code. #include <std.n> void main (void) { printf ('Pakistna'); }
iii. Write the output of the following statements. main () { printf ("555\n"); printf ("55"); }
iv. Find the output of the following code. printf("Book \t reading \n"); printf("is a \t very good \n habit");
v. Write down output of the following. float f = 3.14159; printf ("f = %4.f",f);
vi. Trace the output. void main (){ int x, y, z; x =10; y = 20; z = 30; x = x + y; y = y + z; z = x - y; printf("result =
%d%d%d\n", x, y,z); getch();}
vii. Find the output of the following code. Printf("Programming\t is \n very \t interesting");
viii. What will be the output of the following code? int m = 7; int y = 3; printf (“%d” , m % y);
NOTE: Attempt the long question. (4+4=8)
3. What is an escape sequence? Give example.
MCQs Ans Key
Q:1 (D) Q:2 (C) Q:3 (D) Q:4 (A) Q:5 (B) Q:6 (B)
TALEEM CITY INSTITUTE
Ameenpur, Faisalabad 03126987979
Name: Roll#: Class: Inter Part-II
Subject: Computer Science-12 Date: Time:
Test Type # Type 8 - Short Test (No Choice) - Marks=30
Test Syllabus: Unit-11,

Q.1 Circle the Correct Answers. (6x1=6)


i Which programming structure exectues program statements in order?
(A) Relation (B) Decision (C) Sequence (D) Repetition
ii Which programming structures makes a comparison?
(A) relation (B) decision (C) sequence (D) repetition
iii Another term for computer making a decision is:
(A) sequential (B) selection (C) repetition (D) iteration
iv In If-statement, true is represented by:
(A) 0 (B) 1 (C) 2 (D) 3
v The conditional operator is used as alternate to:
(A) if (B) if-else (C) if-else if-else (D) switch
vi Which operator is called ternary operator?
(A) if (B) ++ (C) ? (D) ()
Q.2 Write short answers of the following questions. (8x2=16)
i. Explain if statement.
ii. Find error. int price = 10 if(price! = 10) price=0
iii. Trace the output. void main() { int marks; printf("\n enter your makrs"); scanf("%d", & marks); if(marks >= 40)
printf("\n congratulation"); } }
iv. Write the syntax of "if-else" statement.
v. Find the output of the following code. #include<stdio.h> void main() { char grade = 'c'; if (grade = 'a' || grade =
'b' && grade = 'c') printf("Fail"); else printf("Pass"); } }
vi. Find output. int p = 3, q = 5; if((p > q) || (q! = 4)) p = p + 1; else p = p * 2; printf("p = %d", p);
vii. Show output int p = 10; if(p != 10) p = 0; else p = 5;
viii. Trace the output. int a = 5, b = 10; if a > b; printf("Low Triangle"); else printf("Huge Triangle");
NOTE: Attempt the long question. (4+4=8)
3. Write a program that inputs a number from user and finds it is positive, negative or zero.
MCQs Ans Key
Q:1 (C) Q:2 (B) Q:3 (B) Q:4 (B) Q:5 (B) Q:6 (C)
TALEEM CITY INSTITUTE
Ameenpur, Faisalabad 03126987979
Name: Roll#: Class: Inter Part-II
Subject: Computer Science-12 Date: Time:
Test Type # Type 8 - Short Test (No Choice) - Marks=30
Test Syllabus: Unit-12,

Q.1 Circle the Correct Answers. (6x1=6)


i A loop that never ends is called:
(A) Infinite loop (B) Running loop (C) Nested loop (D) Continuous loop
ii Graphical representation of a program is called:
(A) Logical chart (B) Binary chart (C) Flow - chart (D) E – R chart
iii While loop is also called:
(A) Conditional loop (B) Do-while loop (C) For loop (D) All of these
iv Which statements uses a loop to terminate early?
(A) break (B) terminate (C) exit (D) stop
v ______ loop structure always executes at least once.
(A) Nested (B) FOR (C) While (D) do while
vi The Do-while loop structure always ends with:
(A) Comma (B) Semi colon (C) Colon (D) Brace
Q.2 Write short answers of the following questions. (8x2=16)
i. Define Condition?
ii. Write the purpose of Continue Statement?
iii. Convert the following code into while loop. for(int i = 1; i <= 10; i++) { printf("\nPakistan"); }
iv. Write output. int x = 5, y = 3; do { x = x*2; y = y+2; } while(y < 7); printf("%d",x);
v. Convert the following loop in do-while loop. for(i = 3; i < 39; i += 6) { printf("%d/n",i); }
vi. Draw the Flow chart of do-while loop?
vii. Trace the errors of the following code. Void main() { int x,y = 5; for(x = 0; x < 3; x++) if(y >= 5) Printf("%d\t",x); }
viii. Define goto statement.
NOTE: Attempt the long question. (4+4=8)
3. What is sentinel controlled loop and how it is implemented? Discuss some of the situations where it can be
useful.
MCQs Ans Key
Q:1 (A) Q:2 (C) Q:3 (A) Q:4 (A) Q:5 (D) Q:6 (B)
TALEEM CITY INSTITUTE
Ameenpur, Faisalabad 03126987979
Name: Roll#: Class: Inter Part-II
Subject: Computer Science-12 Date: Time:
Test Type # Type 8 - Short Test (No Choice) - Marks=30
Test Syllabus: Unit-13,

Q.1 Circle the Correct Answers. (6x1=6)


i A type of function is written by the programmer is known as:
(A) User-defined (B) Subprograms (C) Subroutines (D) Built-in-function
ii The name of actual and formal parameters:
(A) Must be same (B) May or may not be same (C) Must be different
(D) Must be in lower case
iii Which statement is used by function to return a value?
(A) give (B) send (C) return (D) call
iv The statement that activates a function is known as:
(A) Function Output (B) Function Definition (C) Function Prototype (D) Function Cell
v Local Variables are also called:
(A) Automatic variable (B) Static variable (C) Register variable (D) Run time variable
vi Memory allocated to a local variable at the time of its:
(A) Declaration (B) Destruction (C) Definition (D) First reference
Q.2 Write short answers of the following questions. (8x2=16)
i. List different types of functions in C.
ii. Describe Built in Function.
iii. Describe user-defined function.
iv. What is meant by fgets function?
v. Define function body.
vi. Differentiate between function definition and function declaration.
vii. What is function call statement?
viii. Define local variable.
NOTE: Attempt the long question. (4+4=8)
MCQs Ans Key
Q:1 (A) Q:2 (B) Q:3 (C) Q:4 (D) Q:5 (A) Q:6 (C)
TALEEM CITY INSTITUTE
Ameenpur, Faisalabad 03126987979
Name: Roll#: Class: Inter Part-II
Subject: Computer Science-12 Date: Time:
Test Type # Type 8 - Short Test (No Choice) - Marks=30
Test Syllabus: Unit-14,

Q.1 Circle the Correct Answers. (6x1=6)


i The character conversion may occur in:
(A) Text stream (B) Binary Stream (C) Input stream (D) Output stream
ii A file is stored in:
(A) RAM (B) Hard disk (C) ROM (D) Cache
iii Fopen() function takes ____ parameters.
(A) 1 (B) 2 (C) 3 (D) 4
iv In the statement FILE * represents:
(A) Variable (B) Parameter (C) Argument (D) Pointer
v In the statement FILE *fp , the* represents:
(A) Multiplication (B) Pointer (C) Argument (D) Sentinel
vi On successful closing a file, the fclose () returns:
(A) Null (B) 0 (Zero) (C) 1 (One) (D) File pointer
Q.2 Write short answers of the following questions. (8x2=16)
i. Define stream.
ii. Write the name of two types of stream used in files in C language.
iii. What do you mean by text stream?
iv. Compare binary and text stream.
v. How is a file opened in C?
vi. How the end of Text file is indicated?
vii. Define pointer.
viii. Why is it important to close a file?
NOTE: Attempt the long question. (4+4=8)
MCQs Ans Key
Q:1 (A) Q:2 (B) Q:3 (B) Q:4 (A) Q:5 (B) Q:6 (B)

You might also like