2nd Year Computer Guess Paper 2026 PDF (All Punjab Boards)

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.

  1. Differentiate between data and information.[cite: 1]
  2. Define data.[cite: 1]
  3. Define information.[cite: 1]
  4. Describe data capturing.[cite: 1]
  5. Describe data manipulation.[cite: 1]
  6. What is meant by reproduction?[cite: 1]
  7. What is a file?[cite: 1]
  8. List the file types from usage point of view.[cite: 1]
  9. What is a master file?[cite: 1]
  10. List the file types from function point of view.[cite: 1]
  11. Define program file with example.[cite: 1]
  12. What is meant by file organization?[cite: 1]
  13. Differentiate between master file and transaction file.[cite: 1]
  14. Why is it important to specify data type and size of a field?[cite: 1]
  15. Define database.[cite: 1]
  16. List different objectives of the database.[cite: 1]
  17. Define data integration.[cite: 1]
  18. Define data integrity.[cite: 1]
  19. Enlist different types of database models.[cite: 1]
  20. Describe network model.[cite: 1]
  21. Define data inconsistency.[cite: 1]
  22. Write any two objectives of database management system.[cite: 1]
  23. Write any two advantages of database management system.[cite: 1]
  24. List down any two features of DBMS.[cite: 1]
  25. State the use of query language.[cite: 1]
  26. Why is report generator used in database system?[cite: 1]
  27. What is the main purpose of database system?[cite: 1]
  28. Define field.[cite: 1]
  29. Define the term table or relation.[cite: 1]
  30. Enlist 4 different properties of a relation.[cite: 1]
  31. Define entity.[cite: 1]
  32. Give an example of entity.[cite: 1]
  33. Distinguish between entity class and entity instance.[cite: 1]
  34. Write down the basic purpose of using views.[cite: 1]
  35. What is a view?[cite: 1]
  36. Define indexes.[cite: 1]
  37. What is a key?[cite: 1]
  38. Differentiate between parent table and child table.[cite: 1]
  39. Define primary key.[cite: 1]
  40. Define secondary key.[cite: 1]
  41. Define alternate key.[cite: 1]
  42. Define foreign key.[cite: 1]
  43. Distinguish between primary key and foreign key.[cite: 1]
  44. Write three important characteristics of primary key.[cite: 1]
  45. Define end user.[cite: 1]
  46. Who is a data administrator?[cite: 1]
  47. Who is a database administrator?[cite: 1]
  48. Write the purpose of feasibility study.[cite: 1]
  49. Define the term analysis.[cite: 1]
  50. What is the importance of project planning?[cite: 1]
  51. Which activities are involved in data analysis?[cite: 1]
  52. What is meant by data modeling?[cite: 1]
  53. Define entity or object.[cite: 1]
  54. How is a relation formed in database?[cite: 1]
  55. Write the use of ER diagram.[cite: 1]
  56. Give an example of one-to-one relationship.[cite: 1]
  57. What is the primary objective of ER-diagram?[cite: 1]
  58. State the purpose of database design process.[cite: 1]
  59. State the purpose of physical database design.[cite: 1]
  60. List any two data distribution strategies.[cite: 1]
  61. How is database integrity maintained?[cite: 1]
  62. What is the major objective of physical database design?[cite: 1]
  63. Differentiate between logical database design and physical database design.[cite: 1]
  64. What is meant by data integrity? What are the two types?[cite: 1]
  65. What is meant by referential integrity?[cite: 1]
  66. Explain normalization.[cite: 1]
  67. Define synonym.[cite: 1]
  68. Define homonym.[cite: 1]
  69. How is first normal form achieved?[cite: 1]
  70. What is a repeating group?[cite: 1]
  71. List any two types of forms used in MS Access.[cite: 1]
  72. Write the use of columnar form in MS Access.[cite: 1]
  73. What is auto form?[cite: 1]
  74. Discuss the use of design view in MS Access.[cite: 1]
  75. Define tabular form.[cite: 1]
  76. What is the difference between tabular form and columnar form?[cite: 1]
  77. Define list box.[cite: 1]
  78. Define combo box.[cite: 1]
  79. Differentiate between combo box and list box.[cite: 1]
  80. State the purpose of radio button.[cite: 1]
  81. What are check boxes?[cite: 1]
  82. What is sub form?[cite: 1]
  83. List any two methods of creating sub forms.[cite: 1]
  84. Distinguish between form and sub form.[cite: 1]
  85. What is a report?[cite: 1]
  86. Define report.[cite: 1]
  87. Differentiate between forms and reports.[cite: 1]
  88. What is linking in MS Access?[cite: 1]
  89. Write the use of switchboard.[cite: 1]

Q2. C Language – Write short answers of the following questions.[cite: 1]

  1. Define program.[cite: 1]
  2. Who is a programmer?[cite: 1]
  3. List out two advantages or characteristics of C language.[cite: 1]
  4. What is the use of Turbo C++?[cite: 1]
  5. What is the process of linking in C programs?[cite: 1]
  6. What is the role of linker in C-language?[cite: 1]
  7. What is the purpose of linker?[cite: 1]
  8. Define structured programming.[cite: 1]
  9. What is #define directive? Give an example.[cite: 1]
  10. What is the use of main() function in C programs?[cite: 1]
  11. What do you mean by delimiters?[cite: 1]
  12. What is statement terminator?[cite: 1]
  13. State the purpose of header file.[cite: 1]
  14. What is the purpose of # sign in C?[cite: 1]
  15. What are delimiters in C language?[cite: 1]
  16. Define bug.[cite: 1]
  17. Define the term debug.[cite: 1]
  18. What are different types of errors in C programming?[cite: 1]
  19. Differentiate between syntax error and logical error.[cite: 1]
  20. Why is the logical error the most difficult error to find?[cite: 1]
  21. What is machine language?[cite: 1]
  22. What is an assembler?[cite: 1]
  23. What is a compiler?[cite: 1]
  24. Define high level language.[cite: 1]
  25. Differentiate between compiler and interpreter.[cite: 1]
  26. What is an identifier? Give an example.[cite: 1]
  27. Write the legal characters of an identifier.[cite: 1]
  28. Why is C known as a strongly typed language?[cite: 1]
  29. What do you know about C statement?[cite: 1]
  30. What are keywords?[cite: 1]
  31. Define variables.[cite: 1]
  32. Why is it important to assign a data type to a variable?[cite: 1]
  33. Differentiate between declaring and defining a variable.[cite: 1]
  34. What is variable initialization?[cite: 1]
  35. Write down two rules for declaring naming variables in C.[cite: 1]
  36. Give some examples of valid variable names.[cite: 1]
  37. Differentiate between function definition and declaration.[cite: 1]
  38. Write a statement to declare an integer variable initialized to 10.[cite: 1]
  39. How is a variable declared in C? Give an example.[cite: 1]
  40. Define constant.[cite: 1]
  41. Define character constant.[cite: 1]
  42. Differentiate between string constant and character constant.[cite: 1]
  43. Define string constants. Give two examples.[cite: 1]
  44. Define data type. Give example.[cite: 1]
  45. List three problems while working with floating point numbers.[cite: 1]
  46. Write a C statement which declares three floating point variables a, b, and c in a single line.[cite: 1]
  47. What is a relational operator?[cite: 1]
  48. What is meant by operator precedence?[cite: 1]
  49. Differentiate between unary and binary operator.[cite: 1]
  50. What is compound condition? Give an example.[cite: 1]
  51. Define logical operators.[cite: 1]
  52. How does an arithmetic overflow occur?[cite: 1]
  53. What are logical operators? Name any two.[cite: 1]
  54. Write down the names of logical operators available in C language.[cite: 1]
  55. Define expression with example.[cite: 1]
  56. What is arithmetic expression?[cite: 1]
  57. Describe single comments in C.[cite: 1]
  58. List some important functions for output.[cite: 1]
  59. Define escape sequences.[cite: 1]
  60. List four functions for input in C.[cite: 1]
  61. Define standard input.[cite: 1]
  62. Why is the ampersand (&) used in scanf function?[cite: 1]
  63. What is the use of “scanf” function? Also write its syntax.[cite: 1]
  64. Differentiate between scanf and printf functions.[cite: 1]
  65. List three names of functions used for character input.[cite: 1]
  66. Describe getch() function.[cite: 1]
  67. Compare getch and getche functions.[cite: 1]
  68. What is control structure?[cite: 1]
  69. List types of control structures.[cite: 1]
  70. Why is a default label used in switch statements?[cite: 1]
  71. Why is break statement used in a switch statement?[cite: 1]
  72. What happens if break is missed in case block?[cite: 1]
  73. Write three advantages of switch statement.[cite: 1]
  74. What is conditional operator? Write its syntax.[cite: 1]
  75. Write any two uses of loop.[cite: 1]
  76. Make a flowchart of while loop.[cite: 1]
  77. Write the purpose of continue statement.[cite: 1]
  78. Define nested loop.[cite: 1]
  79. Write the syntax of do-while loop, both for single statement and for multiple statements.
  80. Distinguish between break and continue statement used in loops.[cite: 1]
  81. What is sentinel-controlled loop?[cite: 1]
  82. Define GOTO statement.[cite: 1]
  83. Define the term function.[cite: 1]
  84. List some benefits of using functions.[cite: 1]
  85. What is the use of actual parameters?[cite: 1]
  86. What is function header?[cite: 1]
  87. Define function declaration with its syntax.[cite: 1]
  88. What is function definition?[cite: 1]
  89. Define function body.[cite: 1]
  90. What is the difference between function declaration and function header?[cite: 1]
  91. Write the use of function prototype.[cite: 1]
  92. What is meant by a function call?[cite: 1]
  93. Define local variable.[cite: 1]
  94. What is meant by scope of variable?[cite: 1]
  95. What is the lifetime of local variable?[cite: 1]
  96. Differentiate between local and global variable.[cite: 1]
  97. How long does the global variable exist in the memory?[cite: 1]
  98. Write down the scope of global variables.[cite: 1]
  99. How does a function return value?[cite: 1]
  100. Describe the purpose of file handling.[cite: 1]
  101. Define a stream.[cite: 1]
  102. Write the name of two types of stream used in files in C Language.[cite: 1]
  103. Compare binary and text stream.[cite: 1]
  104. What do you mean by text stream?[cite: 1]
  105. Define EOF marker in file.[cite: 1]
  106. What is a text file?[cite: 1]
  107. Define a pointer.[cite: 1]
  108. How is a file opened in C?[cite: 1]
  109. Why is it important to close a file?[cite: 1]
  110. How is a file closed?[cite: 1]
  111. What is file pointer?[cite: 1]
  112. What is string?[cite: 1]
  113. How string value is displayed in C language?[cite: 1]

Q3. C Language Errors & Output – Write short answers of the following questions.[cite: 1]

  1. Determine the output: if(7%3==0) printf ("Punjab"); else printf("Sindh");[cite: 1]
  2. Convert the following conditional expression into if-else statement: (x>y)?x*y:x+y;[cite: 1]
  3. What will be the output of the following? int x=10; (x%2==0) ? printf("Even") : printf("Odd");[cite: 1]
  4. Find out errors: #include <Stdio> void main () { if (50>20) then printf ("Islamic Country"); getch() }[cite: 1]
  5. Find error: int price =10; if (price!=10) price =0;[cite: 1]
  6. Find error: #include (Stdio.n); #include <conio.c> void main () { If (16>10) then printf ("%C", "Pakistan"); getch(); }[cite: 1]
  7. Find error from the following: int y;z; if (y==z) printf ("yes")[cite: 1]
  8. Trace the output: void main () { int marks; printf ("\n enter your marks"); scanf ("%d", & marks); if (marks>=40) printf ("\n congratulation"); }[cite: 1]
  9. Find error in the following segment: float y 3.14; if (Y==3) printf ("Errors");[cite: 1]
  10. Trace the error: Int a;b; a=10, b=5 if (a<b) printf ("\n A is less than b");[cite: 1]
  11. 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]
  12. What will be output of the following? int x=5, y=10; if (x>y) y=2;[cite: 1]
  13. 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]
  14. 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]
  15. Find output from the following: int price =19; if (price!=10) printf ("price");[cite: 1]
  16. What is the error in the following code? Int x=10, y=20; If (x>10&y<30) printf ("%d", x+y);[cite: 1]
  17. Trace error: void main () { int a=2 if (a==1) printf ("ok"); else printf ("cancel"); getch(); }[cite: 1]
  18. Find output of the following code: int a=1, b=6; if (a+b<7); { printf ("%d", a); } else { printf ("%d", b); }[cite: 1]
  19. Trace errors from the following code: if (7!=10 printf ("hello"); else-do printf("welcome");[cite: 1]
  20. 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]
  21. 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]
  22. 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]
  23. 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]
  24. Convert the following loop code into while loop: for (i=10; i>0; i--) { printf (",i=%d",i); }[cite: 1]
  25. Rewrite the following code using do-while loop: int x=10; while (x>=1) { printf ("%d", x %2); x--; }[cite: 1]
  26. Convert the following code in for loop: int n=1; while (n<=10); { printf("%d\n",n); n++; }[cite: 1]
(Note: Q3 includes selected critical tracing, loops, and condition-based error questions formatted from the original document for clarity)[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.

Leave a Comment