2nd Year Computer Guess Paper 2026 PDF (All Punjab Boards)
Computer Science (Inter-II) – Subjective Part Guess Paper[cite: 1]
Q1. Database Management System (DBMS) – Write short answers of the following questions.
- Differentiate between data and information.[cite: 1]
- Define data.[cite: 1]
- Define information.[cite: 1]
- Describe data capturing.[cite: 1]
- Describe data manipulation.[cite: 1]
- What is meant by reproduction?[cite: 1]
- What is a file?[cite: 1]
- List the file types from usage point of view.[cite: 1]
- What is a master file?[cite: 1]
- List the file types from function point of view.[cite: 1]
- Define program file with example.[cite: 1]
- What is meant by file organization?[cite: 1]
- Differentiate between master file and transaction file.[cite: 1]
- Why is it important to specify data type and size of a field?[cite: 1]
- Define database.[cite: 1]
- List different objectives of the database.[cite: 1]
- Define data integration.[cite: 1]
- Define data integrity.[cite: 1]
- Enlist different types of database models.[cite: 1]
- Describe network model.[cite: 1]
- Define data inconsistency.[cite: 1]
- Write any two objectives of database management system.[cite: 1]
- Write any two advantages of database management system.[cite: 1]
- List down any two features of DBMS.[cite: 1]
- State the use of query language.[cite: 1]
- Why is report generator used in database system?[cite: 1]
- What is the main purpose of database system?[cite: 1]
- Define field.[cite: 1]
- Define the term table or relation.[cite: 1]
- Enlist 4 different properties of a relation.[cite: 1]
- Define entity.[cite: 1]
- Give an example of entity.[cite: 1]
- Distinguish between entity class and entity instance.[cite: 1]
- Write down the basic purpose of using views.[cite: 1]
- What is a view?[cite: 1]
- Define indexes.[cite: 1]
- What is a key?[cite: 1]
- Differentiate between parent table and child table.[cite: 1]
- Define primary key.[cite: 1]
- Define secondary key.[cite: 1]
- Define alternate key.[cite: 1]
- Define foreign key.[cite: 1]
- Distinguish between primary key and foreign key.[cite: 1]
- Write three important characteristics of primary key.[cite: 1]
- Define end user.[cite: 1]
- Who is a data administrator?[cite: 1]
- Who is a database administrator?[cite: 1]
- Write the purpose of feasibility study.[cite: 1]
- Define the term analysis.[cite: 1]
- What is the importance of project planning?[cite: 1]
- Which activities are involved in data analysis?[cite: 1]
- What is meant by data modeling?[cite: 1]
- Define entity or object.[cite: 1]
- How is a relation formed in database?[cite: 1]
- Write the use of ER diagram.[cite: 1]
- Give an example of one-to-one relationship.[cite: 1]
- What is the primary objective of ER-diagram?[cite: 1]
- State the purpose of database design process.[cite: 1]
- State the purpose of physical database design.[cite: 1]
- List any two data distribution strategies.[cite: 1]
- How is database integrity maintained?[cite: 1]
- What is the major objective of physical database design?[cite: 1]
- Differentiate between logical database design and physical database design.[cite: 1]
- What is meant by data integrity? What are the two types?[cite: 1]
- What is meant by referential integrity?[cite: 1]
- Explain normalization.[cite: 1]
- Define synonym.[cite: 1]
- Define homonym.[cite: 1]
- How is first normal form achieved?[cite: 1]
- What is a repeating group?[cite: 1]
- List any two types of forms used in MS Access.[cite: 1]
- Write the use of columnar form in MS Access.[cite: 1]
- What is auto form?[cite: 1]
- Discuss the use of design view in MS Access.[cite: 1]
- Define tabular form.[cite: 1]
- What is the difference between tabular form and columnar form?[cite: 1]
- Define list box.[cite: 1]
- Define combo box.[cite: 1]
- Differentiate between combo box and list box.[cite: 1]
- State the purpose of radio button.[cite: 1]
- What are check boxes?[cite: 1]
- What is sub form?[cite: 1]
- List any two methods of creating sub forms.[cite: 1]
- Distinguish between form and sub form.[cite: 1]
- What is a report?[cite: 1]
- Define report.[cite: 1]
- Differentiate between forms and reports.[cite: 1]
- What is linking in MS Access?[cite: 1]
- Write the use of switchboard.[cite: 1]
Q2. C Language – Write short answers of the following questions.[cite: 1]
- Define program.[cite: 1]
- Who is a programmer?[cite: 1]
- List out two advantages or characteristics of C language.[cite: 1]
- What is the use of Turbo C++?[cite: 1]
- What is the process of linking in C programs?[cite: 1]
- What is the role of linker in C-language?[cite: 1]
- What is the purpose of linker?[cite: 1]
- Define structured programming.[cite: 1]
- What is #define directive? Give an example.[cite: 1]
- What is the use of main() function in C programs?[cite: 1]
- What do you mean by delimiters?[cite: 1]
- What is statement terminator?[cite: 1]
- State the purpose of header file.[cite: 1]
- What is the purpose of # sign in C?[cite: 1]
- What are delimiters in C language?[cite: 1]
- Define bug.[cite: 1]
- Define the term debug.[cite: 1]
- What are different types of errors in C programming?[cite: 1]
- Differentiate between syntax error and logical error.[cite: 1]
- Why is the logical error the most difficult error to find?[cite: 1]
- What is machine language?[cite: 1]
- What is an assembler?[cite: 1]
- What is a compiler?[cite: 1]
- Define high level language.[cite: 1]
- Differentiate between compiler and interpreter.[cite: 1]
- What is an identifier? Give an example.[cite: 1]
- Write the legal characters of an identifier.[cite: 1]
- Why is C known as a strongly typed language?[cite: 1]
- What do you know about C statement?[cite: 1]
- What are keywords?[cite: 1]
- Define variables.[cite: 1]
- Why is it important to assign a data type to a variable?[cite: 1]
- Differentiate between declaring and defining a variable.[cite: 1]
- What is variable initialization?[cite: 1]
- Write down two rules for declaring naming variables in C.[cite: 1]
- Give some examples of valid variable names.[cite: 1]
- Differentiate between function definition and declaration.[cite: 1]
- Write a statement to declare an integer variable initialized to 10.[cite: 1]
- How is a variable declared in C? Give an example.[cite: 1]
- Define constant.[cite: 1]
- Define character constant.[cite: 1]
- Differentiate between string constant and character constant.[cite: 1]
- Define string constants. Give two examples.[cite: 1]
- Define data type. Give example.[cite: 1]
- List three problems while working with floating point numbers.[cite: 1]
- Write a C statement which declares three floating point variables a, b, and c in a single line.[cite: 1]
- What is a relational operator?[cite: 1]
- What is meant by operator precedence?[cite: 1]
- Differentiate between unary and binary operator.[cite: 1]
- What is compound condition? Give an example.[cite: 1]
- Define logical operators.[cite: 1]
- How does an arithmetic overflow occur?[cite: 1]
- What are logical operators? Name any two.[cite: 1]
- Write down the names of logical operators available in C language.[cite: 1]
- Define expression with example.[cite: 1]
- What is arithmetic expression?[cite: 1]
- Describe single comments in C.[cite: 1]
- List some important functions for output.[cite: 1]
- Define escape sequences.[cite: 1]
- List four functions for input in C.[cite: 1]
- Define standard input.[cite: 1]
- Why is the ampersand (&) used in scanf function?[cite: 1]
- What is the use of “scanf” function? Also write its syntax.[cite: 1]
- Differentiate between scanf and printf functions.[cite: 1]
- List three names of functions used for character input.[cite: 1]
- Describe getch() function.[cite: 1]
- Compare getch and getche functions.[cite: 1]
- What is control structure?[cite: 1]
- List types of control structures.[cite: 1]
- Why is a default label used in switch statements?[cite: 1]
- Why is break statement used in a switch statement?[cite: 1]
- What happens if break is missed in case block?[cite: 1]
- Write three advantages of switch statement.[cite: 1]
- What is conditional operator? Write its syntax.[cite: 1]
- Write any two uses of loop.[cite: 1]
- Make a flowchart of while loop.[cite: 1]
- Write the purpose of continue statement.[cite: 1]
- Define nested loop.[cite: 1]
- Write the syntax of do-while loop, both for single statement and for multiple statements.
- Distinguish between break and continue statement used in loops.[cite: 1]
- What is sentinel-controlled loop?[cite: 1]
- Define GOTO statement.[cite: 1]
- Define the term function.[cite: 1]
- List some benefits of using functions.[cite: 1]
- What is the use of actual parameters?[cite: 1]
- What is function header?[cite: 1]
- Define function declaration with its syntax.[cite: 1]
- What is function definition?[cite: 1]
- Define function body.[cite: 1]
- What is the difference between function declaration and function header?[cite: 1]
- Write the use of function prototype.[cite: 1]
- What is meant by a function call?[cite: 1]
- Define local variable.[cite: 1]
- What is meant by scope of variable?[cite: 1]
- What is the lifetime of local variable?[cite: 1]
- Differentiate between local and global variable.[cite: 1]
- How long does the global variable exist in the memory?[cite: 1]
- Write down the scope of global variables.[cite: 1]
- How does a function return value?[cite: 1]
- Describe the purpose of file handling.[cite: 1]
- Define a stream.[cite: 1]
- Write the name of two types of stream used in files in C Language.[cite: 1]
- Compare binary and text stream.[cite: 1]
- What do you mean by text stream?[cite: 1]
- Define EOF marker in file.[cite: 1]
- What is a text file?[cite: 1]
- Define a pointer.[cite: 1]
- How is a file opened in C?[cite: 1]
- Why is it important to close a file?[cite: 1]
- How is a file closed?[cite: 1]
- What is file pointer?[cite: 1]
- What is string?[cite: 1]
- How string value is displayed in C language?[cite: 1]
Q3. C Language Errors & Output – Write short answers of the following questions.[cite: 1]
- Determine the output:
if(7%3==0) printf ("Punjab"); else printf("Sindh");[cite: 1] - Convert the following conditional expression into if-else statement:
(x>y)?x*y:x+y;[cite: 1] - What will be the output of the following?
int x=10; (x%2==0) ? printf("Even") : printf("Odd");[cite: 1] - Find out errors:
#include <Stdio> void main () { if (50>20) then printf ("Islamic Country"); getch() }[cite: 1] - Find error:
int price =10; if (price!=10) price =0;[cite: 1] - Find error:
#include (Stdio.n); #include <conio.c> void main () { If (16>10) then printf ("%C", "Pakistan"); getch(); }[cite: 1] - Find error from the following:
int y;z; if (y==z) printf ("yes")[cite: 1] - Trace the output:
void main () { int marks; printf ("\n enter your marks"); scanf ("%d", & marks); if (marks>=40) printf ("\n congratulation"); }[cite: 1] - Find error in the following segment:
float y 3.14; if (Y==3) printf ("Errors");[cite: 1] - Trace the error:
Int a;b; a=10, b=5 if (a<b) printf ("\n A is less than b");[cite: 1] - 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(); }[cite: 1] - What will be output of the following?
int x=5, y=10; if (x>y) y=2;[cite: 1] - 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(); }[cite: 1] - 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);[cite: 1] - Find output from the following:
int price =19; if (price!=10) printf ("price");[cite: 1] - What is the error in the following code?
Int x=10, y=20; If (x>10&y<30) printf ("%d", x+y);[cite: 1] - Trace error:
void main () { int a=2 if (a==1) printf ("ok"); else printf ("cancel"); getch(); }[cite: 1] - Find output of the following code:
int a=1, b=6; if (a+b<7); { printf ("%d", a); } else { printf ("%d", b); }[cite: 1] - Trace errors from the following code:
if (7!=10 printf ("hello"); else-do printf("welcome");[cite: 1] - Predict the output of the following code:
if (4%2==0) printf ("Programming makes the life interesting \n"); else printf ("Programming is difficult to learn");[cite: 1] - 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"); }[cite: 1] - 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);[cite: 1] - What is the output of the following code?
int x=1; int y=z=3; if( (x==y) || (y==z) || (z==z)) printf("yes"); else printf("no")[cite: 1] - Convert the following loop code into while loop:
for (i=10; i>0; i--) { printf (",i=%d",i); }[cite: 1] - Rewrite the following code using do-while loop:
int x=10; while (x>=1) { printf ("%d", x %2); x--; }[cite: 1] - Convert the following code in for loop:
int n=1; while (n<=10); { printf("%d\n",n); n++; }[cite: 1]
Unit 1: Data Basics
- Define database system. Explain any three components of a database system.
- What is a key? Discuss different types of keys.
Unit 3: Data Base Design Process
- What is data modeling? What are the ingredients of data modeling?
- What is an ER model? What are the symbols used in an ER diagram?
- Explain different types of relationships in detail.
Unit 6: Table and Query
- Explain different data types available in MS Access.
- Define query. Explain the uses of wildcards in queries with examples.
- Discuss different methods of modifying a table.
- What is a field property? Discuss different field properties in detail.
- What is a filter? Discuss different types of filters in MS Access.
Unit 8: Getting Started with C
- Briefly describe the basic structure of a C program.
- While writing a C program, how many types of errors can occur? Which one is the most difficult to locate and remove?
- How would you create, edit, compile, link, and execute a C program?
- Define a language processor or translator. Discuss different types of language processors.
- What is a program and programming language? Discuss two main categories of programming languages.
Unit 11: Decision Constructs
- Write a program that inputs a character and checks whether it is a vowel or consonant using a switch statement.
- Write a program that inputs a year and finds whether it is a leap year or not using an if-else structure.
- Write a program that inputs a number and tells whether it is even or odd using an if-else structure.
Unit 12: Loop Constructs
- What is a while loop? Explain its working with an example and flowchart.
- What is a do-while loop? Write its syntax. Explain its working with an example.
- What is a nested loop? Explain with an example and flowchart.
- What is a for loop structure? Explain its working with an example and flowchart.
