0% found this document useful (0 votes)
37 views26 pages

Es

Uploaded by

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

Es

Uploaded by

Sahana t p
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 26
QUESTION BANK for Practice Which of the following is not a component of the database environment? A) Users 8B) Database Management System (DBMS) C) Data 1D) Software Development Life Cycle (SDLC) Ina relational database, what is a tuple? AyATOW 8) A column. C)A table D) A primary key What is ACID in the context of database transactions? 8) Association, Control, Integrity, Data C) Access, Concurrency, Isolation, Database D) Atomic, Correctness, isolation, Dependency Which normal form deals with the concept of partial dependency? |) First Normal Form (LNF) 8) Second Normal Form (2NF) €) Third Normal Form (3NF) ) Boyce-Codd Normal Form (BCNF) ‘What isthe purpose of an index in a database? A) To store metadata 8B) To enforce data integrity D) To store large binary objects Which type of join returns all rows from both tables, joining them where there are matching values and including unmatched rows from one or both tables? A) Inner join B) Left outer join C) Right outer join Full outer join Which SQ keyword is sel to remove dato from a database? A) REMOVE ») DELETE C) ERASE D) DROP What does SAL stand for? AA) Structured Query Languags B) Standard Query Language C) Sequential Query Language D) simplified Query Language Which typeof relationship between tables enforces referential integrity? ‘A) One-to-many 8) Many-to-one C) One-to-one D) Many-to-many Which SOL command is used to retrieve data from a database? A) GET B) FETCH C) SELECT D) EXTRACT Whats primary key ina relational database? A) A unique identifier for each row ina table 8) A key that is used to join two tables together ©) Akey that can contain duplicate values D) Akey that is used to encrypt data Which type of database model represents data as objects, similar to object-oriented programming? AA) Hierarchical £8) Relational ) Network D) Object-oriented Which SQL command is used to add a new ow toa table? Ayano B)INSERT C) CREATE (D) UPDATE Which normal form eliminates transitive dependencies? A) First Normal Form (1NF) 8) Second Normal Form (2NF) ) Third Normal Form (3NF) 1D) Boyce-Codd Normal Form (&CNF) Which of the following is not a type of database schema? A) External schema '8) Conceptual schema ) Logical schema ©) Physical schema Which SaL clause is used to filter the results of @ query based on specified conditions? ‘A) WHERE 8) HAVING cyriurer D) CONDITION What Is the purpose ofa foreign key in relational database? 1) To ensure each row has a unique identifier 8) To enforce referential integrity between tables €) To encrypt sensitive data D) To perform complex calculations Which Sal function is used to count the number of rows in a result set? ‘A) COUNT) 8) SUMO) cyavel) D) MAX) Which normal form ensures that every non-prime attribute is fully functionally dependent on the primary key? |A) First Normal Form (NF) 8) Second Normal Form (2NF) ) Third Normal Form (3NF) } Boyce-Codd Normal Form (BCNF) Whats the purpose ofa view na database? A) To store temporary data 8) To create a vitual table based on the result of SELECT query C) To optimize data storage D) To enforce data integrity constraints 1. In order traversal of binary search tree will produce ~ a.unsortedlist _b, Reverse of input csortedlist_ —_d. none of the above 2, What data structure is used for depth first traversal of a graph? a. queue b. List «. Stack, d. None of the above 3, What could be the worst case height of an AVL tree? a.097logn ——_b.2.37logn ©.144logn —— d. None of the above 4, The @ notation in asymptotic evaluation represents a. worst case biAveragecase —c. Basrcase_—_d. None of the above 5. Which of the following is not the type of queue? a.priority queue by Singleended = c.Circular_——d.ordinary 6. What will be the output of the following code snippet? void solve(){ int al] =, 2, 3,4, 5}, int sum = 0; forlint i= 0;1<5; ++) { 1H(1% 2 == 0) { sum += ali]; } cout << sum << endl; at ba «9 d. None 7. What will the output of the following code snippet? void solve(){ int a (1, 2, 3, 4, 5); int sum = 0; for(int i= 0; <5;i#+) { iH) 96 2 cout << sum << endl; } a3) ba 65 4. None 8. What function is used to append a character at the back of a string in C++? 2. push back) ». Push «. Append 4.None 9. Kruskal's Algorithm for finding the Minimum Spanning Tree of a graph is a kind of a? a, algorithm b. Greedy Algorithm) c. Adhoc Problem —d. None 10, Maps in C+ are implemented using which of the following data structures? a.hash b. Rediblack AVL d. None 111. What is the best case time complexity of the binary search algorithm? a. O(n) b. Of) ¢. Of Logn) d. None 12, What is the time complexity to insert an element to the front of a LinkedList(head pointer given}? a. O(n) (1) €.O(Logn) —d. O( Logn*n) 13, What is the time complexity to insert an element to the rear of a LinkedList(head pointer given)? a. O(n b.0(1) © O{Logn) 4. 0(Logn*n) 14, Choose correct Syntax for C Arithmetic Compound Assignment Operators. /) a. at=bis (a= a+b) . a%eb is (a=a%b) 4. Allthe above. is(a-ab) — b. a*=bis (aa*b) a/=bis ( 115. Which of the following return-type cannot be used for a function in C? a. Char b. Struct Void 1.None 16. Determine the output of the C code mentioned below: finclude int main) { float q= a’; printf("96¢", a); return 0; } a. run time error ba .97,000000 d.a.0000000 17. We cannot use the keyword ‘break’ simply within a. while ». for iFese 4. do-while 18. The global variables are a. External Internal _c. Both External and Internal d. None of the above 19. Out of the follawing operations, which one is not possible in the case of a register variable? 2. Global declaration of the register variable ». Copying the value from the memory variabl , Reading any value into the register variable d. All of the above 20. The #include is a 2 Inclusion directive b File inclusion directive €. Preprocessor directive 4d, None of the above 21, Which ofthese properties of tdefine is false? a, These always obey the scope rules b. We can make use of a pointer to fine . The define can be externally available. All ofthe above 22, The correct format of declaring a function is: 3. typazofcreturninamerofsfurction largument.type); b. type_of_return name_of_function (argument type)(} .type_of_return (argument type) name_of_function; d. all of the above 23, Out of the following function definition, which one will un correctly? a.int sum(int x, int y) return (x+y); ‘bint sumtint x, int y) ERI cc.int sum(x, y) return (x+y); d.none of the above 24, Comment on the C statement given below: int (*P)SI; a. Aragged array b. Anarray “p" of pointers c.Apointer “p” to an array d. None of the above 25. The definition of the function abort() isin which header file? a. stb b.asserth estdio.h d.stdarg.h 26, What is the primary purpose of the preprocessor directive Herror? 2. Rectifies the first error occuring in the code b. Rectifies the errors present in a code ¢. Causes a preprocessor to ignore any error 4. Causes a preprocessor to report some fatal error 27. What will be the output of the following C code? fincludecstdio.h> int main() printf("96d, d\n", x, s}; a. Syntax error b.5,2 672 47.4 28. We cannot use the keyword ‘break’ simply within _ a. while ». For «.ihelse 4. do-while 29. The Hinclude is a a. Inclusion directive b. File inclusion directive «. Preprocessor directive 4. None of the above 30. Which of these properties of tidefine is false? a. These always obey the scope rules, b. We can make use of a pointer to #define «. The Hdefine can be externally available 4. All of the above 31, Which of these is the correct initialization method for the following: typedef char *string; ‘a. More than a single space shouldn't be given when we are using typedef b. *string p «. string p= "Hello’; d. *string *p= “Hello”; 32, Which arithmetic operators can we NOT use with strings? an be es 4. Allof the above 33. Which function do we use to shuffle a list(say list)? a. shutfle(ist2) b. ist shure) ¢. random shuffleList(list1) 4. random.shuffle(list) 34, What will be the error in the following Java code? byte b=b*50; 3. b cannot contain value 50 b.b cannot contain value 100, limited by its range €.No errorin this code 4. 35. Which of the following is a type of polymorphism in Java Programming? a, Multiple polymorphism b. Compile time polymorphism Multilevel polymorphism d.Execution time polymorphism 36. Automatic type conversion is possible in which of the possible cases? a. int to long b. byte to int ¢.Longto int d. Short to int 37. Find the output of the following code. int Integer = 24; char String =; System.out.print{integer); System.out.print(String); ar2ae bl om d. Compiler Error 38. Find the output of the following program. public class Solution{ public static void main(String] args){ short x=10; xe x5; System.out print) ) } ‘a. Compiler Error b.10 cs d. Syntax Error 39. Identity the correct restriction on static methods 1, They must access only static data 2. They can only call other static methods. 3. They cannot refer to this or super. a.41l andi balttonty land ii d. None 40. 1. Which of these components are used in a Java program for compilation, debugging, and execution? 2.JDK b.sv IRE duit 1. Aqueue follows 3. UFO principle ».FIFO principle c.lineartree —d. Ordered array 2. The time complexity used for inserting a node in a priority queue on the basis of key is: 2. O(n) b..0(n2) ¢. Ofnlogn) 4. Ollogn) 3. Which of these is a postfix expression? aavbe b.4ab c.aberHde+ —— d.atb(etd) 4, The members of two of the sets are relatively more common when the Jaccard Index is a. Closer to0 b.Closerto 1. c.Fartherto1 — d.Closerto-1 5, Which one is the most desirable out of these traits of a hash function? a. it must cause more collisions b. it must be easy to implement «. itt must cause less collisions 4. it must occupy less space 6. The swap space in a disk is primarily used for: a. Save process data b. Save temporary HTML pages «. Store the device drivers d. Store the super-block 7. Consider a computer system that supports 32-bit physical as well as virtual addresses. Now since ‘the space of the physical address is the same size as the virtual address, the OS designers would decide to entirely get rid of its virtual memory. Which one of these is true in this case? a. Ibis no longer possible to efficiently implement multi-user support b.Itis possible to make CPU scheduling more efficient now «, There would no longer be a requirement for hardware support for memory management 4. It would be possible to make the processor cache organisation more efficient now 8, Thrashing occurs in a system when: a. The processes on the system access pages and not memory frequently b. A page fault pops up ¢. The processes on the system are in running state d. The processes on the system are in the waiting state 9, The page fault occurs whenever: a. The requested page isn’t in the memory b. The requested page is in the memory ©. An exception is thrown d. The page is corrupted 10. n every entry of a page table, the essential content(s) is/are: a. Page frame number ». Virtual page number €. Both page frame numberand virtual page number Accessing the right information 111. What will be the output of the following C code? fincludecstdio.h> int main() { intp=1,q=2, e=rts=q*p; print ("%d, d\n" x, 5); } a. syntax error b.s.2 672 ana 12. We cannot use the keyword ‘break’ simply within a. while b. For _iRelse d. do-while 13. The #include is a a. Inclusion directive b. File inclusion directive «Preprocessor directive. d. None of the above 114. Which of these properties of tdefine is false? a. These always obey the scope rules b. We can make use of a pointer to define c. The #define can be externally available d. All of the above 115. Which of these is the correct initialization method for the following: typedef char “string; a. More than a single space shouldn't be given when we are using typedef b. *string p ©. string p= "Hello"; d. *string *p= “Hello”; 16. Which arithmetic operators can we NOT use with strings? an b+ at 117. Which function do we use to shuffle alist(say list)? a. shuffle(lst1) b. lst1.shuffle() «. random shuffleList(list2) d. random shuffle(list2) 18. Which function removes a set's first and the last element from alist? 2. pop b. Remove € Dispose 4. discard 18. The output of this Python code would be: def find(x, **y}: printitype(y)) find( ‘letters’ a. Dictionary b. An exception is thrown «. String d. Tuple 19, Which one of theses NOT true about recursion? a. We en replace a recursive funetion by anon-ecursive funtion b. The memory space taken by the recursive functions is more than that of non recursive funtion «Running a recursive functions faster as compared toa non-recursive function d, The process of recursion makes it easier for users to understand a program 20. Which function doesnt accept any argument? a.recompie brenda rematch ‘ame 21. In Python, the primary use of the tell() method is that: a. within he fle, tells the end position ». within theft the current postion c.itellsus the fle is opened d. none of the above 22. n the context of data warehousing, data map or ‘data about data’ is known as... a.tuple b. Attribute c. Metadata d.teradata 23. Which of the following normal form deals with the anomaly of multi-value dependency? a. INF b. 2NF caNE 4. SNF 24, isa database language used to define data structures in SQL? a.Sybase boracle DDL d. Mysat 25. Which of the following is not the state of a transaction in the database? a.Active b.committed Terminated Nulled 26.1he file saves the recovery scenario in Quick Test Professional (QTP) environment a. ORS, b.JPE ©. DOC 4.TSR 27. Which of the following is not a command is SQL? a. WHERE b.ORDER BY REMOVE 4, SELECT 28.How should we traverse an oracle database to retrieve a row in the quickest possible time? a.Full table scan _b. Unique index ¢. Primary key 29. Which of the following is a concurrency control protocol? a.Locked-based protocol b. two-phase locking protocol c.Timestamp ordering protocol 30.Which of the following statements are used to create indexes in the database? a.CREATE INDEX b. BUILD INDEX c.WRITE INDEX d. None 31. Which of the following is a database recovery technique? a. Check-pointing b-Transaction rollback ¢. Shadow paging all 32.Which of the following is a foreing key constraint? a Referential integrity b. Domain integrity _c. Entity integrity 4.all 33. FTP runs exclusively over __. aT bce SMTP HTML 34,FTP runs exclusively over _. a. nTTP b.TcP SMTP 4. HTML, 35.Which ofthe folowing primarily uses guided media? a.callulr telephone system boca telephone system ¢. satellite communications d. radio broadcasting 36.This is the ability to increase system performance gradually as the workload grows just by adding processors, a. multipliabllity b. Inheritance «Scalability d. vectorization 37SMTP refersto__. a. Simple mail transfer protocol b. Small mail transfer protocol Simple mass transfer protocol d. Small mail transfer protocol 38. Adata channel contains _. 2. control information b.management information c.miscellaneous functions d. user data/informatio 39.Which layer is not really a layer? Host of the network b. Network to host ©. Application to presentation d. None 40.The term used to describe the way in which computers are connected to the network. a. Logic b. Technology Topology 4. All of the above 1. In the case of the index allocation scheme of various blocks to a file, the maximum size (possible) of the file would depend on a. the total number of blocks that have been used for the index, size of all the blocks b. the actual size of all Blocks, the size of the blocks’ address «. the ofthe blocks’ sie, the blocks address size, and the total number of blocks that have been d. None of the above 2. The swap space in a disk is primarily used to: a, Save process date ’. Save temporary HTML pages «. Store the device drivers 4. Store the super-block 3. Out of these page replacement algorithms, which one suffers from Belady's anomaly? FIFO “BARU _c. Both LRU and FIFO d, Optimal Page Replacement 4, An increase in a computer's RAM leads to a typical improvement in performance because: Fewer page faults occur b. Virtual memory increases n faults occur, Alarger RAMIs faster c, Fewer segments 5. Consider a computer system that supports 32-bit physical as well as virtual addresses. Now since ‘the space of the physical address is the same size as the virtual address, the OS designers would decide to entirely get rid of its virtual memory. Which one of these is true in this case? a. There would no longer be a requirement for hardware support for memory management b. It is possible to make CPU scheduling more efficient now ¢.Itisno longer possible to efficiently implement multi-user support 4. ewould be possible to make the processor cache organisation more effiient now 6, The Virtual memory is: 2. Anillusion of a large main memory B.A large main memory c.Alarge secondary memory d. None of the above 7. ACPU yields 32-bit virtual addresses, and the page size is 4 kilobytes. Here, the processor consists of a TLB (translation lookaside buffer). Itis a 4-way set associative, and it can hold a total of 128- page table entries. The TLB tag's minimum size is: a. 20 bits, b.MS bits: 13 bits d. 11 bits 8. In which of the following formats data is stored in the database management system? a. text b. table c. Image d. Graph 9, Which of the following is a function of the DBMS? a. Storing data b. Providing multi-users access control ¢, Data Integrity, 4. All of the above 10. isa hardware component that is most important for the operation of a database management system a. Microphone b. Printer ©. High-resolution video display _d. High’speed) large\capacity disk to store data 111. What is the best case time complexity of the binary search algorithm? 2. O(n) bio ©.O{Logn) _d. None 112, What is the time complexity to insert an element to the front of a LinkedList(head pointer given)? a. O(n) b.o(a), €.0{Logn) 4.0 (Logn*n) 113. What is the time complexity to insert an element to the rear of a LinkedList(head pointer given)? 2. O(n), b.0() ©-O{Logn) 4. 0( Logn*n) 14, Choose correct Syntax for C Arithmetic Compound Assignment Operators. s/o) a. at=bis (a= arb) ©. a%=b is (a-a%b) 4. Allthe above. is(a-ab) —_b. at=bis (aa*b) a/=bis ( 15. Which of the following return-type cannot be used for a function in C? a. Char b. Struct Void d.None 16. Determine the output of the C code mentioned below: include int main() { float q printt("%6F", return 0; } a.run time error ba .97,000000 ,a.0000000 17. We cannot use the keyword ‘break’ simply within a. while b.for clRelse d. do-while 18. The global variables are a. External b.Internal __¢. Both External and Internal d. None of the above 18. ut ofthe following operations, which ones nat possible inthe case ofa regitr variable? ». Global declaration ofthe register variable b. Copying the value from the memory variable ¢.Reading any value into the register variable d, All of the above 20. The #inelude is a a. Inclusion directive b. File inclusion directive €. Preprocessor directive 4. None of the above 21. Which ofthese properties oftdefineis false? a. These always obey the scope rules b. We can make use of a pointer to define «. The #define can be externally available 4. All of the above 22. Out of these methods, which one makes the raw MIME formatted string? a. tostring() b. getstring() &-parse() 4. parseString() 23. The remover) method throws which of these exceptions: a. ObjectNotFoundException _b,|OFxception . legalStateException d. SystemException 24. Out of the following, which one is a superclass ofall the exception type classes? a. String b. Runtime€xceptions _«, Throwable 4. Catchable 25. What happens when we cll two threads that have the same prisity to process simultaneously? a. Both ofthe threads willbe simutaneousyexecuted b. Anyone ofthe threads canbe executed fist lxicographiclly «.Itdepends on the 05 d, There will be no execution of threads 26. Out of these classes, which one is used for reading strings and characters in Java from the console? a.StringReader _—_b, InputStreamReader _c. BufferedReader d. BufferedstreamReader 27. Out of these operators, which one can be used to get the run time info about an object? a. Info b. getinfo c.Instanceof_—d. none 28. Out of these classes, which one allows a user to define their own formatting pattern for time and dates? a. UsersDateFormat b. ComplexDateFormat c.SimpleDateFormat d. DefinedDateFormat 29. Which method can we use in an applet to output a string? a. transient) b. drawstring) «. print) 4. display) 30. The public int start() returns what? a. the startindex of the previousmatch _b. the start index of the current match «. the start index of the input string 4. None of the above 31. Which one is a superclass of the ContainerEvent class out of the following? 2. Componentévent b.InputEvent _c. temE vent d. Window vent 32.__is a superclass ofall the Adapter classes. a. Applet b. Componentvent cInputévent Event 33. Which method in Java generates boolean random values? a. nextBoolean() —_b. randomBoolean() c.generateBoolean() d. previousBoolean() 34. Which class produces objects with respect to their geographical locations? a. Locale b.Date c. Simple TimeZone d. TimeZone 35. Which method is used for notifying the observer about the change in the observed object? a. updatel) b.notify() c. observed() d. check\) 36. Which package is used to remotely invoke a method? a. javaumi bjevaawt ——_«.java.applet 4. java.util 37. What are the uses of generics? a. The generics make a code more readable and optimised b. The generics make a code faster c. The generics add stability to a cade. They do so by making more bugs detectable at the runtime 4. The generics add stability toa code. They do so by making more bugs detectable at the compile time 38. Which mechanism helps in the process of naming as well as visibility control of the classes and thelr content? a, Packages b. Interfaces _¢. Object d. None of the above 39. The configuration is stored in which of the file database tables: a..hbm b..ora ©. sal ..dom 40. The primary use of Files.lines(Path path) is that it: a. reads the ines that are from a fle asthe Stream b.reads the files that ae atthe path specified asthe String €.counts the total number of lines forte lsat the specified path d. reads the filenames at the specified path Which of the following layers of the OS! model is responsible for physical addressing and ‘transmission of data over the network? a) Data Link Layer b) Network Layer ) Transport Layer ) Physical Layer What isthe maximum data rate defined by the IEE 802.11n standard? a) 54 Mbps b) 150 Mbps ¢) 300 Mbps dd) 600 Mbps Which ofthe following protocols is used for securely transmitting data over the Internet? ayreP be ) HTTPS d) FIP Which networking device operates at the Data Link Layer of the OS! model? a) Router ) Hub ) Switch d) Repeater Which type of network topology is characterized by a central node with point-to-point connections to other nodes? a) Star b) Ring ©) Mesh d) Bus What is the purpose of DNS (Domain Name System)? 2) To encrypt data transmission b) To translate domain names into IP addresses 6) To manage network trafic d) To establish secure connections What is the default subnet mask fora Class C IP address? 2) 2550.00 »)255.255.00 ¢) 255.255.255.0 d) 255.255.255.255 Which of the following protocols is used for transferring files between a client anda server over 2 network? a) SMTP b) SSH <) FIP ) SNMP What is the purpose of NAT (Network Address Translation)? a) To translate MAC addresses to IP addresses b) To encrypt network traffic ) To assign IP addresses dynamically 44) To allow multiple devices to share a single public IP address Which of the following is NOT a valid IPvé address type? a) Unicast b) Multicast ) Anycast ayBroadcast What Is the primary function of a frewallin a network? a} To provide physical security tothe network ) To iter and control network traffic 6) To enhance network speed d) To manage IP addresses Which protocol is used to automatically assign IP addresses to devices on a network? a) DHEP b) DNS vere d) HTTP What is the primary function of a switch in a network? a) To connect multiple networks together b) To regulate network traffic ¢)To translate domain names to IP addresses 4) To connect devices within the same network segment Which OS layer is responsible for ensuring the reliable delivery of data between two nodes on a network? a) Transport Layer b) Network Layer ¢) Data Link Layer d) Session Layer What is the purpose of ICMP (Internet Control Message Protocol)? a) To encrypt data transmission ) To establish secure connections d) To assign IP addresses dynamically Which of the following is NOT a wireless networking standard? a) 802.11a¢ b) Bluetooth 936 4) ethernet What is the maximum transmission unit (MTU) size for Ethernet networks? 2} 1500 bytes b) 576 bytes. c) 64 kilobytes d) 512 bytes Which type of cable is commonly used to connect @ computer to a switch or router in a local area network (LAN)? a) Coaxial cable b) Fiber optic cable } Ethernet cable d) HDMI cable What is the primary purpose of ARP (Address Resolution Protocol}? 2) To map IP addresses to MAC addresses b) To secure network connections ) To establish VPN connections d) To assign IP addresses dynamically Which network topology offers the highest level of redundancy and fault tolerance? a) Star ) Ring <) Mesh d) Bus

You might also like