Summary

This document contains a series of one mark multiple choice questions on various aspects of 12th grade computer science, particularly Python programming.

Full Transcript

**12th MCQs** 1\. State True or False. The default extension of a python file is.py.**TRUE** 2\. In a Python program, a control structure: 3\. Which one of the following is a valid Python if statement: **(A) if x\>=9:** (C) if (x =\> 9) (B) if x \>9) (D) if x\>=9 4\. Which of the following is/...

**12th MCQs** 1\. State True or False. The default extension of a python file is.py.**TRUE** 2\. In a Python program, a control structure: 3\. Which one of the following is a valid Python if statement: **(A) if x\>=9:** (C) if (x =\> 9) (B) if x \>9) (D) if x\>=9 4\. Which of the following is/are compile time errors? \(A) Syntax error (**C) (A) and (B) both** (B) Semantic error (D) None of these 5\. Given a tuple tup1= (10, 20, 30, 40, 50, 60, 70, 80, 90). What will be the output of print (tup1 \[3:7:2\])? \(A) (40,50,60,70,80) (B) (40,50,60,70) (C) \[40,60\] **(D) (4060)** 6\. What will be the output of this expression? \'p\'+\'q\' **(A) pq** (B) rs (C) pqrs (D) pq12 7\. **Fill in the blank**For a function header as follows: def Calc(X, Y=20): \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_call statement will give an Error ? \(A) Calc(15,25) (B) Calc(X=15,Y=25) **(C) Calc(Y=25)** (D) Calc(X=25) 8\. Which command is used to change some values in existing rows? **(A) UPDATE** (B) INSERT (C) ALTER (D) ORDER 9\. Find the invalid identifier from the following \(A) name **(B) break** (C) section (D) mark12 10.**Fill in the blank:**A RDBMS must comply with at least\_\_\_\_\_\_\_\_\_\_\_rules. (A) 4 (B) 5 **(C) 6** (D) 7 D11. Which of the following is not a correct Python statement to open a text file \"Notes.txt\" to write content into it? \(A) F= open('Notes.txt\', \'w\') (B) F= open('Notes.txt\', \'a') **(C) F= open(\'Notes.txt\', \'A\')** \(D) F= open(\'Notes.txt\', \'w+') 12\. Consider the following statement: SELECT \* FROM product ORDER BY rate\_\_\_\_\_\_\_,item\_name\_\_\_\_\_\_\_\_. Which of the following option should be used to display the \'rate' from greater to smaller and \'name\' in alphabetical order? \(A) ASC, DESC **(B) DESC, ASC** (D) Ascending, Descending (C) Descending, Ascending 13\. Fill in the blank:A network with all client computers and no server is called\_\_\_\_\_\_\_\_\_\_. \(A) Networking **(B) Peer to Peer network** (C) Client Server network (D) Any of them 14\. Name the module that implements binary protocols for serializing and de-serializing a Python object structure. **(A) pickle module** (B) unpickle module (C) math module (D) random module 15\. Mandatory arguments required to connect any database from Python \(A) Username, Password, Hostname, Database Name, Port. \(B) Username, Password, Hostname. **(C) Username, Password, Hostname, Database Name**. \(D) Username, Password, Hostname, Port. 16\. Which method of cursor class is used to fetch limited rows from the table? \(A) cursor.fetchsize(SIZE) **(B) cursor fetchmany(SIZE)** (C) cursor.fetchall(SIZE) \(D) cursor fetchonly(SIZE) **Assertion and Reason:** In the following questions, A statement of Assertion (A) is followed by a statement of Reason (R). Mark the correct choice as. \(A) Both A and R are true and R is the correct explanation of A. \(B) Both A and R are true and R is not correct explanation of A. \(C) A is true but R is false \(D) A is false but R is true. 17\. Assertion (A): A function is a block of organized and reusable code that is used to perform a single, related action. Reason (R): Function provides better modularity for your application and a high degree of code reusability. **ANS:A** 18\. Assertion (A): Text file stores information in ASCII or unicode characters. Reason (R): In text file, there is no delimiter for a line. **ANS:C** 19\. State True or False. \'in\' is a logical operator in Python.**FALSE** 20\. Which of the following is not a decision-making or selection statement? \(A) if-elif statement **B)for statement** (C) if-else statement D)if statement 21\. The for loop in Python is an\_\_\_\_\_\_\_\_\_\_\_\_ **(A) Entry Controlled Loop** (B)Exit Controlled Loop (C) Both of the above (D) None of the above 22\. What is the output when the following code is executed? print(\"\\nhello\") \(A) a new line and hello (C) the letter r and then hello (**B)\\nhello** (D)Error 23\. Which type of bracket is used to define a list? **(A) \[\]** (B) () (C) {} (D)\ 24\. What do we call a function defined inside a class? \(A) Keyword arguments (B)Class (C) Another function **(D)Method** 25.\_\_\_\_\_\_\_\_\_\_\_\_\_\_are also known as positional arguments. (A)Keyword arguments (B) Default arguments **(C) Required arguments** (D) Variable length arguments 26\) A relational database is a collection of\_\_\_\_\_\_\_\_\_\_\_\_\_\_ \(A) Attributes **(B)Tables** (C) Records (D)Fields 27\. Which of the following options is the correct for the tell() of a file object? \(A) It places the file pointer at a desired offset in a file \(B) It returns the entire content of a file **(C) It returns the byte position of the file pointer as an integer** \(D) It tells the details about the file 28.A field of a table is termed as\_\_\_\_\_\_\_\_\_\_\_\_ \(A) Row **(B)Attribute** (C) Key (D) Tuple 29.How can you separate the content in a text file? \(A) whitespace (B)tab (C) comma **(D)All of these** 30.\_\_\_\_\_\_\_\_\_\_\_\_\_\_is not an aggregate function. \(A) AVG (B)MAX **(C) JOIN** (D) COUNT 31.switching technique follows the store and forward mechanism \(A) Circuit **B) Message** (C) Packet (D) All of these 32\. In the following list, which item has the index number of 3? \[\"John\", \"Harry\", \"Jesse\", \"John\", \"Harry\", \"Harry\"\] **(A) \"John\"** (B)\"Harry\" (C) \"Jesse\" (D)\"None of these\" 33\. Which method of cursor class is used to execute database function or stored procedure in Python? \(A) cursor.callprocedure(procedurename\', \[parameters,\]) **(B) cursor.callproc(procedurename\', \[parameters,\])** \(C) cursor.callfunc(procedurename\', \[parameters,\]) \(D) cursor.c allfunction(procedurename\', \[parameters,\])34.\_\_\_\_\_\_\_\_\_\_\_\_\_is the set of records that are retrieved after execution of SQL query over an established database connection. \(A) sqlresult **(B)resultset** (C) table (D) tuple Assertion and Reason: In the following questions, A statement of Assertion (A) is followed by a statement of Reason (R). Mark the correct choice as. \(A) Both A and R are true and R is the correct explanation of A. **(B) Both A and R are true and R is not correct explanation of A.** \(C) A is true but R is false. **(D) A is false but R is true.** 35\. Assertion (A): Interactive mode allows execution of individual statement instantaneously. Reason (R): Script mode allows us to write more than one instruction in a file called Python source code file that can be executed. 36\. Assertion (A): The while statement executes a block of code repeatedly as long as the control condition of Reason (R): If the condition of the while loop is initially false, the body is not executed even once. 37\. State True or False.:\*\*is a valid arithmetic operator in Python.**TRUE** 38\. Which of the following is an invalid variable? \(A) my\_string\_1 **(B) 1st\_string** (C) foo (D) A 39\. In Python,\...\.... defines a block of statements. \(A) Block (B) loop **(C) indentation** (D) {} 40\. Using a wrong formula for calculation generates a \(A) Syntax error (B) Semantic error **(C) Logical error** (D) Runtime error 41\. Division by zero is an example of \...\...\...\...\...\... **(A) Run time erro**r (B) Compile time error (C) Syntax error (D) All of these 42\. Consider a declaration L = (1, Python\', \`3.14\'). Which of the following represents the data type of L? \(A) list **(B) tuple** (C) dictionary (D) string 43\. Fill in the blank:\_\_\_\_\_\_\_\_\_\_\_\_\_\_operator cannot be used with string data type \(A) + (B) in (C) \* **(D) /** 44\. Which of the following function gives the total number of rows in a given column or expression? \(A) SUM() **(B) COUNT()** (C) TOTAL (D) Both (A) and (B) 45\. Which keyword is used to define function? **(A) def** (B) fun (C) definition (D) function 46\. Fill in the blank:\_\_\_\_\_\_refers to the attribute that can uniquely identify tuples within the relation. \(A) Foreign key (B) Consolidate key (C) Alternate Key **(D) Primary key** 47\. Which of the following is the default character for the newline parameter for a csv file object opened in write mode in Python IDLE? **(A) \\n** (B)\\t (C) , (D); 48\. Fill in the blank\_\_\_\_\_\_\_\_\_To get all the records from the result set, you may use \(A) cursor.fetchmany() **(B) cursor.fetchall()** (C) select from \ (D) cursorexecute() 49\. Fill in the blank: The function of a repeater is to take a weak and corrupted signal and \_\_\_\_\_\_\_\_\_\_\_it. \(A) restore **(B) regenerate** (C) amplify (D) reroute 50\. The data structure required to check whether an expression contains balanced parenthesis is **(A) Stack** (B) Queue (C) Array (D) Tree 51\. Which of the following is invalid method for fetching the records from a database in Python? \(A) fetchone() (B) fetchmany() (C) fetchall() **(D) fetchmulti()** 52\. Which function is used with ORDER BY clause to custom sort order? \(A) ASC (B) DESC **(C) FIELD** (D) None of these Assertion and Reason: In the following questions, A statement of Assertion (A) is followed by a statement of Reason (R). Mark the correct choice as. \(A) Both A and R are true and R is the correct explanation of A. \(B) Both A and R are true and R is not correct explanation of A. \(C) A is true but R is false. \(D) A is false but R is true**.** 53\. Assertion (A): Strings in Python are mutable.Reason (R): The first character has the index 0 and the last character has the index n-1 where n is the l ength the string, **ANS:** **D** 54\. Assertion (A): Joining two lists is just like adding two strings.Reason (R): The concatenation operator + is used to add two strings **ANS:A** 55\. State True or False. 2ndNAme is an invalid identifier in Python**TRUE** 53\. Which of the following is a valid arithmetic operator in Python? **(A) //** (B) ? (C) \< (D) and 54\. Which of the following commands is not a data manipulation language? \(A) SELECT (B) INSERT (C) UPDATE **(D) ALTER** 55\. Which type of error occurs when rules of programming language are misused? **(A) Syntax error** (B) Semantic error (C) Run time error (D) Logical error 56\. Consider a declaration T = \[1, \`Python\', \`3.14\'\]. Which of the following represents the data type of T? **(A) list** (B) tuple (C) dictionary (D) string 57\. What will be the output of the following code? L = \[\'a\',\'b\',\'c\',\'d\'\] print (\"\".join(L)) \(A) Error **(B) abcd** (C) \[\'a\', \'b\',\'c\', \'d\'\] (D) None of these 58\. Fill in the blank:\_\_\_\_\_\_\_\_\_\_\_\_The valid sequence type of L is where L= \[\'Mon\', \'23\', \'hello\', \'60.5\'\] \(A) dictionary (B) string (C) tuple **(D) list** 59\. Which of the following is not a comparison query? \(A) IN (B) BETWEEN (C) LIKE **(D) AND** 60\. Stdout, stdin snd stderr are\_\_\_\_\_\_\_\_\_ \(A) Structure (B) File pointer (C) File descriptors **(D) Streams** 61\. Fill in the blank:\_\_\_\_\_\_function returns the sum of values of a column of numeric type \(A) TOTAL () (B) ADD () **(C) SUM()** (D) All of these 62\. Which function helps us to randomize the items of a list? \(A) **shuffle()** (B) mean() (C) choice() (d) max() 63\. Fill in the blank:\_\_\_\_\_\_is used to get the row-id of the last modified row? **(A) cursor.getrwid** (B) cursor.endrwid (C) cursor.batrowid (D) cursor.exitrowid 64\. Fill in the blank:Bluetooth is an example of\_\_\_\_\_\_ **(A) personal area network** (B) local area network (C) virtual private network (D) wide area network 65\. What is the output of \"hello\" +1+2+3? \(A) hello123 (B) hello **(C) Error** (D) hello6 66\. Which method of cursor class is used to insert or update multiple rows using a single query? \(A) cursor.executeall(query, rows) (B) cursor.execute(query, rows) \(C) cursor.executemultiple (query, rows) **(D) cursor.executemany(query, rows)** 67\. The\_\_\_\_\_\_\_\_clause places condition with aggregate functions. **(A) HAVING** (B) WHERE (C) IN (D) BETWEEN Assertion and Reason: In the following questions, A statement of Assertion (A) is followed by a statement of Reason (R). Mark the correct choice as. \(A) Both A and R are true and R is the correct explanation of A. \(B) Both A and R are true and R is not correct explanation of A. \(C) A is true but R is false. \(D) A is false but R is true. 68\. Assertion (A): Higher precedence operator is evaluated before the lower precedence operator Reason (R): For operators with equal precedence, the expression is evaluated from right to left. **ANS:C** 69\. Assertion (A): CSV stands for comma separated value. Reason (R): CSV files are a common file format for transferring and storing data**.** **ANS:B** 70\. State True or False./\* symbol is used in Python for single line comment.**FALSE** 71\. An error in a program is termed as\...\...\...\...\...\...\... **(A) Bug** (B) Debug (C) Both (A) and (B) (D) None of these 72\. Suppose a tuple T is declared as T= (10, 12, 43, 39), which of the following is incorrect? \(A) print(T\[1\]) **(B) T\[2\]=-29** (C) print(max(T)) (D) print(len(T)) 73\. What will be the output of the following code? print (type(type(int))) \(A) type \'int **(B) \** (D) \ (C) Error 74\. Which of the following is invalid? (A)\_a = 1 (B) \_\_a=1 (C) \_\_str\_\_=1 **(D) none of the mentioned** 75\. Rohan writes a program of printing \"I am new programming developer\" but he forget to close the bracket of print () statement. What type of error is this? **(A) Syntax error** (B) Logical error (C) Runtime error (D) None of the above 76\. Fill in the blank:The \...\...\...\... statement terminates the execution of the while loop. \(A) continue (B) exit (C) jump **(D) break** 77\. Which method is used to retrieve the executed database function or stored procedure result in Python? **(A) cursor.stored\_results()** (B) cursor.get\_results() \(C) cursor.fetch\_results() (D) cursor.show\_results() 78\. Which of the following option is the correct Python statement to read and display the first 10 characters of a text file \"Notes.bxt\"? \(A) F= open(\"Notes.txt); print(load(10)) (B) F= open(\"Notes.txt\'); print(dump(10)) **(C) F= open(\"Notes.txt\'); print(read(10))** (D) F= open(\"Notes.bxt\'); print(write(10)) 79\. Fill in the blank:\_\_\_\_\_\_\_\_\_\_\_\_The design of the database is known as \(A) attribute **(B) database schema** (C) obstruction (D) database oriented 80\. Which colour will be replaced with yellow? colour = \[\"red\", \"green\", \"blue\"\] colour\[1\]=\"yellow\" print(colour) \(A) red **(B) green** (C) blue (D) none, yellow will be added to the list 81\. Which of the following is/are DML commands? \(A) Insert (B) Delete (C) Update **(D) All of these** 82\. Fill in the blank:\_\_\_\_is a networking device that forwards the data packets between computer networks. \(A) repeater (B) hub (C) switch **(D) router** 83\. Which of these is the correct code for creating a list of names? \(A) nameList = John, Harry, Jesse, John, Harry, Harry \(B) nameList = (\"John\", \"Harry\", \"Jesse\", \"John\", \"Harry\", \"Harry\") **(C) nameList = \[\"John\", \"Harry\", \"Jesse\", \"John\", \"Harry\", \"Harry\"\]** \(D) nameList = \[John, Harry, Jesse, John, Harry, Harry\] 84\. Which of the following types of table constraints will prevent the entry of duplicate rows? \(A) Unique **(B) Distinct** (C) Primary Key (D) NULL 85\. What will be the result of \'cursor.close() ? \(A) Close the cursor **(B) Reset all results** (C) Deletes all references to the connection (D) All of these Assertion and Reason: In the following questions, A statement of Assertion (A) is followed by a statement of Reason (R). Mark the correct choice as. \(A) Both A and R are true and R is the correct explanation for A. \(B) Both A and R are true and R is not correct explanation for A. \(C) A is true but R is false. \(D) A is false but R is true. 86\. Assertion (A): The order of execution of the statements in a program is known as flow of control. Reason (R): The flow of control can be implemented using control structures. 87\. Assertion (A): Modules provide reusability of code. Reason (R): We can define our most used functions in a module and import it, instead of copying their definitions into different programs. **ANS:** **A** 88\. State True or False. for i in range(0,5): is a valid for loop in Python **ANS: TRUE** 89\. Which method is used to add element to a list but at specified index number? \(A) append() (B) extend() **(C) insert()** (D) All of these 90\. To open a file c:\\scores.txt for reading, we use \(A) infile = open(\"c:\\scores.txt\", \"r\") **(B) infile = open(\"c:\\\\scores.txt\",\"r\")** \(C) infile = open(file = \"c:\\scores.txt\",\"r\") (D) infile = open(file = \"c:\\\\scores.txt\",\"r\") 91\. What keyword would you use to add an alternative condition to an if statement? \(A) else if (B) elseif **(C) elif** (D) None of these 92\. What is another word for \'iteration\'? \(A) Selection (B) Assignment (C) Sequencing **(D) Repetition** 93\. Which of the following sequences would be generated in the given line of code? range (5,0,-2) \(A) 543210-1 (B) 543210 **(C) 531 (**D) None of the above 94\. How many types of error are there in Python? \(A) One (B) Two **(C) Three** (D) Four 95\. Which method of cursor class is used to fetch limited rows from the table? \(A) cursor.fetchsize (SIZE) **(B) cursor.fetchmany (SIZE**) (C) cursor.fetchall (SIZE) (D) cursor.fetchonly (SIZE) 95\. All keywords in Python are in except three keywords. \(A) lower case (B) UPPER CASE **(C) Capitalized** (D) None of the mentioned 96\. Fill in the blank:\_\_\_\_\_\_\_\_\_method of cursor class is used to get the number of rows affected after any of the insert/ update/ delete database operation executed from Python. **(A) cursor.rowcount** (B) cursor.getaffectedcount (C) cursor.rowscount (D) cursor.rcount 97\. Which type of error causes abnormal termination of program while it is executing? \(A) Syntax error (B) Logical error **(C) Runtime error** (D) None of the above 98\. Fill in the blank\...\...\...is an attribute whose value is derived from the primary key of some other table. (A) Primary key **(B) Foreign key** (C) Alternate key (D) None of these 99\. Fill in the blank\_\_\_\_\_\_\_ is the benefit of the Networking \(A) File Sharing (B) Easier access to Resources (C) Easier Backups **(D) All of these** 100\...\...\...\...\...produces an undesired output but without abrupt termination of the execution of the program. \(A) Syntax error **(B) Logical error** (C) Runtime error (D) None of the above 101\. The attributes which have all the properties of primary key: \(A) Foreign key (B) Alternate key (**C) Candidate key** (D) Both (A) and (C) 102\. Consider the following statement: SELECT emp\_no, name FROM employee, designation; Which of the following options will be used to display the employee number and names of similar designations together? \(A) FIELD **(B) GROUP BY** (C) ORDER BY (D) Both (B) and (C) **Assertion and Reason:** In the following questions, A statement of Assertion (A) is followed by a statement of Reason (R). Mark the correct choice as. \(A) Both A and R are true and R is the correct explanation for A. \(B) Both A and R are true and R is not correct explanation for A. \(C) A is true but R is false. \(D) A is false but R is true. 103\. Assertion (A): Leading whitespace (spaces and tabs) at the beginning of a statement is called indentation Reason (R): In Python, the same level of indentation associates statements into a single block of mode 104\. Assertion (A): is an unordered collection of data values that stores the key value pair Reason (R): Immutable means they cannot be changed after creation. 105\. A Computer Network: A. Is a collection of hardware components and computers B. Is interconnected by communication channels C. Allows sharing of resources and information **D. All of the above** 106\. What is a Firewall in computer network? A. The physical boundary of network B. An operating system of computer network C. A system designed to prevent unauthorized access D. A web browsing software 107\. What is the use of Bridge in the Network? **A. To connect LANs** B. To separate LANs C. To control network speed D. All of the above 108\. Each IP packet must contain: A. Only Source address B. Only Destination address **C. Source and Destination address** D. Source or Destination address 109\. Which of these is not a communication channel? A. Satellite B. Microwave C. Radio wave D. Wi-Fi 110\. MAN Stands for \_\_\_\_\_. A. Metropolitan Area Network B. Main Area Network C. Metropolitan Access Network D. Metro Access Network 111\. Which of the following is the smallest network? A. WAN B. MAN C. PAN D. LAN 112\. Which transmission media is capable of having a much higher bandwidth (data capacity)? A. Coaxial B. Twisted pair cable C. Untwisted cable **D. Optical fiber** 113\. A Computer Network: A. Is a collection of hardware components and computers? B. Is interconnected by communication channels C. Allows sharing of resources and information **D. All of the above** 114\. What is a Firewall in computer network? A. The physical boundary of network B. An operating system of computer network **C. A system designed to prevent unauthorized access** D. A web browsing software 115\. What is the use of Bridge in the Network? **A. To connect LANs** B. To separate LANs C. To control network speed D. All of the above 116\. Each IP packet must contain: A. Only Source address B. Only Destination address **C. Source and Destination address** D. Source or Destination address 117\. Which of these is not a communication channel? A. Satellite B. Microwave C. Radio wave **D. Wi-Fi** 118\. MAN Stands for \_\_\_\_\_. **A. Metropolitan Area Network** B. Main Area Network C. Metropolitan Access Network D. Metro Access Network 119\. Which of the following is the smallest network? A. WAN B. MAN **C. PAN** D. LAN 120\. Which transmission media is capable of having a much higher bandwidth (data capacity)? A. Coaxial B. Twisted pair cable C. Untwisted cable **D. Fiber optic** 121\. Which type of transmission media is the least expensive to manufacture? A. Coaxial **B. Twisted pair cable** C. CAT cable D. Fiber optic 122\. A device that forwards data packet from one network to another is called a A. Bridge **B. Router** C. Hub D. Gateway 123\. What is a standalone computer? **A. A computer that is not connected to a network** B. A computer that is being used as a server C. A computer that does not have any peripherals attached to it D. A computer that is used by only one person 124\. Which of the following is the fastest media of data transfer? A. Co-axial Cable B. Untwisted Wire C. Telephone Lines **D. Fiber Optic** 125\. Hub is a **A. Broadcast device** B. Unicast device C. Multicast device D. None of the above 126\. Switch is a A. Broadcast device **B. Unicast device** C. Multicast device D. None of the above 127\. The device that can operate in place of a hub is a: **A. Switch** B. Bridge C. Router D. Gateway 128\. In computer, converting a digital signal in to an analog signal is called **A. modulation** B. demodulation C. conversion D. transformation 129\. What is the address size of IPv6? A. 32 bit B. 64 bit **C. 128 bit** D. 256 bit 130\. Which of these is not an example of unguided media? **A. Optical Fibre Cable** B. Radio wave C. Bluetooth D. Satellite 131\. Two devices are in network if **A. A process in one device is able to exchange information with a process in another** **device** B. A process is running on both devices C. The processes running of different devices are of same type D. None of the above. 132\. Which of the following is not the Networking Devices? A. Gateways **B. Linux** C. Routers D. Firewalls 133\. The location of a resource on the internet is given by its? A. Protocol **B. URL** C. E-mail address D. ICQ 134\. The term HTTP stands for? A. Hyper terminal tracing program B. Hypertext tracing protocol **C. Hypertext transfer protocol** D. Hypertext transfer program 135\. Which software prevents the external access to a system? A. Firewall B. Gateway C. Router D.Virus checker 136\. Which one of the following is the most common internet protocol? A.HTML B.NetBEUI **C.TCP/IP** D.IPX/SPX 137\. The term FTP stands for? A.File transfer program B.File transmission protocol **C.File transfer protocol** D.File transfer protection 138\. Which one of the following is not a network topology? A.Star B.Ring C.Bus **D.Peer to Peer** 139\. Which of the following is not an unit for data transfer rate? A.MBPS B.KBPS **C.SBPS** D.GBPS 140\. This was the first network. A.CSNET B.NSFNET C.ANSNET **D.ARPANET** 141\. A\_\_\_\_\_\_\_is a data communication system within a building, plant, orcampus, or between near by buildings. A.MAN **B.LAN** C.WAN D. None of the above 142**. \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ is a collection of many separate networks** **A. A MAN B. An internet C. A LAN D. None of the above** 143\. A\_\_\_\_\_\_\_\_is a set of rules that governs data communication. A. forum **B. protocol** C. standard D. None of the above 144\. Which of the following is required to communicate between two computers? A. Communication hardware B. Communications software C. Protocol **D. All of above including access to transmission medium** 145\. Bluetooth is an example of A. Wide area network B. Virtual private network C. Local area network **D. Personal area network** 146\. A device which can be connected to a network without using cable is called A. Distributed device B. Centralized device C. Open-source device **D. Wireless device** 147\. The vast network of computers that connects millions of people all over the world is called A. Internet B. Hypertext C. LAN **D. Web** 148\. MAC address is of \_\_\_\_\_\_\_\_\_\_\_ A. 24 bits B. 36 bits C. 42 bits **D. 48 bits** 149\. Which of the following appears harmless but actually performs malicious functions such as deleting or damaging files. A.WORM B.Virus **C.Trojan Horse** D. Malware 150\. Name the protocol that is used to send emails A.FTP **B.SMTP** C.HTTP D.TCP 151\. Name the protocol that is used to receive emails **A.POP** B.VOIP C.DHCP D.FTP 152\. Rajesh has purchased a new Smart TV and wants to cast a video from his mobile to his new Smart TV. Identify the type of network he is using: A.LAN B.MAN C.WAN **D.PAN** 153\. The topology in which all nodes are individually connected to a central connection point: A.Ring B.Bus **C.Star** D.Tree 154\. Which of the following best describes uploading information? A.Sorting data on a disk drive **B.Sending information to a host computer** C.Receiving information from a host computer D.Sorting data on a hard drive 155\. The term IPv4 stands for? **A.Internet Protocol Version 4** B.Internet Programming Version 4 C.International Programming Version 4 D.None of these 156\. In specific, if the systems use separate protocols, which one of the following devices is used to link two systems? A.Repeater B.Gateway **C.Bridge** D.Hub 157\. DNS is the abbreviation of A. Dynamic Name System B. Dynamic Network System **C. Domain Name System** D. Domain Network Service 158\. What is the meaning of Bandwidth in Network? **A. Transmission capacity of a communication channels** B. Connected Computers in the Network C. Class of IP used in Network D. None of Above. 159\. What does protocol defines? A. Protocol defines what data is communicated. B. Protocol defines how data is communicated. C. Protocol defines when data is communicated. **D. All of above** 160\. Which of the following can be Software? A. Routers **B. Firewalls** C. Gateway D. Modems 161\. The loss in signal power as light travels down the fiber is called\...\...\...\.... **A. Attenuation** B.Propagation C. Scattering D.Interruption 162\. Which of the following TCP/IP protocols is used for transferring files form one machine to another. **A. FTP** B. SNMP C. SMTP D. RPC 163\. Which of the following protocol is used for remote terminal connection service? A. RARP B. UDP C. FTP **D. TELNET** 164\. Which of the following is considered as the unsolicited commercial email?M A.Virus B.Malware **C.Spam** D.All of the above 165\. It can be a software program or a hardware device that filters all data packets coming through the internet, a network, etc. it is known as the\_\_\_\_\_\_\_: **A.Antivirus** B.Firewall C.Cookies D.Malware 166\. The term \"TCP/IP\" stands for\_\_\_\_\_ A.Transmission Contribution protocol/ internet protocol **B.Transmission Control Protocol/ internet protocol** C.Transaction Control protocol/ internet protocol D.Transmission Control Protocol/ internet protocol 167\. Which of the following is a type of independent malicious program that never required any host program? A. Trojan Horse **B. Worm** C.Trap Door D.Virus 168\. In order to ensure the security of the data/ information, we need to \_\_\_\_\_\_\_\_\_\_\_\_ the data: **A.Encrypt** B.Decrypt C.Delete D.None of the above 169\. Firewall is the type of........... A. Virus B. Security threats C. Worm **D. None of the above**. 170\. It allow a visited website to store its own information about a user on the user's computer: A.Spam **B.cookies** C.Malware D.Adware 171\. In which of the following switching methods, the message is divided into small packets? A. Message switching **B. Packet switching** C. Circuit switching D. None of these 172\. Which of the following switch methods creates a point-to-point physical connection between two or more computers? A. Message switching B. Packet switching **C. Circuit switching** D. None of these 173\. MAC address is also called \_\_\_\_\_\_. **A.Physical address** B.Logical address C.Source address D.Destination address 174\. ARPANET stands for \_\_\_\_\_\_\_. A.Advanced Recheck Projects Agency Internet B.Advanced Recheck Projects Agency Network **C.Advanced Research Projects Agency Network** D.Advanced Research Projects Agency Internet 175\. Which of the following devices is not a networking device? A.Hub B.Switch C.Bridge D.None of these 176\. How many pins does RJ-45 contain? A.Two B.Four **C.Eight** D.Ten 177\. NIC Stands for -- A.Network identity card B.Network interface code. C.National interface card **D.Network interface card** 178\. Which of the following is not a type of guided or wired communication channel? A.Twisted Pair B.Coaxial C.Fibre Optic **D.WiMax** 179\. Which of the following is not a type of unguided or wireless communications channel? A. Microwave B. Radiowave **C. Ethernet** D. Sattelite 180\. Which of the following wireless medium consists of a parabolic antena mounted on towers? **A.Satellite** B.Radiowave C.Microwave D.Infrared 181\. Which of the following cable consist of a solid wire core surrounded by one or more foil or wire shields? A.Ethernet Cables **B.Coaxial Cables** C.Fibre Optic Cables D.Power Cable 182\. A collection of hyperlinked documents on the internet forms the ? **A.World Wide Web (WWW)** B.E-mail system C.Mailing list D.Hypertext 183\. Protocols are set of rules to govern \_\_\_\_\_\_\_\_\_ **A. Communication** B. Standard C. Metropolitan communication D. Bandwidth 184\. An internet is a \_\_\_\_\_\_\_\_\_\_ A. Collection of WANS **B. Network of networks** C. Collection of LANS D. Collection of identical LANS and WANS 185\. Which protocol is commonly used to retrieve email from a mail server? A. FTP **B. IMAP** C. HTML D. TELNET 186\. Which of the following allows user to view a webpage? A. Operating System B. Website C. Interpreter **D. Internet Browser** 187\. A network router joins two \_\_\_\_\_\_\_\_\_ together? **A. Computers** B. Switches C. Networks D. Gateway 188\. A network point that provides entrance into another network is called as \_\_\_\_\_\_\_\_\_\_\_ A. Node **B. Gateway** C. Switch D. Router 189\. TELNET used \_\_\_\_\_\_\_\_\_ protocol for data connection **A. TCP** B. UDP C. IP D. DHCP 190\. Google Chrome is example of : A.Programming Language B.Web Server C.Protocol **D. Web Browser** 191\. Name the transmission media best suitable for connecting to hilly areas. A.Co-axial Cable B.Twisted pair **C. Microwave** D.Optical fiber. 192\. Rahul wants to establish computer network in his cyber café, which of the following device will be suggested by you to connect each computer in the cafe? **A.Switch** B.Modem C.Gateway D.Repeater **SQL:** 1\. What is the full form of SQL? **(a) Structured Query Language** (b) Structured Query List \(c) Simple Query Language (d) Data Derivation Language 2\. What does DML stand for? \(a) Different Mode Level (b) Data Model Language \(c) Data Mode Lane **(d) Data Manipulation Language** 3\. The \_\_\_\_\_\_\_\_\_\_clause of SELECT query allows us to select only those rows in the results that satisfy a specified condition. **(a) Where** (b) from (c) having (d) like 4\. Which of the following function is used to FIND the largest value from the given data in MYSQL? **(a) MAX ()** (b) MAXIMUM () (c) LARGEST () (c) BIG () 5\. The data types CHAR (n) and VARCHAR (n) are used to create \_\_\_\_\_\_\_ and \_\_\_\_\_\_\_ types of string/text fields in a database. \(a) Fixed, equal (b) Equal, variable **(c) Fixed, variable** (d) Variable, equal 6\. The term \_\_\_\_\_\_\_\_\_\_\_ is use to refer to a record in a table. \(a) Attribute **(b) Tuple** (c) Row (d) Instance 7\. Which command is used for cleaning up the environment (sql with Python)? \(a) my.close (b) is.close **(c) con.close** (d) mycon.close 8\. A relational database consists of a collection of **(a) Tables** (b) Fields (c) Records (d) Keys 9\. What is the full form of DDL? \(a) Dynamic Data Language (b) Detailed Data Language **(c) Data Definition Language** (d) Data Derivation Language 10\. A(n) in a table represents a logical relationship among a set of values. \(a) Attribute (b) Key **(c) Tuple** (d) Entry 11\. Name the method which is used for displaying only one resultset. \(a) fetchmany (b) fetchno (c) fetchall **(d) fetchone** 12\. Name the host name used for signing in the database. **(a) localhost** (b) localpost (c) localcost (d) none of the above 13\. A relational database consists of a collection of (a)Tuples (b) Attributes **(c) Relations** (d) Keys 14\. Which is the subset of SQL commands used to manipulate database structure including tables? \(a) Data Definition Language (DDL) **(b) Data Manipulation Language (DML)** \(c) Both (a) and (b) (d) None 15\. The term \_\_\_\_\_\_\_\_\_\_\_\_ is used to refer to a field in a table. **(a) Attribute** (b) Tuple (c) Row (d) Instance 16\. Consider the following table namely employee: Which of the names will not be displayed by the below given query? SELECT name FROM employee WHERE employee\_id\>5009; **(a) Amit, Sumit** (b) Sumit, Arpit (c) Arpit (d) Amit, Arpit 17\. Consider the following query SELECT name FROM stu WHERE subject LIKE '\_\_\_\_\_\_\_ Computer Science'; Which one of the following has to be added into the blank space to select the subject which has Computer Science as its ending string? \(a) \$ (b) \_ (c) \|\| **(d) %** 18\. Consider following SQL statement. What type of statement is this? SELECT \* FROM employee **(a) DML** (b) DDL (c) DCL (d) Integrity constraint 19\. Which of the following function is not an aggregate function? **(a) Round()** (b) Sum() (c) Count () (d) Avg () 20\. Pick the correct username used for logging in database (sql with Python). **(a) root** (b) local (c) directory (d) host 21\. Aggregate functions can be used in the select list or the \_\_\_\_\_ clause of a select statement. They cannot be used in a \_\_\_\_\_\_ clause. \(a) Where, having **(b) Having, where** (c) Group by, having (d) Group by, where 22\. Select correct SQL query from below to find the temperature in increasing order of all cites. \(a) SELECT city FROM weather ORDER BY temperature; \(b) SELECT city, temperature FROM weather; **(c) SELECT city, temperature FROM weather ORDER BY temperature;** \(d) SELECT city, temperature FROM weather ORDER BY city; 23\. In SQL, which command is used to SELECT only one copy of each set of duplicable rows **(a) SELECT DISTINCT** (b) SELECT UNIQUE \(c) SELECT DIFFERENT (d) All of the above 24\. Which of the following is a SQL aggregate function? \(a) LEFT (**b) AVG** (c) JOIN (d) LEN 25\. The command used for modifying the records is: **(a) update** (b) add (c) updateall (d) none of the above 26\. An attribute in a relation is foreign key if it is the \_\_\_\_\_\_\_\_\_key in any other relation. \(a) Candidate **(b) Primary** (c) Super (d) Sub 27\. Which of the following sublanguages of SQL is used to query information from the data base and to insert tuples into, delete tuples from, and modify tuples in the database? **(a) DML (Data Manipulation Language)** (b) DDL (Data Definition Language) (c) Query \(d) Relational Schema 28\. Which operator performs pattern matching? \(a) BETWEEN operator **(b) LIKE operator** \(c) EXISTS operator (d) None of these 29\. Which of the following is not a legal method for fetching records from database from within Python? \(a) fetchone() **(b) fetchtwo()** (c) fetchall() (d) fetchmany() 30\. By default, ORDER BY clause lists the results in \_\_\_\_\_\_\_ order. \(a) Descending (b) Any (c) Same **(d) Ascending** 31\. Which of the following attributes can be considered as a choice for primary key? (a)Name (b)Street **(c) Roll No** (d) Subject 32\. In the given query which keyword has to be inserted? INSERT INTO employee\_\_\_\_\_\_(1002, "Kausar", 2000); \(a) Table **(b) Values** (c) Relation (d) Field 33\. What SQL statement do we use to display the record of all students whose last name contains 5 letters ending with "A"? **(a) SELECT \* FROM STUDENTS WHERE LNAME LIKE '\_ \_ \_ \_A';** \(b) SELECT \* FROM STUDENTS WHERE LNAME LIKE ' \_ \_ \_ \_ \_'; \(c) SELECT \* FROM STUDENTS WHERE LNAME LIKE ' ????A'; \(d) SELECT \* FROM STUDENTS WHERE LNAME LIKE '\*A'; 34\. Consider the table with structure as: Student (ID, name, dept name, tot\_cred) In the above table, which attribute will form the primary key? (a)Name (b) Dept (c) total\_credits **(d) ID** 35\. Which of the following will you use in the following query to display the unique values of the column dept\_name? SELECT \_\_\_\_\_\_\_\_\_\_\_\_\_ dept\_name FROM Company; (a)All (b) From **(c) Distinct** (d) Name 36\. Consider the following query: SELECT name, instructor name, course\_\_\_\_\_\_id FROM instructor; To display the field heading course with a different heading as id, which keyword must be used here to rename the field name? (a)From (b) Rename **(c) As** (d) Join 37\. With SQL, how do you select all the records from a table named "Students" where the value of the column "FirstName" ends with an "a"? \(a) SELECT \* FROM Students WHERE FirstName ='a' \(b) SELECT \* FROM Students WHERE FirstName LIKE 'a%' **(c) SELECT \* FROM Students WHERE FirstName LIKE '%a'** \(d) SELECT \* FROM Students WHERE FirstName ='%a%' 38\. The HAVING clause does which of the following? \(a) Acts EXACTLY like WHERE clause \(b) Acts like a WHERE clause but is used for columns rather than groups. **(c) Acts like a WHERE clause but is used form groups rather than rows.** \(d) Acts like a WHERE clause but is used for rows rather than columns. 39\. Which clause is used with "aggregate functions"? \(a) GROUP BY (b) SELECT (c) WHERE **(d) Both (a) and (b)** 40\. To open a connector to Mysql database, which statement is used to connect with mysql? \(a) Connector (b) Connect (c) password (d) username 41\. If column "Marks" contains the data set {25, 35, 25, 35, 38}, what will be the output after the execution of the given query? SELECT MARKS (DISTINCT) FROM STUDENTS; \(a) 25. 35. 25. 35. 38 (b) 25, 25, 35, 35 **(c) 25, 35, 38** (d) 25, 25, 35, 35 42\. Which connector is used for linking the database with Python code? **(a) MySQL-connector** (b) YesSQL: connector \(c) PostSQL: connector (d) None of the above 43\. If column "Salary" contains the data set {10000, 15000, 25000, 10000, 15000}, what will be the output after the execution of the given query? SELECT SUM(DISTINCT SALARY) FROM EMPLOYEE; (a)75000 (b) 25000 (c) 10000 **(d) 50000** 44\. SQL applies conditions on the groups through \_\_\_\_\_ clause after groups have been formed, \(a) Group by (b) With (c) Where (d) Having 45\. To execute all the rows from the result set, which method is used? **(a) fetchall** (b) fetchone (c) fetchmany (d) none of the above 46\. What is the meaning of "HAVING" clause is SELECT query? **(a) To filter out the summary groups** (b) To filter out the column groups \(c) To filter out the row and column values (d) None of the mentioned 47\. Which of the following queries contains an error? \(a) Select \* from emp where empid = 10003; \(b) Select empid from emp where empid=10006; \(c) Select empid from emp; **(d) Select empid where empid=1009 and lastname='GUPTA';** 48\. Which operator tests column for the absence of data (i.e., NULL value) ? \(a) EXISTS operator (b) NOT operator (**c) IS operator** (d) None of these 49\. Consider the following query: SELECT name FROM class WHERE subject\_\_\_\_\_NULL; Which comparison operator may be used to fill the blank space in above query? \(a) = (b) LIKE **(c) IS/IS Not** (d) if 50\. Which SQL function is used to count the number of rows in a SQL query? \(a) COUNT () (b) NUMBER () (c) SUM () **(d) COUNT (\*)** 51\. With SQL, how can you return the number of not null record in the Project field of "Students" table? **(a) SELECT COUNT (Project) FROM Students** \(b) SELECT COLUMNS (Project) FROM Students \(c) SELECT COLUMNS (\*) FROM Students \(d) SELECT COUNT (\*) FROM Students 52\. Which of the following is not an aggregate function? \(a) Avg (b) Sum **(c) With** (d) Min 53\. All aggregate functions except \_\_\_\_\_\_\_ ignore null values in their input collection. \(a) Count (attribute) **(b) Count (\*)** (c) Avg (d) Sum 54\. Which of the following group functions ignore NULL values? \(a) MAX **(b) COUNT** (c) SUM (d) All of the above 55\. What will be the order of the data being sorted after the execution of given query SELECT \* FROM STUDENT ORDER BY ROLL\_NO; (a)Custom Sort (b) Descending **(c) Ascending** (d) None of the above 56\. Where and Having clauses can be used interchangeably in SELECT queries? \(a) True **(b) False** (c) Only in views (d) With order by 57\. A\_\_\_\_\_\_ is property of the entire relation, which ensures through its value that each tuple is unique in a relation. \(a) Rows **(b) Key** (c) Attribute (d) fields 58\. The operation whose result contains all pairs of tuples from the two relations, regardless of whether their attribute values match. \(a) Join **(b) Cartesian product** (c) Intersection (d) Set difference 59\. Consider following SQL statement. What type of statement is this? CREATE TABLE employee (name VARCHAR, id INTEGER) \(a) DML **(b) DDL** (c) DCL (d) Integrity constraint 60\. The pattern '- - - ' matches any string of \_\_\_\_\_\_\_\_ three character. '- - - %' matches any string of \_\_\_\_ three characters. \(a) Atleast, Exactly **(b) Exactly, Atleast** (c) Atleast, All (d) All, Exactly

Use Quizgecko on...
Browser
Browser