/123 0 votes, 0 avg 0 Rawalpindi Board 2nd year Computer Science all past papers MCQS.Rawalpindi Board 2nd year Computer Science all past papers MCQS. 1 / 123 1. Which keyword is not used in switch statement: a) default b) switch c) case d) if 2 / 123 2. Conditional operator takes : a) two operands b) three operands c) four operands d) one operands 3 / 123 3. The process of converting source code into object code is know as: a) saving b) linking c) compiling d) executing 4 / 123 4. Which data type is used to define a field that consist of only number to be used in calculations?: a) memo b) date\time c) number d) text 5 / 123 5. The format specifier %f is used for: a) double b) int c) long d) float 6 / 123 6. While loop is also called: a) nested loop b) counter loop c) wend loop d) conditional loop 7 / 123 7. The foreign key is found in: a) index table b) parent table c) pivot table d) dependent table 8 / 123 8. If x=2 and y=3 , what will be the output of the expression :x>y?x+y:x*y; a) 6 b) 12 c) 7 d) 9 9 / 123 9. The “exe” file in visual basic is produced by: a) compiler b) linker c) interpreter d) loader 10 / 123 10. In an E_R diagram , a rectangle represent: a) attribute b) relationship c) entity d) none 11 / 123 11. The default size of a text data type field is: a) 50 b) 2 c) 5 d) 20 12 / 123 12. Each separate piece of information stored in a record is called: a) table b) field c) relation d) form 13 / 123 13. The output of compiler is: a) source code b) library code c) linked code d) object code 14 / 123 14. Which of the fallowing function is used to copy a string to an array of characters: a) strpcy b) strcp c) sopy d) strcpy 15 / 123 15. Which file is used to store information that remain constant for a long time: a) transaction file b) data file c) backup file d) master file 16 / 123 16. Which of the following is a one -to-many relations : a) person-date of birth b) mother -daughter c) Country-capital d) field 17 / 123 17. which of the follwing is used to associate entities with one another: a) relationship b) object c) identifier d) attribute 18 / 123 18. The example of popular DBMS is : a) MS-execl b) MS_word c) MS-power point d) MS-acess 19 / 123 19. In which loop , statement terminators is a part of its syntax: a) for b) DO-while c) for-each d) while 20 / 123 20. In relational database a table is also called: a) file b) tuple c) relation d) schema 21 / 123 21. A funtion can return ________ value: a) 3 b) 2 c) 4 d) 1 22 / 123 22. The column of a table is know as: a) table b) record c) cell d) field 23 / 123 23. Which statment is used to move the control to the start of loop body: a) default b) continue c) break d) switch 24 / 123 24. What is the value of ‘X’ after executing the following code? for(x=1;x<=7;x++) a) 4 b) 8 c) 7 d) 5 25 / 123 25. A file is stored in : a) hard disk b) cache c) RAM d) ROM 26 / 123 26. A database consist of various components called: a) objects b) tools c) entities d) properties 27 / 123 27. What is the variable that is used by function to receive an argument: a) constant b) expression c) funtion d) parameter 28 / 123 28. In if statement, true is represented by: a) 2 b) 3 c) 1 d) 0 29 / 123 29. One execution of a loop is know as a(n): a) iteration b) test c) cycle d) duration 30 / 123 30. Which of the fallowing is valid character constant: a) a b) = c) ‘@’ d) "c" 31 / 123 31. Another term for conditional operator: a) binary b) iteration c) byte d) ternary 32 / 123 32. Which operation is performed by relational operator: a) addition b) subtraction c) comparison d) division 33 / 123 33. Which mode open only an existing file for both reading and writing: a) "r+" b) "w" c) "a" d) "w+" 34 / 123 34. In 2nf , which form of dependency is removed: a) non-functional b) transitive c) partial d) associative 35 / 123 35. A constraint between two attributes is called: a) functional dependency b) functional relation c) relation constraint d) attribute dependency 36 / 123 36. The extension of a header file is: a) .txt b) .hf c) .h d) .c 37 / 123 37. A loop with in a loop is called: a) complex loop b) infinite loop c) running loop d) nested loop 38 / 123 38. Conditional operator is an alternative of: a) for-each b) do-while c) if_else d) for 39 / 123 39. Relational operator allow you to _________ numbers: a) multiply b) compare c) divide 40 / 123 40. The fopen() funtion used_________ parameters? a) 2 b) 5 c) 4 d) 1 41 / 123 41. The loop which never end is called: a) infinite loop b) continuous loop c) nested loop d) running loop 42 / 123 42. Which of the following function is used to write a character to a file: a) fgets() b) putc() c) getc() d) fputs() 43 / 123 43. Duplicate data in multiple data files is called: a) data redundancy b) data consistency c) data integrity d) program dependency 44 / 123 44. Which programming structure executes program statements in order: a) relation b) decision c) repetition d) sequence 45 / 123 45. The first line of funtion defination is know as: a) funtion header b) return type c) funtion body d) arguments 46 / 123 46. The process of arranging data in a logical sequence is called: a) sorting b) classifyimg c) summarizing d) data capturing 47 / 123 47. What is the final value of I after executing the code : for(int i=1;i<=5;i+=2) a) 5 b) 9 c) 6 d) 7 48 / 123 48. A virtual table that is constructed from the other table is called: a) report b) tuple c) view d) table 49 / 123 49. Different attributes in two different tables having same name are called: a) mutually exclusives b) synonym c) homonym d) acronym 50 / 123 50. The output of a query is in the form of a: a) table b) macro c) form d) query 51 / 123 51. Which form of dependency is removed in 3NF: a) transitive b) partial c) functional d) associative 52 / 123 52. The number of bytes used by int data type in c is : a) 3 b) 2 c) 8 d) 5 53 / 123 53. Function used for I/O are stored in: a) inout.h b) math.h c) conio.h d) stdio.h 54 / 123 54. The programming structure used for a computer making decision is: a) selection b) iteration c) repetition d) sequential 55 / 123 55. A funtion does not return any value has return type a) int b) nothing c) void d) float 56 / 123 56. Which of the following format specifier is used for character data type? a) %D b) %c c) %e d) %s 57 / 123 57. Which of the fallowing escape sequence can be used to begin a new line in c? a) \m b) \n c) \b d) \a 58 / 123 58. Microsoft access save the database with the extension: a) .mxls b) .mdb c) .madb d) .msdb 59 / 123 59. The smallest meaning full unit of data in a database is called: a) byte b) field c) record d) character 60 / 123 60. In visual basic variable cannot contain: a) letter b) number c) period d) underscore 61 / 123 61. A record may be based on : a) field b) byte c) table d) bits 62 / 123 62. Which is numeric data type with decimal point: a) long b) int c) char d) float 63 / 123 63. A table is a two dimensional structure that consist of: a) interaction of b) matrix element c) rows and column d) x and y co-ordinate 64 / 123 64. Which of follwing is not a loop structure in c: a) do-while b) for c) while d) condition 65 / 123 65. In c,the maximum length of variable name is: a) 25 b) 31 c) 255 d) 55 66 / 123 66. In which loop condition comes after the body of loop: a) DO-while loop b) while loop c) nested loop d) for loop 67 / 123 67. Which form property will put text into title bar of the form: a) header b) title c) text d) boarder text 68 / 123 68. stdio stand for: a) standard input output b) simple input output c) start input output d) string input output 69 / 123 69. How many types of loop structure are in C -language? a) 1 b) 4 c) 2 d) 3 70 / 123 70. Relational operator allow you to: a) compare b) add c) multiply d) divide 71 / 123 71. Formal arguments are also called: a) original arguments b) dummy arguments c) actual arguments d) referenced arguments 72 / 123 72. Global variable are created in: a) ROM b) hard disk c) cache d) RAM 73 / 123 73. The case block ends with: a) case else b) end select c) break d) end case 74 / 123 74. In switch statement , the case block ends with: a) stop b) abort c) end d) break 75 / 123 75. A set of related files created and managed by a DBMS is called: a) record b) module c) database d) field 76 / 123 76. ____ is a loop statement: a) for b) switch c) if else d) if 77 / 123 77. The graphical query tool is know as : a) design form b) query form c) design grid d) query grid 78 / 123 78. Which function is used to display output on screen in C-language? a) scanf() b) printf() c) print() d) gets() 79 / 123 79. The data or information that describes an entity is called : a) data item b) record c) attribute d) tuple 80 / 123 80. In relation database, a single piece if information is called: a) entity b) table c) attribute d) records 81 / 123 81. _______ form of dependency removed in 3nf: a) partial b) transitive c) functional d) non functional 82 / 123 82. Which of the fallowing may be temporary file: a) office file b) backup file c) transaction file d) master file 83 / 123 83. The extension of image file is: a) .exl b) .doc c) .ppt d) .bmp 84 / 123 84. Which form of dependency removed in 2nf? a) partial b) transitive c) functional d) associative 85 / 123 85. which of the fallowing is used to associate entries with one another: a) relationship b) entity c) identifier d) attribute 86 / 123 86. Which statement is used for making two decision a) while b) nested -if c) if d) if-else 87 / 123 87. The maximum length of a text type field in MS-excess is: a) 50 b) 255 c) 250 d) 155 88 / 123 88. A person name ,birthday and social security number are example of: a) descriptors b) attribute c) relationship d) entities 89 / 123 89. Which loop structure always executes at least once? a) DO-while b) while wend c) while d) for 90 / 123 90. One execution of a loop is know as(n): a) cycling b) duration c) iteration d) test 91 / 123 91. In the statement FILE*FT, the*represents to: a) multiplication b) parameter c) pointer d) variable 92 / 123 92. _______ is not a database object: a) query b) table c) MS word d) report 93 / 123 93. Variables and constant name cannot contain a(n): a) underscore b) letter c) number d) period 94 / 123 94. In 3nf ,a non key attribute must not depend on a: a) Non-key attribute b) sort key c) key attribute d) composite key 95 / 123 95. Which is a loop stunt: a) for b) if else c) if d) switch 96 / 123 96. The”.exe” file is produced by: a) loader b) compiler c) interpreter d) linker 97 / 123 97. In if statement false is represented by: a) 0 b) 2 c) 3 d) 4 98 / 123 98. In E-R diagram a rectangle represents: a) relationship b) record c) attribute d) entity 99 / 123 99. Which of the fallowing is used associate entities with one another: a) relationship b) entity c) relation d) attribute 100 / 123 100. a+=b is equal to: a) a=a+b b) b=b+a c) b+=a d) a=+b 101 / 123 101. A built-in function: a) cannot be redefined b) exit do c) end while d) can be redefined 102 / 123 102. 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-" 103 / 123 103. A primary key that consists of more than one attribute is called: a) multi valued key b) global key c) foreign key d) composite key 104 / 123 104. The data type in C that can handle fractional values is called: a) float b) int c) char d) long 105 / 123 105. The extension of C source program is: a) .C b) .h c) .obj d) .exe 106 / 123 106. In MS access ,table contains: a) records b) character c) file d) field 107 / 123 107. Which data type is the default data type: a) auto number b) memo c) text d) number 108 / 123 108. A form within another form is called: a) design grid b) query form c) design form d) query grid 109 / 123 109. Which function is used write character to a file: a) fgets() b) fputc() c) fscan() d) frintf() 110 / 123 110. The target code produce by the compiler is: a) library code b) source code c) linked code d) object code 111 / 123 111. int is a____ in c? a) cut word b) first word c) keyword d) special word 112 / 123 112. A memory location with some data that can be changed is called: a) named constant b) constant c) variable d) address 113 / 123 113. The lowest level of programming is called: a) Fortran b) pascal c) java d) assembly language 114 / 123 114. An array script should be: a) int b) float c) an array d) double 115 / 123 115. Switch statement is an alternative of: a) while loop b) nested loop c) do_while loop d) for loop 116 / 123 116. Multiples copies of the same data is referred to as: a) data integrity b) data isolation c) data redundancy d) data inconsistency 117 / 123 117. Format specifier is started with symbol: a) % b) * c) & d) ? 118 / 123 118. The manipulated and processed data is called: a) data b) information c) knowledge d) object 119 / 123 119. Merging the relation is also know as: a) view integration b) view relations c) view tables d) view entities 120 / 123 120. A logical group of character is a: a) table b) field c) file d) record 121 / 123 121. An attribute is also know as: a) entity b) field c) relation d) record 122 / 123 122. In counter loop it is important to declare________ and counter variable : a) size b) identify c) initialize d) specify 123 / 123 123. The output of compiler is called: a) source code b) linked code c) object code d) library code Your score is LinkedIn Facebook Twitter VKontakte 0% Restart quiz Send feedback Rawalpindi Board 2nd year Computer Science Chapter 1/57 0 votes, 0 avg 0 Created on February 18, 2022 By adminRwp_2nd_cs_1Rawalpindi Board 2nd year Computer Science Chapter 1 1 / 57 1. Manipulation of data to achieve the required objectives and result is called a) Data manipulation b) Operation c) None d) Data manipulation and operation 2 / 57 2. A collection of related fields is called: a) Record b) Database c) File d) Character 3 / 57 3. A collection of data that consists of name, address and email of a person is called: a) Field b) Byte c) Character d) Record 4 / 57 4. A record in a database is the information refers to: a) Event b) Person c) All d) Product 5 / 57 5. A logical grouping of character is a a) field b) all c) file d) record 6 / 57 6. A field is to a record as a) files are to table b) attribute are to columns c) data are to file d) A column is to a row 7 / 57 7. a database containing all students in a class would store basic data of students in a) field b) file c) cell d) record 8 / 57 8. A data base containing all students in a class would store the information of individual students in a) file b) field c) cell d) record 9 / 57 9. Which of the following is also known as data set a) file b) field c) module d) record 10 / 57 10. A set of related files created and manage by a (DBMS) is called a) field b) record c) module d) database 11 / 57 11. Which of the following is an example of a database a) library management system b) college management system c) account & inventory system d) all 12 / 57 12. Which of the following used to describe the structure of a database a) data warehouse b) data model c) data structure d) data type 13 / 57 13. Which of the following data model is more flexible a) a and b b) relational model c) network model d) hierarchical model 14 / 57 14. Which of the following type of file require largest processing time a) sequential file b) direct access file c) indexed sequential file d) random file 15 / 57 15. Which of the following may be a temporary file? a) transaction file b) master file c) none d) backup file 16 / 57 16. SQL is a(n) a) Un structured language b) object oriented language c) all d) Structured language 17 / 57 17. SQL stands for a) Seek Query Language b) Self Query Language c) Sort Query Language d) Structured Query Language 18 / 57 18. SQL can be used to a) query database data only b) all c) create database structures only d) modify database data only 19 / 57 19. The type of files from functional point of view include a) program file b) both a and b c) none d) data file 20 / 57 20. Which file is used to store information that remains constant for a long time a) backup file b) master file c) none d) transaction file 21 / 57 21. Which of the following file is used to store additional copy of data a) transaction file b) master file c) backup file d) none 22 / 57 22. Which of the following file consist the software instructions a) data file b) none c) both a and b d) program file 23 / 57 23. The extension of program file is a) .com b) none c) .exe d) .exe and .com both 24 / 57 24. Which of the following is an image file extension a) all b) .jpg c) .tif d) .bmp 25 / 57 25. The extension for a video file is a) .avi b) .avi and .mpg c) .mpg d) .txt 26 / 57 26. The  extension of audio files is a) .wav and .mid b) .mid c) txt d) .doc 27 / 57 27. The file name and the extension are separated by a a) semicolon b) dot c) slash d) colon 28 / 57 28. In “‘program.txt” , ‘txt” is the: a) file name b) extension c) file location d) directory 29 / 57 29. Word processor can save documents using the following extensions EXCEPT a) rtf b) doc c) mdb d) txt 30 / 57 30. The type of files from storage point of view include: a) ALL b) sequential file c) indexed sequential file d) direct or random file 31 / 57 31. The problem synonym occurs in: a) Indexed sequential files b) Sequential files c) Direct or random files d) None 32 / 57 32. The process in which the contents are accessed in a sequence is called: a) Record Access b) Random Access c) Read only Access d) Sequential Access 33 / 57 33. A database is an organized collection of related data a) logically b) physically c) badly d) loosely 34 / 57 34. The objectives of database management systems include: a) Data Integration b) Availability c) Database Integrity d) All 35 / 57 35. The most commonly used database model in current database development is: a) Network b) Relational c) Hierarchical d) Object-oriented 36 / 57 36. Which of the following data model has general shape of an organization chart? a) Relational Model b) Object Model c) Network Model d) Hierarchical Model 37 / 57 37. Which data models creates parent-child relationships B/T data elements and restricts each child? a) Object data model b) Relational data model c) Network data model d) Hierarchical data model 38 / 57 38. Which data models creates parent-child relationships b/t data elements and have more than 2parents a) Object data model b) Hierarchical data model c) Network data model d) Relational data model 39 / 57 39. Information sharing means that: a) Neither a nor b b) The same information can be shared by different applications c) Information can be stored once and retrieved any number of times d) Both a and b 40 / 57 40. A program whose job is to store and retrieve user data in the database is called: a) Database Management System b) Data Business Model System c) Data Business Management Service d) Database Modeling System 41 / 57 41. The database system is composed of four major parts: a) Software, You, Me, DBA, Client b) DBMS, Hardware, User, Programmer, Engineer c) Hardware, Software, People and Data d) Hardware, Hard drive, Monitor, Data, User 42 / 57 42. Data that causes inconsistency lacks: a) Data anomaly b) Good data c) Data integrity d) Data redundancy 43 / 57 43. In a database processing system: a) The DBMS accesses the database data b) The database application(s) access the database data c) a and c d) The database application(s) interact with the DBMS 44 / 57 44. Which one of the following is an advantage of database management approach? a) Programs are independent of data format b) Reduced security and the control of data c) Increased duplication of data d) all 45 / 57 45. DBMS stands for: a) Database Modeling System b) Database Management System c) Data Business Model System d) Data Business Management Service 46 / 57 46. Which of the following is NOT an advantage of database systems? a) Backup /Recovery b) Redundant data c) Better data quality d) Data independence 47 / 57 47. Which of the following enables user to modify data without affecting existing program that use them a) Data relationships b) Data independence c) Data integration d) Data dependence 48 / 57 48. Database application contain procedures for: a) Deleting records b) Processing queries c) all d) Adding records 49 / 57 49. Which of the following is related to a component of database system? a) End users b) Database administrator c) All d) Application programmer 50 / 57 50. Which of the following database models is often referred to as an Inverted Tree? a) Network b) Object-oriented c) Hierarchical d) Relational 51 / 57 51. The major component of DBMS is called a) Data Manager b) Database Manager c) All d) File Manager 52 / 57 52. Duplicate data in multiple data file is: a) Data multiplication b) Data redundancy c) None d) Data intergrity 53 / 57 53. The description of structure and organization of data in a database is contained in: a) data dictionary b) data store c) data mine d) structure query language 54 / 57 54. A request for information from a database in database terminology is called a) Query b) Report c) Table d) Letter 55 / 57 55. A printed or on screen display of data or information in the database is called an: a) Entity b) Query c) Report d) Screen 56 / 57 56. The name for the software to build reports that summarize data from a database is: a) Reporter b) Report Generator c) Report Builder d) Report Writer 57 / 57 57. Which of the following is not a database management system a) excel b) MS Access c) SQL server d) Oracle Your score is LinkedIn Facebook Twitter VKontakte 0% Restart quiz Send feedback Rawalpindi Board 2nd year Computer Science Chapter 2/37 0 votes, 0 avg 1 Rwp_2nd_cs_2Rawalpindi Board 2nd year Computer Science Chapter 2 1 / 37 1. DBA stands for: a) Database Administrator b) Database authority c) Database Application d) Data basic Administration 2 / 37 2. A key strictly used for data retrieval purposes is called: a) Candidate key b) Secondary key c) Composite key d) Primary key 3 / 37 3. Who is responsible to design, implement and maintain a databases? a) Web designer b) Database administrator c) End user d) Application programmer 4 / 37 4. A table in which the foreign key is found is called: a) All b) View c) Parent table d) Dependent table 5 / 37 5. Which of the following is also known as control key? a) Composite key b) Primary key c) Candidate key d) Sort key 6 / 37 6. A primary key that consists of more than one attribute is called a) Composite key b) Foreign key c) Global Key d) Multivalued key 7 / 37 7. An attribute in relation used as the primary key of another relation in the same database is called a) Logic Key b) Global key c) Link key d) Foreign key 8 / 37 8. A candidate key is: a) Primary key b) An attribute or group of attributes that can be the primary key c) The primary key selected to be the key of a relation d) All 9 / 37 9. Which field is the most appropriate primary key? a) Name b) Address c) NIC Number d) Birth Date 10 / 37 10. Which of the following can be a primary key a) Region b) Customer ID c) Last name d) Salary 11 / 37 11. How many primary keys can a table have? a) 1 or 2 b) 1 c) any d) 1 to 5 12 / 37 12. Which of the following is NOT a good primary key? a) Student ID number b) Zip code c) Order number d) Social security number 13 / 37 13. Which of the following describes the primary key? a) All of the above b) It helps in indexing of a large database c) It must be unique d) It makes sorting quicker 14 / 37 14. A key is: a) none of these b) the first field of a relation c) the last field of a relation d) the most important field in a record 15 / 37 15. Which of the following are properties of relations? a) Each attribute has a unique name b) No two rows in a relation are identical c) All of the above d) There are no multivalued attributes in a relation 16 / 37 16. An index can used to: a) Reduce data dependency for application programs b) Improve the performance of the database c) Document the structure of the database d) All 17 / 37 17. Which of the following is NOT a characteristic of relations? a) Columns are all elemental or atomic b) The order of rows is insignificant c) The order of columns is significant d) Each row is unique 18 / 37 18. The data or information that describes an entity is called: a) Data item b) Tuple c) Attribute d) Data item 19 / 37 19. A person, place, thing or event about which data is kept in the database is called a) Record b) Attribute c) Entity d) Field 20 / 37 20. A row of a relation is called: a) Attribute b) Tuple c) a and c d) Tuple 21 / 37 21. A relation is also known as: a) Tuple b) Table c) Attribute d) Relationship 22 / 37 22. An attribute is also known as a: a) Table b) Row c) Field d) Relation 23 / 37 23. A table is a two-dimensional structure that consists of: a) Intersection of data b) Rows and columns c) x and y co-ordinates d) Matrix elements 24 / 37 24. A two-dimensional table of data is called: a) Group b) Set c) Relation d) Module 25 / 37 25. A table should have: a) Primary key b) Composite key c) Sort key d) Secondary key 26 / 37 26. The foreign key is found in: a) Dependent table b) Parent table c) Pivot table d) Index table 27 / 37 27. The Columns of a table correspond to a) Field b) Cell c) Record d) Table 28 / 37 28. SQL is used for: a) Data definition b) Data manipulation c) All d) Data control 29 / 37 29. CREATE command is used to create: a) Report b) View c) Record d) Query 30 / 37 30. A virtual table that is constructed from other tables is called: a) View b) Relation c) Table d) Tuple 31 / 37 31. The number of characters in fixed-length field is a) 10 b) Variable c) Constant d) 100 32 / 37 32. The views are used: a) All of the above b) To hide complex SQL statements c) To hide rows d) To hide columns 33 / 37 33. Views are also called: a) Complex tables b) Virtual tables c) Actual Tables d) Simple tables 34 / 37 34. The SQL statement to create a view is: a) SELECT VIEW b) MAKE VIEWS c) INSERT VIEW d) CREATE VIEW 35 / 37 35. All the intersection of rows and columns must have: a) Multiple values b) Constant value c) No value d) Single value 36 / 37 36. The rows of a relation can be of order. a) Sorted b) Any c) Sorted d) Same 37 / 37 37. Insert command is used to insert: a) View b) New table c) Dependencies d) New record Your score is LinkedIn Facebook Twitter VKontakte 0% Restart quiz Send feedback