Sie sind auf Seite 1von 92

Ch 1 - Computer Networking

(Q.1) A router
(A) determines on which outgoing link a packet is to be forwarded.
(B) forwards a packet to the next free outgoing link.
(C) forwards a packet to all outgoing link, except the link upon which the packet is to be forwarded.
(D) forwards a packet to all outgoing links.
(Q.2) A computer network is
(A) one computer connected to a server.
(B) three interconnected computers and a set of hardware devices.
(C) two or more interconnected computers and a set of hardware devices.
(D) a computer connected to a printer.
(Q.3) To make all the data, programs and peripherals available to anyone on the network is known as
(A) cost factor.
(B) reliability. (C) communication medium. (D) resource sharing.
(Q.4) Computers that are attached to a network and seek to share the resources of the network are called
(A) non-dedicated servers.
(B) nodes.
(C) peripherals. (D) dedicated servers.
(Q.5) The rules followed by the computers on a network to communicate with one another are known as
(A) protocols.
(B) specifications.(C) interfaces. (D) prototypes.
(Q.6) Every machine on a TCP/IP network has a unique identifying number called an
(A) Interface Protocol address.
(B) Information Protocol address.
(C) Internet Protocol address.
(D) Informatics Protocol address.
(Q.7) The topology in which each node is connected to two and only two neighboring nodes is known as
(A) bus topology.
(B) linear topology. (C) ring topology.
(D) tree topology.
(Q.8) The topology in which we do not need to remove packets from the medium because when a signal reaches the end of
medium, it is absorbed by terminators, is known as
(A) mesh topology.
(B) graph topology.
(C) star topology.(D) tree topology.
(Q.9) A device that provides central connection point for cables from workstations, servers and peripherals is known as
(A) transmitter.
(B) concentrator.
(C) transceiver. (D) repeater.
(Q.10) A short-range wireless technology that is used for connecting and transferring information between devices such as
mobile phones, laptops, PCs, PDAs is known as
(A) bluetooth.
(B) satellite.
(C) radiowave.
(D) microwave.
(Q.11) The type of network that is to be used when an office situated in India has to communicate with its headquarters in
London is known as
(A) LAN.
(B) MAN.
(C) WAN.
(D) PAN.
(Q.12) To receive a network signal from one LAN terminal cable segment and to regenerate and retransmit the signal as it is
in its original strength over one or more cable segments is the main function of
(A) router.
(B) gateway.
(C) repeater.
(D) bridge.
(Q.13) When planning your network , it is important to
(A) purchase backup equipment for all network devices.
(B) choose products that are flexible in case you want to upgrade and expand your network in the future.
(C) install an additional telephone line for each PC in your network.
(D) choose the fastest cabling possible to ensure your network wont get obsolete within 2 years.
(Q.14) A distributed network configuration in which all data/information passes through a central computer is a
(A) bus network.
(B) ring network.
(C) star network.
(D) point-to-point network.
(Q.15) Internet is a/an
(A) local computer network.
(B) world wide network of computers.
(C) interconnected network of computers.
(D) world wide interconnected network of computers that uses a common protocol to communicate with one another.
(Q.16) Internet requires

(A) an international agreement to connect computers.


(B) a local area network.
(C) a commonly agreed set of rules to communicate between computers.(D) a World Wide Web.
(Q.17) The topology in which each node is connected to more than one node so as to provide an alternative route in case
the host is either down or too busy is known as
(A) tree topology.
(B) bus topology.
(C) ring topology.(D) mesh topology.
(Q.18) The topology in which a link may or may not connect to two or more nodes and their may also be multiple links is
called
(A) mesh.
(B) graph.
(C) tree.
(D) star.
(Q.19) The types of computer networks are
(A) NAN, TAN, LAN.
(B) LAN, WAN, Internet, PAN.
(C) ring, star, mesh, WAN.
(D) MAN, tree, bus, graph.
(Q.20) The art and science of sensing when a system or network is being used inappropriately or without authorization is
known as
(A) authorization.
(B) firewall.(C) intrusion detection.(D) authentication.
(Q.21) When we work on computer, a modem changes the digital data from our computer into analog data. This technique is
known as
(A) quantization.
(B) sampling. (C) modulation. (D) demodulation.
(Q.22) The most common form of wiring in data communication applications is
(A) optical fibre. (B) twisted pair cable. (C) ethernet cable.
(D) coaxial cable.
(Q.23) To regenerate data and voice signals we use
(A) router.
(B) modem.

(C) repeater.

(D) bridge.

(Q.24) An attack where the attacker tries to make some resource too busy to answer legitimate requests or deny legitimate
users to access your machine is known as
(A) snooping. (B) intruding.(C) eavesdropping.(D) denial of service (DoS).
(Q.25) If an organization plans to link its front office situated in the city in a hilly area where the cable connection is not
feasible, then the economic way to connect it with reasonably high speed would be
(A) radio wave transmission.
(B) microwave transmission.
(C) laser transmission.
(D) bluetooth.
(Q.26) The very high speed service to provide data connectivity between technical office located in Kolkata and the BPO
located in Ana Nagar would be (The wire distance between technical office in Kolkata and BPO office in Ana Nagar is 2450
km.)
(A) leased line. (B) co-axial cable network.(C) satellite connection.
(D) telephone line.
(Q.27) A company has offices spread within the range of 2000 km. A device that the company should use to connect all the
computers within each of its offices is a
(A) modem.
(B) telephone. (C) bridge.
(D) switch/hub.
(Q.28) A functional unit that interconnects two local area network (LAN) that use the same logical link control protocol but
may use different medium access control protocols is
(A) bridge.
(B) router.
(C)
repeater.
(D) modem.
(Q.29) Repeaters are of two kinds
(A) amplifier and signal repeater
(B) router and modem.
(C) rectifier and amplifier.
(D) bridge and gateway.
(Q.30) To communicate on an internetwork, we require
(A) name address.
(B) code address.
(C) IP address.

(D) source address.

(Q.31) The address that is unique for each network card is


(A) name address.
(B) MAC address.
(C) source address.

(D) destination address.

(Q.32) Two types of servers on a network are


(A) dns and apache.

(B) linux and unix.

(C) non-dedicated and dedicated server. (D) freeware and shareware.


(Q.33) A P-P link depends upon two functions,
(A) cost and flexibility.
(B) transmit and receive.
(C) flexibility and reliability.
(D) cost and reliability.
(Q.34) A unique name assigned to a website is known as
(A) physical address. (B) resource locator.
(C) logical address.

(D) domain name.

(Q.35) Bus topology is also known as


(A) circular topology.
(B) linear topology.

(D) mesh topology.

(C) tree topology.

(Q.36) The network in which the devices are within the range of reachability is known as
(A) LAN.
(B) PAN.
(C) MAN.
(D) WAN.
(Q.37) Online messaging is also known as
(A) email.
(B) telnet.

(C) instant messaging. (D) RSS.

(Q.38) The interference caused by adjacent wires is known as


(A) crosstalk. (B) streaming. (C) crosswire. (D) synchronizing.
(Q.39) Twisted pair cable is an example of
(A) unguided media.
(B) usenet.
(C) guided media.

(D) telnet.

(Q.40) WAN stands for


(A) Wireless Area Network.
(C) Wired Area Network.

(B) Wide Area Network.


(D) Wider Area Network.

(Q.41) MAN stands for


(A) Metro Area Network.
(C) Metropolitan American Network.

(B) Metropolitan Area Network.


(D) Major Area Network.

(Q.42) The transmission making use of radio frequencies is


(A) microwave transmission.
(B) satellite transmission.
(C) radio-wave transmission.
(D) twisted pair transmission.
(Q.43) Any radio setup has two parts,
(A) continuous and discontinuous.
(C) analog and digital.
(Q.44) Hubs can be either be
(A) active or passive.
(C) internal or external.

(B) transmitter and receiver.


(D) collector and receiver.
(B) asynchronous or synchronous.
(D) symmetric or asymmetric.

(Q.45) A device that is used to segment networks into different sub networks is called
(A) hub.
(B) router.
(C) modem.
(D) switch.
(Q.46) A repeater is a device that
(A) transforms data.
(B) forwards packet.
(C) electrically amplifies the signal it receives and broadcasts it. (D) performs switching.
(Q.47) An example of transmission medium is
(A) modem.
(B) telephone lines.

(C) repeater.

(D) bridge.

(Q.48) The network device that connects two local-area networks is known as
(A) star.
(B) ring.(C) bridge.
(D) router.
(Q.49) A device that connects dissimilar networks is known as
(A) bridge.
(B) router.
(C) repeater.

(D) gateway.

(Q.50) The other name for MAC address is


(A) logical address.
(B) hardware address. (C) active address.

(D) dynamic address.

(Q.51) A network device that connects multiple networks irrespective of their protocol is known as a
(A) gateway.
(B) bridge.
(C) router.
(D) hub.
(Q.52) An interconnected collection of autonomous computers is known as a
(A) network.
(B) server.
(C) node.
(D) gateway.
(Q.53) A network within a single building or a campus upto a few km in size is known as
(A) WAN.
(B) PAN.
(C) MAN.
(D) LAN.
(Q.54) When in a network each host is directly connected to other, then the network is known as
(A) bus.
(B) fully-connected.
(C) star.(D) tree.
(Q.55) Connecting two mobiles through bluetooth is an example of
(A) LAN.
(B) MAN.
(C) PAN.

(D) WAN.

(Q.56) The protocol that lets us upload and download material to and from a remote site is known as
(A) file transfer protocol.
(B) http.
(C) data link layer protocol.
(D) smtp.
(Q.57) The advantage of star topology is
(A) its problem diagnosis.
(B) long cable length.
(C) difficulty to expand.
(D) central node dependency.
(Q.58) One of the advantages of linear topology is
(A) its short cable length and simple wiring layout.
(C) the diagnosis of fault.
(Q.59) Another name for NIU is
(A) layer two address.
(C) network interface card.

(B) the repeater configuration.


(D) its suitability for optical fibres.

(B) data link layer address.


(D) layer three address.

(Q.60) The primary difference between a LAN, a MAN and a WAN is the
(A) number of nodes in the network.
(B) type of nodes in the network.
(C) distance between groups of nodes in a network.
(D) size of the organisation where the nodes exist.
(Q.61) A cable TV network is to be laid across the city. The most suitable network is
(A) LAN.
(B) WAN.
(C) PAN.
(D) MAN.
(Q.62) A LAN
(A) always contains more than 5 PCs.
(B) connects PCs to telephones.
(C) connects PCs and other computer devices within a small geographic area.
(D) always contains a server which houses centralised files.
(Q.63) Any electronic device on a network is called a
(A) node.
(B) hub.
(C) router.

(D) cable.

(Q.64) Ethernet
(A) is an internal company Internet, not accessible by outside users.
(B) requires its own operating system.
(C) is one of several methods by which information travels through a network.
(D) is not available for peer-to-peer networks.
(Q.65) The piece of equipment that installs in a PC and allows the PC to connect to a network is
(A) hub.
(B) access router.
(C) graphic accelerator card.
(D) NIC.
(Q.66) Remote access capabilities allow
(A) users to access network from remote locations.
(B) users to work with files located anywhere on the network.
(C) hackers to easy infiltrate important files.
(D) store files in a central server.

(Q.67) The most flexible network in which the devices are wired together is
(A) bus network.
(B) ring network.
(C) T-switched network.

(D) mesh network.

(Q.68) Each computer connected to Internet must


(A) be an IBM PC.
(B) have an exclusive IP address.
(C) be Internet compatible.
(D) have a modem connection.
(Q.69) World Wide Web is
(A) another name for Internet.
(B) a hardware.
(C) a collection of linked information residing on computers connected by Internet.
(D) a collection of information.
(Q.70) MAC address stands for
(A) Media Access Control.
(B) Media Audio Control.
(C) Memory Access Control.
(D) Memory Audio Control.
(Q.71) Network Interface Unit is also called
(A) topology access point.
(B) topology access protocol.
(C) terminal access point.
(D) terminal access protocol.
(Q.72) The network topology that requires terminators at the ends of the lines is
(A) star.
(B) ring.
(C) mesh.
(D) bus.
(Q.73) Data is transmitted in small blocks known as
(A) nodes.
(B) packets.
(C) information. (D) switch.
(Q.74) To listen secretly to the private conversation of others is known as
(A) eavesdropping.
(B) denial of service.
(C) snooping. (D) intrusion.
(Q.75) Conversion of IP address to MAC address is known as
(A) name resolution.
(B) code resolution.
(C) address resolution. (D) MAC resolution.
(Q.76) Mapping of DNS name to IP address is known as
(A) name resolution.
(B) code resolution.(C) hardware resolution.(D) address resolution.
(Q.77) When a user attempts to gain access to protected sensitive information, it is known as
(A) network administrator.
(B) intrusion problem. (C) phishing.
(D) spammer.
(Q.78) File permissions are given for three sets of users known as
(A) editor, owner and others.
(B) reader, group and others.
(C) manufacturer, owner and group.
(D) owner, group and others.
(Q.79) If a user is able to provide a legal login-id, he/she is an
(A) authentic user.
(B) authorized user.
(C) intruder.

(D) unauthorised user.

(Q.80) Authentication is also termed as


(A) authorization.
(B) intrusion detection. (C) firewall.
(D) password-protection.
(Q.81) A system designed to prevent unauthorized access to or from a private network is called
(A) authorization.
(B) firewall.
(C) intrusion detection. (D) authentication.
(Q.82) The process to convert analog signal into digital form is called
(A) modulation.
(B) quantization.
(C) sampling.

(D) demodulation.

(Q.83) To connect two LANs that are physically separate but logically same is known as
(A) bridge.
(B) modem.
(C) router.
(D) repeater.
(Q.84) A network device which is used to interconnect computers and/or devices on a network is known as
(A) Ethernet.
(B) twisted-pair.
(C) repeater.
(D) switch.
(Q.85) Modulation techniques are
(A) SM, GM and TM.
(B) AM, PM and FM.

(C) FM, GM and TM.

(D) PM, FM and SM.

(Q.86) The two types of modems are


(A) active modems and passive modems.
(B) interior modems and exterior modems.
(C) concentrator modems and filtering modems. (D) internal modems and external modems.
(Q.87) The cable that uses light to transmit data instead of magnetic signals is
(A) Ethernet cable.
(B) fibre optic cable.
(C) twisted pair cable. (D) coaxial cable.
(Q.88) The main disadvantage of an optical fibre cable is that it
(A) has disturbances.
(B) causes noise distortion.
(C) is very costly.
(D) uses thin strands of pure glass.
(Q.89) To connect back office in India from work office in Germany, we will use
(A) PAN.
(B) WAN.
(C) MAN.
(D) LAN.
(Q.90) The disadvantage of star topology is
(A) one device per connection. (B) easy to access.
(C) central node dependency.
(D) simple access protocols.
(Q.91) A school with 20 stand-alone PCs is considering networking them together and adding a file server. Consider four
possible benefits of doing it.
(Q.92) Define the following terms:
a) Packet
b) Token

c) Node

(Q.93) How does a ring topology work? List its advantages and disadvantages.
(Q.94) Expand LAN, WAN and MAN.
(Q.95) What is a network?
(Q.96) Name the most common types of copper cabling.
(Q.97) Name the cable network to connect LANs.
(Q.98) Write the other name for Network Interface Unit.
(Q.99) Name the two types of servers.
(Q.100) What is MAC address.
(Q.101) Expand DNS.
(Q.102) Why do we use repeater?
(Q.103) What is a local area network.
(Q.104) Explain the term topology.
(Q.105) Name the communication channels used in wireless transmission.
(Q.106) What is a protocol?
(Q.107) What is a hub?
(Q.108) What is an IP address?
(Q.109) Differentiate between LAN and Internet.
(Q.110) Differentiate between WAN and MAN.
(Q.111) What is the difference between a LAN and MAN?
(Q.112) What is a Star Topology?
(Q.113) Define Denial of Service.
(Q.114) Write two advantages of Bus Topology.
(Q.115) Write five advantages of fibre optics.
(Q.116) Explain the following terms: nodes and server.
(Q.117) Give three advantages and two disadvantages of Ring Topology.
(Q.118) What are the advantages of setting up a local area network?
(Q.119) Write the different forms of DoS attacks.
(Q.120) Differentiate between gateway and router.
(Q.121) Define
a) Intrusion detection system.
b) Snooping.
(Q.122) Give two advantages and two disadvantages of the following network topologies:
a) Star
b) Tree
(Q.123) Describe modem. What is its function?
(Q.124) Define the term Network Topology. Describe any two topologies.
Ch 2 - Open Source Concepts
(Q.1) To represent the shapes that the characters can have when they are rendered is known as
(A) font.
(B) glyph.
(C) TTF.
(D) OTF.

(Q.2) Transliteration is the other term used for


(A) Phonetic Text Entry.
(B) Indian Script Keymaps.
(C) Keymap Based Text Entry.
(D) Unicode.
(Q.3) Shareware is
(A) used free of cost forever.
(C) available with the source code.

(B) try before you buy software.


(D) modified easily.

(Q.4) The e-mail client Thunderbird is used in


(A) Freeware. (B) Internet Explorer.
(C) Mozilla.

(D) Linux.

(Q.5) The font in which the same file will work on Windows and Macintosh is
(A) Dynamic Font.
(B) Open Type Font.
(C) True Type Font.
(Q.6) LAMP is an acronym for
(A) Linux, Acrobat, MySQL, PHP.
(C) Linux, Apache, Mozilla, Python.

(D) Static Font.

(B) Linux, Acrobat, Mozilla, PHP.


(D) Linux, Apache, MySQL, PHP.

(Q.7) A free, powerful, object- relational database system is


(A) Mozilla.
(B) Tomcat.
(C) PostgreSQL.
(Q.8) Indian language keymaps are known as
(A) Inscript keymaps.
(C) Indian Language Text.

(D) MySQL.

(B) Keymaps.
(D) Indic Language Keymaps.

(Q.9) The font which is not cross-platform compatible is


(A) Open Type Font.
(B) Static Font.
(C) True Type Font.
(D) Dynamic Font.
(Q.10) The font configuration can be categorized as
(A) True Type Font and Static font.
(B) Static font and Open Type Font.
(C) Open Type Font and Dynamic font. (D) Static fonts and Dynamic fonts.
(Q.11) FSF is an acronym for
(A) Freeware Source Formation.
(C) Freeware Software Foundation.

(B) Free Software Foundation.


(D) Free Software Formation.

(Q.12) To promoting open source software, we require


(A) OSI.
(B) FSF.

(C) W3C.

(Q.13) The software standards for World Wide Web are created by
(A) World Wide Web. (B) W3C.
(C) World Web Wide.

(D) FLOSS.
(D) W4C.

(Q.14) FLAC stands for


(A) Free Lossy Audio Codec.
(C) Free Lossy Audio Code.

(B) Free Lossless Audio Code.


(D) Free Lossless Audio Codec.

(Q.15) The full form of DVI is


(A) Data Independent Format.
(C) Data Independent Form.

(B) Device Independent Format.


(D) Device Independent Form.

(Q.16) The coding scheme for Indian scripts is


(A) ISCII.
(B) Transcription.
(C) Ogg Vorbis.

(D) ODF.

(Q.17) The mapping of keyboards keys to character is known as


(A) Phonetic Text Entry.
(B) Transliteration.
(C) Keymap based text entry.
(D) Image.
(Q.18) Open source scripting language for web development is
(A) MySQL.
(B) HTML.
(C) PHP.

(D) Tomcat.

(Q.19) The codename for Mozilla is


(A) Thunderbird.
(B) Seamonkey.

(C) Firemonkey.(D) Carnino.

(Q.20) The web browser that Mozilla uses for MAC OSX is known as
(A) LAMP.
(B) W3C.
(C) Firefox.

(D) Carnino.

(Q.21) ODE file extension for graphics file is


(A) .ody.
(B) .odg.

(D) .odc.

(Q.22) An example of open standard is


(A) PNG.
(B) AIFF(Apple Macintoshs).

(C) .odl.
(C) WMA(Microsofts).

(Q.23) An example of proprietary standard is


(A) RM(Real Media).
(B) HTML.
(C) PNG.

(D) RM(Real Media).

(D) JPEG.

(Q.24) Open Type fonts are


(A) 26 Bit fonts.
(B) 25 Bit fonts.

(C) 15 Bit fonts.

(D) 16 Bit fonts.

(Q.25) True Type Font is a/an


(A) 7-bit font.
(B) 6-bit font.

(C) 8-bit font.

(D) 9-bit font.

(Q.26) Verdana is an example of


(A) dynamic font.
(B) ASCII.

(C) static font.

(Q.27) Handwritten alphabets, calligraphic letters etc. are an example of


(A) dynamic fonts.
(B) static fonts.
(C) ASCII.

(D) ISCII.
(D) ISCII.

(Q.28) Unicode 3.1 represents


(A) 94,140 characters.(B) 94,150 characters.(C) 94,145 characters.(D) 94,142 characters.
(Q.29) Unicode 3.0 represents
(A) 54,276 characters.(B) 54,273 characters.(C) 49,194 characters.(D) 49,149 characters.
(Q.30) Set of displayable text characters in a font is known as
(A) specification.
(B) glyphs.
(C) protocols.
(Q.31) For every character Unicode provides a unique
(A) code.
(B) symbol.

(D) configuration.

(C) number.

(Q.32) ISCII code is a/an


(A) 8-bit code.
(B) 7-bit code. (C) 6-bit code.

(D) 9-bit code.

(Q.33) ASCII code is a/an


(A) 8-bit code.
(B) 7-bit code. (C) 6-bit code.

(D) 9-bit code.

(Q.34) ODE file extension is


(A) .odf.
(B) .oda.
(C) .odp.
(Q.35) Lossless formats
(A) compress data storage and maintain quality.
(B) compress data storage but do not maintain quality.
(C) do not compress data.
(D) do not maintain quality.
(Q.36) Lossy formats
(A) help in data expansion.
(C) compress data and reduce data storage.
(Q.37) A language used for web is
(A) Fortran.
(B) COBOL.
(Q.38) Ogg Vorbis is
(A) a lossy audio format specification.

(D) standard.

(D) .odc.

(B) increase the quality of the data.


(D) increase data storage.

(C) PASCAL.

(D) HTML.

(B) the name of a hardware.

(C) lossless compression format.

(D) an XML-based file format.

(Q.39) Open Document Format represents a/an:


(A) html document
(B) electronic documents.
(Q.40) ODF stands for
(A) Open Document Format.
(C) Open Documentation Formation.

(C) video file.

(D) audio file.

(B) Open Documentation Form.


(D) Open Document Formation.

(Q.41) Python is a/an


(A) operating system.
(B) structured programming language.
(C) low- level programming language.(D) interpreted, interactive programming language.
(Q.42) Pango creates software for
(A) those who speak English.
(B) those who speak Hindi.
(C) those who speak underrepresented languages.
(D) those who speak widely spoken languages.
(Q.43) Apache Server is a web server component of
(A) LAM.
(B) LAMP.
(C) MALP.

(D) LAMB.

(Q.44) The two PNGs that were created to improve upon and replace GIF and also to optimize the display of images on
internet are
(A) PNG-6 and PNG-23.
(B) PNG-7 and PNG-22.
(C) PNG-8 and PNG-24.
(D) PNG-8 and PNG-25.
(Q.45) Programming language specifically for server side applications and developing dynamic web content is
(A) PHP.
(B) Oracle.
(C) MySQL.
(D) Java.
(Q.46) The format in which the data is encoded in such a way that the file is only readable with the original software to create
it is
(A) proprietary. (B) closed.
(C) open.
(D) free.
(Q.47) A Java technology that allows developers to dynamically generate HTML or some other type of web page is
(A) JVM.
(B) JSP.
(C) Tomcat.
(D) Applet.
(Q.48) When we press the key horizontally adjacent to CapsLock on our keyboard, the letter a gets typed, is an example of
(A) Phonetic Text Entry.
(B) Keymap Based Text Entry.
(C) Indian Language Computing.
(D) Alphanumeric Text Entry.
(Q.49) When a program/process can split itself into two or more simultaneously running tasks, it is known as
(A) Structure.
(B) Threading. (C) Multithreading.
(D) Applet.
(Q.50) The fundamental part of an operating system which is responsible for providing secure access to machines hardware
and other resource to computer programs is
(A) CPU.
(B) RAM.
(C) Motherboard.
(D) Kernel.
(Q.51) A picture compression format which is very light and allows to determine the rate of data compression is
(A) GIF.
(B) Joint Photographic Expert Group.
(C) SVG.
(D) PNG.
(Q.52) Phonetic Text Entry is also known as
(A) translation. (B) transcription.
(C) transcription.
(Q.53) A free software is
(A) used under license.
(C) freely used, modified and redistributed.
(D) specific to a particular software distribution.
(Q.54) Open Source software is
(A) same as free software.
(B) same as FOSS.

(D) transliteration.

(B) payable.

(C) chargeable. (D) same as FLOSS.

(Q.55) FLOSS refers to


(A) Free Language Open Source Software.
(C) Free Linguistic Open Source Software.
(Q.56) GNU is a
(A) free software.
(C) free and/or open Source Software.

(B) Free Libre and Open Source Software.


(D) Free Libre Open Software Source.
(B) open source software.
(D) free as well as open Source Software.

(Q.57) In a Proprietary Software


(A) modification is allowed.
(B) source code is available.
(C) neither modification is allowed nor source is available.
(D) modification is allowed and source code is available.
(Q.58) PostgreSQL can be downloaded from
(A) www.postgresql.co.in.
(C) www.postgresql.com.

(B) www.postgresql.org.
(D) www.mysql.org.

(Q.59) The official website for Tomcat is


(A) www.tomcat.org.
(C) http://tomcat.org.

(B) http://jakarta.apache/tomcat.
(D) http://jakarta.apache.org/tomcat.

(Q.60) The home page of PHP is


(A) www.php.com.
(B) www.php.com.

(C) www.php.net.

(Q.61) A way to encode information is known as


(A) Format.
(B) StarOffice Basic.
(C) XML.
(Q.62) A web browser is also known as
(A) HTML.
(B) WWW client.
(Q.63) A web server is also known as
(A) World Web Wide. (B) WWW client.
(Q.64) SVG stands for
(A) Size Vector Graphics.
(C) Scalable Vector Graphics.

(D) htpp://www.php.org.

(D) BSD.

(C) WWW server.


(C) WWW server.

(D) W3C.

(D) W3C.

(B) Scale Vector Graphics.


(D) Source Vector Graphics.

(Q.65) The languages to typset documents and programming language are


(A) TeX and HTML.
(B) ODF and XML.
(C) LaTeX and XML.(D) TeX and LaTeX.
(Q.66) The acronym for ASCII is
(A) American Standardization Code for Information Interchange.
(B) America Standard Code for Information Interchange.
(C) American Standard Code for Information Interchange.
(D) America Standard Code for Interchange of Information.
(Q.67) The font that will not work with older processors or printers
(A) Static Fonts.
(B) True Type Font.
(C) Open Type Font.
(Q.68) .ods is an extension used for
(A) source files.
(B) style files.

(C) spreadsheet files.

(Q.69) To store and play digital music, we use


(A) Org Vorbis.
(B) FLAC.

(D) Dynamic Font.

(D) sequential files.

(C) Ogg Vorbis.

(D) DVI.

(Q.70) The openDocument format can be used on


(A) only free software.
(B) only open software.
(C) only proprietary software.
(D) free, open software and proprietary software.
(Q.71) The compression format for FLAC is
(A) lossy.
(B) lossless.

(C) video.

(D) audio.

10

(Q.72) An example of Apple Media format is


(A) .mov.
(B) .wma.

(C) .ppt.

(D) .docx.

(Q.73) An example of Microsoft office format is


(A) .mov
(B) .ppt

(C) .wma

(D) .wmv

(Q.74) An example of Windows Media format is


(A) .doc.
(B) .xls.

(C) .ppt.

(D) .wmv.

(Q.75) The other name for proprietary standard is


(A) open standard.
(B) inclusive standard. (C) closed standard.

(D) freeware.

(Q.76) The other name for proprietary standard is


(A) exclusive standard. (B) open standard.
(C) shareware. (D) inclusive Standard.
(Q.77) The script that runs at client-end is
(A) Servlet.
(B) JSP.

(C) Applet.

(D) Tomcat.

(Q.78) The script that runs at server-end is


(A) Servlet.
(B) JSP.

(C) Applet.

(D) Tomcat.

(Q.79) PHP is a /an


(A) operating system.

(B) editor.

(C) open source programming language.(D) web browser.

(Q.80) Arial font is an example of


(A) Dynamic Font.
(B) Static Font.

(C) True Type Font.

(Q.81) An example of dynamic font is


(A) Verdana.
(B) Times New Roman. (C) Grafiti.

(D) Open Type Font.

(D) Bookman Old Style.

(Q.82) The technical process of making glyphs visible on a display device is


(A) correcting.
(B) editing.
(C) synchronizing.
(D) rendering.
(Q.83) The ability to interact in diverse Indian Languages on electronic systems is referred to as
(A) Unicode.
(B) ASCII.
(C) Indic Language Computing. (D) ISCII.
(Q.84) The Indian Language keymaps are known as
(A) Indian Script keymaps.(B) Scripting keymaps.(C) Mapping of keys.(D) Inscript of keys.
(Q.85) Hand-printed capitals is an example of
(A) Static Fonts.
(B) Dynamic Fonts.
(Q.86) The other name for Mozilla is
(A) Thunderbird.
(B) Seamonkey.

(C) True Type Font.

(D) Open Type Font.

(C) Firefox.(D) Mozilla Application Suite.

(Q.87) When a program is executed by CPU, it is called a


(A) procedure.
(B) structure.
(C) process.

(D) paradigm.

(Q.88) When a system/software can support multiple users simultaneously, it is known as


(A) multiple-user system.
(B) multiple-user software.
(C) multi-user software. (D) multi-user system.
(Q.89) Writer is an example of
(A) Pango.
(B) Tomcat.

(C) OOo Version 1.1.

(Q.90) The platform for which Python was originally programmed is


(A) Amoeba.
(B) Windows.
(C) Macintosh.
(Q.91) The ISCII script applies to
(A) Hebrew script.
(B) Parsi script.

(C) Gurmukhi script.

(D) Mozilla.

(D) Linux.
(D) French script.

11

(Q.92) Data can be transported through many different systems without corruption with the help of
(A) ISCII.
(B) Unicode.
(C) ASCII.
(D) Alphanumeric code.
(Q.93) A function for a servlet container is
(A) SQL.
(B) MySQL.

(C) Tomcat.

(D) PHP.

(Q.94) The standards for which the users have to buy license to use them are
(A) open standards.
(B) proprietary standards.
(C) mixed standard.(D) free standard.
(Q.95) An example of proprietary standard is
(A) HTML.
(B) OGG.

(C) Windows Media Format.

(D) ASCII.

(Q.96) An open standard format is


(A) Apple Media Format.
(B) Portable Network Graphics.(C) Windows Media Format.(D) Microsoft Office Format.
(Q.97) HTML stands for
(A) Hyper Text Marking Language.
(C) Hyper Text Markup Language.

(B) Hyper Text Mark-in Language.


(D) Hyper Text Makeup Language.

(Q.98) Open Type Font format is an extension of


(A) Static Font format. (B) Dynamic Font format.(C) Glyphs format.(D) True Type Font format.
(Q.99) Encoding used to handle large glyph sets in Open Type fonts is
(A) ASCII.
(B) ISCII.
(C) Unicode.

(D) Static.

(Q.100) What are the types of Indian Language Text Typing? Explain.
(Q.101) What do you mean by free software?
(Q.102) Explain the term ASCII in detail.
(Q.103) What do you mean by the term open source software?
(Q.104) What is Mozilla software used for?
(Q.105) What is Linux used for?
(Q.106) What is Apache used for?
(Q.107) What is Tomcat used for?
(Q.108) Expand the term: GNU.
(Q.109) Expand the term: SDLC.
(Q.110) What is MySQL software used for?
(Q.111) Define lossless format.
(Q.112) Define lossy format.
(Q.113) Explain the term ODF.
(Q.114) What do you mean by the term standard? What are the different types of standards?
(Q.115) What are the four kinds of freedom that are required by the users of the free software?
(Q.116) Alisha is familiar with the term 'web'. But she does not know about W3C. Explain W3C.
(Q.117) Ajit has been asked by his teacher to prepare one paragraph in static font and one in dynamic font. But he is
confused between the two. Explain static fonts and dynamic fonts. Give one example of each.
(Q.118) What do you mean by the term Ogg Vorbis?
(Q.119) Explain True Type Font in detail.
(Q.120) Explain Open Type Font in detail.
(Q.121) Vaibhav is confused between GNU and Unix. Is there any difference between the two or are they same? Explain
GNU in brief.
(Q.122) Explain the advantages of Open Standards.
(Q.123) What do you mean by free software?
(Q.124) What do you mean by the term open source software?
(Q.125) What is Mozilla software used for?
(Q.126) Explain the term ISCII in detail.
(Q.127) Explain freeware in detail.
(Q.128) Explain shareware in detail.
(Q.129) Write any 5 distribution terms of open source software.
(Q.130) What are the dangers of proprietary standards?
(Q.131) What are the various kinds of ODE file extensions and what are they used for?
(Q.132) Explain the term Indian Language Computing. What is the significance of Unicode in Indian Language Computing?
(Q.133) What is a font? Write the advantages and disadvantage of OTF?

12

Java GUI Programming Revision Tour - I


(Q.1) The value of y displayed in the following code is
public class Test {
public static void main(String[ ] args) {
int x = 1;
int y = x + x++;
System.out.println("y is " + y);
}
}
(A) 1.
(B) 2.
(C) 3.
(D) 4.
(Q.2) An object that defines a screen element such as a push button, text field, scroll bar, menu etc. is called
(A) toolkit.
(B) component. (C) container. (D) button.
(Q.3) The value of k after the following code fragment is
int k = 0;
int n = 12;
while (k < n)
{
k = k + 1;
}
(A) 0.
(B) 11.
(C) 12.
(D) Unknown.
(Q.4) The following line of code means: double table[ ];
(A) table is a variable to refers to a real number.
(B) table is a variable that refers to two numbers.
(C) it is not legal Java code.
(D) table is a variable that refers to an array.
(Q.5) The statement in which the value of the expression is compared with each of the literal values in case statements is
(A) switch.
(B) goto.
(C) if-else.
(D) jump.
(Q.6) Loop that repeats a set of statements a certain number of times until a condition is matched is
(A) goto.
(B) if-else.
(C) switch.
(D) for loop.
(Q.7) The value of i in following code as output is
public class Test {
public static void main(String[ ] args) {
int j = 0;
int i = ++j + j * 5;
System.out.println("What is i? " + i);
}
}
(A) 0.
(B) 1.
(C) 5.
(D) 6.
(Q.8) The value of y displayed in the following code is
public class Test {
public static void main(String[ ] args) {
int x = 1;
int y = x++ + x;
System.out.println("y is " + y);
}
}
(A) 1.
(B) 2.
(C) 3.
(D) 4.
(Q.9) The two parts of a value of type float is
(A) significant digits and exponent.
(B) mode and numerator.
(C) length and exponent.
(D) numerator and denominator.
(Q.10) The output of the following program fragment is

13

for ( int j = 0; j < 5; j++ )


{
System.out.print( j + " " );
}
System.out.println( );
(A) 0 1 2 3 4 5. (B) 0 1 2 3 4. (C) 0 1 2 3 4 5. (D) j j j j j.
(Q.11) The program which is written to respond to the button clicks, menu selections and other actions of the user in
whatever order the user does them is
(A) event-driven.
(B) action-driven.
(C) user-driven. (D) mouse-driven.
(Q.12) The following program output to the monitor is
int value = 0;
int count = 1;
value = count++;
System.out.println("value:"+value "+count:"+ count);
(A) value: 0 count: 0.
(B) value: 0 count: 1. (C) value: 1 count: 1. (D) value: 1 count: 2.
(Q.13) The following program output to the monitor is
int value = 0;
int count = 1;
value = ++count ;
System.out.println("value: "+ value " + count: " + count );
(A) value: 0 count: 1.
(B) value: 1 count: 1. (C) value: 1 count: 2. (D) value: 2 count: 2.
(Q.14) The output of the following code is
int a = 0;
int b = 10;
a = --b ;
System.out.println("a: " + a + " b: " + b );
(A) a: 9 b:11.
(B) a: 10 b: 9. (C) a: 9 b:9.

(D) a: 0 b:9.

(Q.15) The output of the following program is


double w = 12.5 ;
w *= 2 ;
System.out.println( " w is " + w );
(A) w is 12.5.
(B) w is 13.5.

(D) w is 2.

(C) w is 25.0.

(Q.16) The output of the following code fragment is


for ( int j = 10; j > 5; j-- )
{
System.out.print( j + " " );
}
System.out.println( );
(A) 10 11 12 13 14 15. (B) 9 8 7 6 5 4 3 2 1 0. (C) 10 9 8 7 6 5.

(D) 10 9 8 7 6.

(Q.17) The change to be done so that the following fragment prints out the even integers 0 2 4 6 8 10 are
for ( int j = 0; j <= 10;
)
System.out.print( j + " " );
System.out.println( );
(A) j+2.
(B) j = j+2.
(C) j++++.
(D) ++j++.
(Q.18) The output of the following code fragment is
for ( int j = 5; j > -5; j-- )
System.out.print( j + " " );
System.out.println( );
(A) -5 -4 -3 -2 -1 0.
(B) 5 4 3 2 1 0.
(C) 5 4 3 2 1 0 -1 -2 -3 -4 -5.
(D) 5 4 3 2 1 0 -1 -2 -3 -4.
(Q.19) The value placed in var is
var = 12 > 9 ? 0 : 1;
(A) 0.
(B) 1.
(C) 9.

(D) 12.

14

(Q.20) The value placed in p is


int x = 5, y = 19;
p = y-x > x-y ? y-x : x-y ;
(A) 5.
(B) 19.
(C) 14.

(D) -14.

(Q.21) The value placed in choice is


int a=5, b=10, c=15 ;
choice = a>b && a > c ? a : (b > c ? b : c) ;
(A) 5.
(B) 10.
(C) 15.

(D) 0.

(Q.22) The value placed in sum is


double sum = 10.0, price=100;
sum += price>=100 ? price*1.1 : price;
(A) 90.
(B) 100.
(C) 110.

(D) 120.

(Q.23) The following statement print


int count = 10;
do
{
System.out.print( count +" ");
count-- ;
}
while ( count >= 5 );
(A) 10 9 8 7 6 5.
(B) 10 9 8 7 6 5 4.

(C) 9 8 7 6 5.

(D) 9 8 7 6 5 4.

(Q.24) The type of loop implemented with a do statement is


(A) top-driven loop.
(B) bottom-driven loop. (C) off-by-one loop.

(D) while loop.

(Q.25) The output of the following code fragment is


for ( int count = 0; count <= 20; count+=2 )
System.out.print( count + " " );
System.out.println( );
(A) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20.(B) 0 2 4 6 8 10.
(C) 0 2 4 6 8 10 12 14 16 18.
(D) 0 2 4 6 8 10 12 14 16 18 20.
(Q.26) The name for a method that responds to events is a
(A) container method. (B) snoop method.
(C) listener method.

(D) application method.

(Q.27) GUI are built from


(A) icons.

(D) classes.

(B) containers. (C) controls.

(Q.28) GUI builder is also known as


(A) Design area.
(B) GUI creation.

(C) Source area.

(D) Java virtual machine.

(Q.29) Window which contains all the components needed to create GUI application is (1Mark)
(A) Inspector window. (B) Code editor window. (C) Properties window. (D) Palette.
(Q.30) While drawing a control on the form, we first draw
(A) container control.
(B) child control.
(C) toolkit.
(Q.31) When a button is pushed,
(A) a message is generated.
(C) a key event is generated.

(D) swing.

(B) an action event is generated.


(D) mouse event is generated.

(Q.32) The listener interface that gets activated when the user presses a key on the keyboard is
(A) ActionListener.
(B) KeyListener.
(C) ChangeListener.
(D) FocusListener.
(Q.33) Backspace, tab, carriage return etc. are examples of
(A) graphic characters(B) string characters(C) missing characters(D) non-graphic characters.
(Q.34) Unicode characters can be represented in

15

(A) 8 bits.

(B) 16 bits.

(C) 32 bits.

(D) 64 bits.

(Q.35)A method that returns text currently stored in a text based GUI component is
(A) getText( ). (B) parse( ) method.
(C) setText( ).
(D) returnText( ).
(Q.36) A component that displays an icon but that doesnt react to user clicks is
(A) textbox.
(B) label.
(C) list.
(D) table.
(Q.37) Swing components that do not rely on native GUI are referred to as
(A) lightweight components.(B) heavyweight components.(C) GUI components.(D) non-GUI components.
(Q.38) Java compiler translates Java source code into
(A) java bytecode.(B) machine code.
(C) assembly code.(D) another high-level language code.
(Q.39) Pressing a button generates a/an
(A) ItemEvent.
(B) MouseEvent.

(C) MouseMotionEvent. (D) ContainerEvent.

(Q.40) The operator = is a/an


(A) assignment operator.(B) relational operator.(C) comparison operator.(D) unary operator.
(Q.41) IDE stands for
(A) Integrated Developed Environment.
(C) Integrated Development Environment.

(B) Integration Development Environment.


(D) Integration Developed Environment.

(Q.42) JVM stands for


(A)Java Vocal Machine(B)Java Virtual Machine(C)Java Vocal Macintosh(D)Java Virtual Macintosh
(Q.43) RAD stands for
(A) Rapid Application Development.
(C) Rapid Application Data.

(B) Rapid Access Development.


(D) Rapid Access Data.

(Q.44) To be a listener for ActionEvent, an object must be an instance of


(A) ActionEvent.
(B) ActionListener.
(C) EventObject.
(Q.45) User clicking on a button, generates a/an
(A) event.
(B) button object.
(C) container.
(Q.46) AWT stands for
(A) Atomic Weight Toolkit.
(B) Abstract Window Toolkit.
(C) Applet Wise Toolkit.
(D) Absolute Window Toolkit.

(D) WindowListener.
(D) listener.

(Q.47) Java compiler translates Java source code into


(A) java bytecode.(B) machine code.
(C) assembly code.(D) another high-level language code.
(Q.48) The area on the frame where GUI components are placed is called
(A) container.
(B) content pane.
(C) label.
(Q.49) When a button is pushed,
(A) a message is generated.
(C) a key event is generated.

(D) control.

(B) an action event is generated.


(D) mouse event is generated.

(Q.50) Java programs are compiled into Java


(A) setup.
(B) interpreter.

(C) compiler.

(D) bytecode.

(Q.51) An object that represents some occurrence, is an


(A) event source.
(B) event listener.
(C) event.

(D) event driven interface.

(Q.52) Java solves the problem of platform-independence by using


(A) intermediate code. (B) partial code. (C) virtual code. (D) byte code.
(Q.53) The other name for floating literals is
(A) real literals. (B) constant literals.
(C) boolean literals.

(D) string literals.

16

(Q.54) Classes, arrays and interface are examples of


(A) primitive data types.
(B) reference data types.
(C) fundamental data types.
(D) boolean data types.
(Q.55)A named memory location, which holds a data value of a particular data type is
(A) variable.
(B) reference.
(C) string.
(D) object.
(Q.56) parse( ) methods are used to obtain
(A) text, i.e., string type of data from a GUI component.
(B) boolean type of data from a GUI component.
(C) numeric type data from a GUI component.
(D) character type of data from a GUI component.
(Q.57) If Student is an object, then roll no, name, marks etc. are its
(A) classes.
(B) behaviour.
(C) methods.
(Q.58) The expression: ! (1 &&0 || !1) evaluates to
(A) false.
(B) error.
(Q.59) During a program run, literals are
(A) constants.
(B) varying float numbers.
(Q.60) Keywords as normal identifier names
(A) cannot be used.
(B) can be used.

(D) attributes.

(C) run time error.


(C) varying integers.

(D) string.

(C) may/ may not be used.(D) can only be used.

(Q.61) The smallest individual unit in a program is


(A) token.
(B) character. (C) string.

(D) unicode.

(Q.62) The number of tokens available in Java is


(A) two.
(B) three.
(C) four.

(D) five.

(Q.63) Java is both compiled and


(A) interpreted.
(B) run.

(D) true.

(C) transferred. (D) accessed.

(Q.64) The difference between a TextArea and a TextField is


(A) TextArea can handle multiple lines of text.
(B) TextArea can be used for output.
(C) TextArea is not a class.
(D) TextAreas are used for displaying graphics.
(Q.65) Control statements that allow the program to choose different paths of execution is
(A) Iteration.
(B) Selection.
(C) Sequence.
(D) Looping.
(Q.66)Control statements enable program execution to repeat one or more statements is(1Mark)
(A) Iteration.
(B) Selection.
(C) Sequence.
(D) Looping.
(Q.67)Control statements that allow the program to execute in a non-linear fashion is(1Mark)
(A) switch.
(B) if-else.
(C) jump.
(D) goto.
(Q.68) Java assignment operator is
(A) ==
(B) :=

(C) =

(Q.69) To assign a value 1 to variable x, we write


(A) 1 = x;
(B) x = 1;

(D) =:
(C) x := 1;

(Q.70) Data type that requires the most amount of memory is


(A) long.
(B) int.
(C) short.

(D) 1 := x;
(D) byte.

(Q.71) To declare an int variable number with initial value 2, we write


(A) int number = 2L;
(B) int number = 2l;
(C) int number = 2;(D) int number = 2.0;
(Q.72) The result of 45 / 4 is
(A) 10.
(B) 11.

(C) 11.25.

(D) 12.

17

(Q.73) The expression that results a value 1 is


(A) 2 % 1.
(B) 15 % 4.

(C) 25 % 5.

(D) 37 % 6.

(Q.74)If we attempt to add an int, a byte, a long and a double, the result will be a(1Mark)
(A) byte.
(B) int.
(C) long.
(D) double.
(Q.75) A Java character is stored in
(A) one byte.
(B) two bytes.

(C) three bytes. (D) four bytes.

(Q.76) An infinite loop is a loop that


(A) functions infinitely well.(B) runs forever.

(C) never starts.(D) will never function.

(Q.77) A component that displays an icon but that doesnt react to user clicks is
(A) textbox.
(B) label.
(C) list.
(D) table.
(Q.78) A self contained graphic entity that can be customized is
(A) Swing component.(B) Swing container.
(C) Java Applets.

(D) Java Foundation Classes.

(Q.79) JButton, JCheckBox are


(A) Interactive Displays.(B) Containers.(C) Abstract Window Toolkit.(D) Basic Controls.
(Q.80)A component that enables the user to choose a single or multiple values is a
(A) text field.
(B) combo box.
(C) list.
(D) label.
(Q.81) Heavyweight and lightweight components can (with a few exceptions) be grouped as follows
(A) Swing and AWT components.
(B) Frames and Panels.
(C) AWT and Swing components.
(D) Panels and Frames.
(Q.82) java.swing.JComponent is the parent of almost all Swing components. It is a direct subclass of
(A) java.awt.Frame.
(B) java.awt.Container. (C) java.lang.Object.(D) SwingUtilities.
(Q.83) The fundamental classes for GUI programming are contained in the
(A) GUI toolkit.
(B) Abstract Windowing Toolkit.
(C) Graphics Event Toolkit.
(D) Java Enhancement Toolkit.
(Q.84) The three software parts of a GUI program are
(A) Windows, Buttons, Mice.
(B) GUI Components, Graphics, Code.
(C) GUI Components, Event Listeners, Application Code.(D) Frames, Code, Events.
(Q.85) The one component that nearly all GUI programs will have is
(A) Window.
(B) Mouse.
(C) Monitor.

(D) Button.

(Q.86) A container object in GUI programming is


(A) another name for an array or vector. (B) any class that is made up of other classes.
(C) a primitive variable that contains the actual data.
(D) a GUI component that has other GUI components placed inside of it.
(Q.87) When the user clicks on a button, a/an
(A) Event, is generated. (B) Button object is generated.
(C) Container is generated.
(D) Listener is generated.
(Q.88) The base class of all Swing classes is
(A) Object.
(B) Component.

(C) Swing.

(D) JComponent.

(Q.89) The meaning of variable++ is


(A) add one to the variable.
(B) add one to the variable after its current value has been used.
(C) add one to the variable before using its value.
(D) double the value in the variable.
(Q.90) An operator having the HIGHEST precedence is
(A) (unary)- !
(B) * /
(C) + (D) < <= > >=

18

(Q.91) An operators having the LOWEST precedence is


(A) == !=
(B) && ||
(C) < <= > >=

(D) * /

(Q.92) The three general types of looping structures are


(A) counting loop, sentinel-controlled loop and result-controlled loop.
(B) infinite loop, counting loop and nested loop.
(C) while loop, for loop and do loop.
(D) count up loop, count down loop and infinite loop.
(Q.93) The branching statements in a programming language are
(A) statements that affect the execution of loops.
(B) statements like if that make choices.
(C) statements that evaluate Boolean expressions.
(D) statements that are used to build classes.
(Q.94) A sequence of statements contained within a pair of braces (" { " and "}" ) is called a
(A) block.
(B) blob.
(C) branch.
(D) brick.
(Q.95) An event object
(A) represents one specific event, such as a mouse click.
(B) is an object that listens for mouse clicks.
(C) is a list of all the events that have happened in the system.
(D) is what program does in response to an event.
(Q.96) An object that waits for and responds to an event from a GUI component is a
(A) event listener.
(B) GUI listener.(C) collection class.
(D) click listener.
(Q.97) The letter with which many Swing class names start with is
(A) A.
(B) B.
(C) J.
(D) S.
(Q.98) The base class of all Swing classes is
(A) Object.
(B) Component.

(C) Swing.

(D) JComponent.

(Q.99) Number of times is a do while loop guaranteed to loop is


(A) 0.
(B) Infinitely.
(C) 1.
(D) Variable.
(Q.100) Statement that is required to avoid falling-through from one case to the next is
(A) end;
(B) break;
(C) stop;
(D) semicolon.
(Q.101) What is an interface?
(Q.102) What is an IDE? Give Example.
(Q.103) Define the terms: Event

Component

Widget

(Q.104) What is the value of i and j in the two cases given below:
a) i=7
j= i ++
b) i=8
j= --i
(Q.105) Explain the terms:
(a) Character Constant
(b) String Literal
(Q.106) Write steps to add event handler for Jbutton control.
(Q.107) What are operators? Name them.
(Q.108) How does while loop execution occur?
(Q.109) What are Literals. Name the literals allowed in Java.
(Q.110) What does a break statement do?
(Q.111) What is a fall through?
(Q.112) What are the characteristics of Java?
(Q.113) Describe the relationship between properties, methods and events.
(Q.114) What is a character set?
(Q.115) The do-while loop is an exit-controlled loop. Explain?

19

(Q.116) What is byte code?


(Q.117) How can we remove a control from the frame/window?
(Q.118) How is event handler access in NetBeans IDE?
(Q.119) What is a container? Name few examples.
(Q.120) What is GUI Builder? What is the difference between source view & design view?
(Q.121) What is code editor window? How can we open the code window?
(Q.122) What are Binary and Unary Operators?
(Q.123) What is String? Explain with an example.
(Q.124) What are RAD Tools?
(Q.125) What does the following line mean:
public class HelloForm extends javax.swing.JFrame
(Q.126) What is NetBeans IDE? What are the components of NetBeans IDE?
(Q.127) How is numeric data converted into String data?
(Q.128) Explain the significance of import statement in following statement:
import javax.swing.JOptionPane;
(Q.129) Write steps to create a project in NetBeans IDE.
(Q.130) Name the methods used for text interaction in a GUI. Explain them briefly. (4Marks)
(Q.131) What is wrong with following while loop?
int number = 1
while(number<100)
System.out.println(number);
number++;
Java GUI Programming Revision Tour - II
(Q.1) JButton, JCheckBox are
(A) Interactive Displays.(B) Containers. (C) Abstract Window Toolkit.(D) Basic Controls.
(Q.2) The Layout Manager that places components in a grid of equally sized cells is (1Mark)
(A) GridBagLayout.
(B) GridLayout. (C) BoxLayout.
(D) AbsoluteLayout.
(Q.3) Swing components that do not rely on native GUI are referred as
(A)lightweight components(B)heavyweight components(C)GUI components(D)non-GUI components.
(Q.4) To draw graphics, it is better to declare a class that extends
(A) Jlabel.
(B) Jbutton.
(C) JPanel.
(D) JComponent.
(Q.5) Pressing a button generates a/an
(A) ItemEvent.
(B) MouseEvent.

(C) MouseMotionEvent. (D) ContainerEvent

(Q.6) The component that processes the listener is called a/an


(A) source object.
(B) adapter object.
(C) listener object.
(Q.7) Each event class has a corresponding
(A) listener interface.
(B) listener object.

(D) adaptee object.

(C) source object.(D) multiple listeners.

(Q.8) The option that allows multiple components to be arranged either vertical or horizontal is known as
(A) GridLayout Layout Manager.
(B) GridBagLayout Layout Manager.
(C) CardLayout Manager.
(D) BoxLayout Manager.
(Q.9) A component that lets the user pick a colour is a
(A) colour chooser.
(B) combo box. (C) list box.

(D) colour pick.

(Q.10) A component that displays an icon, but doesnt react to user clicks is a
(A) textbox.
(B) label.
(C) list.
(D) table.
(Q.11) An object that can be set so that multiple items can be selected at the same time is a
(A) Combo Box.
(B) List.
(C) Radio Button.
(D) Tree.
(Q.12)Clicking the closing button on the upper-right corner of a frame generates a/an(1Mark)
(A) ItemEvent.
(B) WindowEvent.
(C) MouseMotionEvent. (D) ComponentEvent.
(Q.13) An associated object of a list that handles the list data is

20

(A) list group.

(B) list model.

(C) list structure.

(D) list data item.

(Q.14) Layout manager where components are given their preferred size is
(A) GridLayout.
(B) FlowLayout.
(C) BoxLayout.
(D) BorderLayout.
(Q.15) The type of control used to display list of values in a list is called
(A)pear shaped control(B)triangle shaped control(C)box shaped control(D)circle shape control
(Q.16) A JList object generates a/an
(A) Adjustment Event. (B) List Selection Listener.(C) Action Event.

(D) Text Event.

(Q.17) To generate random numbers, we use


(A) import java.util.Random;
(B) import java. Swing.Random;
(C) import java.awt.Random;
(D) import java.Timer.Random;
(Q.18) A JList object generates a/an
(A) Adjustment Event. (B) List Selection Listener.

(C) Action Event.

(D) Text Event.

(Q.19) The number of List Type controls used by java Swing API are
(A) 2.
(B) 3.
(C) 4.
(D) 5.
(Q.20) The mechanism to fire events at regular intervals is implemented through a/an (1Mark)
(A) List
(B) ComboBox. (C) Timer.
(D) Alarm.
(Q.21) Java offers timers through
(A) Swing API only.(B) util library only.

(C) Swing API as well as utill library(D)AWT only

(Q.22) When user makes a selection, a JList fires


(A) ListSelect Event.
(B) SelectList Event.(C) ListChoose Event.(D) ListSelection Event.
(Q.23) The contents of an object that can be specified using an array of objects is (1Mark)
(A) JColumn.
(B) JRow.
(C) JList.
(D) JTable
(Q.24) The list selection mode where only one item can be selected at a time is
(A) Single Selection.
(B) Single Interval Selection.
(C) Multiple Interval Selection. (D) List Selection Model.
(Q.25) An object that can be set so that multiple items can be selected at the same time is a
(A) Combo Box.
(B) List.
(C) Radio Button.
(D) Tree.
(Q.26) An object implementing an interface with an event handler method is
(A) Mouse Event.
(B) Component Event. (C) Event Listener.

(D) Action Event.

(Q.27) An object that is created when an event occurs is


(A) Event listener.
(B) Key Event.
(C) Focus Event.

(D) Event Object.

(Q.28) A control that provides a menu from which the user can choose one of several options is a
(A) Slider.
(B) Check Box.
(C) Combo Box.
(D) Password Field.
(Q.29) A combo box generates an Action Event when the user
(A) fixes a content.
(B) adds an item.
(C) removes an item.(D) makes a selection from it.
(Q.30) A method that responds to an event is
(A) an event handler.
(B) firing an event.

(C) an action.

(D) a listener.

(Q.31) Placing a component in equally sized grid is known as


(A) GridLayout Layout Manager. (B) GridBagLayout Layout Manager.
(C) CardLayout Manager.
(D) BoxLayout Manager.
(Q.32) A container that lets the user determine how two components share a limited amount of space is called
(A) Editor pane.
(B) Text pane. (C) Split pane.
(D) Scroll pane.

21

(Q.33) A component that looks like a button and that, when pressed, brings up a menu of items for the user to choose from is
a/an
(A) Uneditable combo box.(B) Editable combo box.(C) Interactive Display.(D) Pop Up menu.
(Q.34) A class that provides a component that displays multiple lines of text and optionally allows the user to edit the text is
(A) JTextfield.
(B) editor pane.
(C) JTextArea.
(D) label.
(Q.35) A class that provides a component that displays multiple lines of text and optionally allows the user to edit the text is
(A) JTextfield.
(B) Editor pane.
(C) JTextArea.
(D) label.
(Q.36) The three important players in event handling mechanism are: Event Source, Event Handler of Event listener and
(A) Event Object.
(B) Class Object.
(C) Mouse Object.
(D) Listener.
(Q.37) A container that looks like a frame, but that appears within a real frame is known as
(A) an internal frame. (B) a mainframe.
(C) an externalframe.(D) an internalwindow.
(Q.38) Changing the state of an object is called an
(A) Event.
(B) Event handler.

(C) Action listener.

(Q.39) An object that generates an event is called a/an


(A) Event Listener.
(B) Listener Interface. (C) Source.

(D) Source.

(D) Applet.

(Q.40) The default layout for a ContentPane in JFC is


(A) GridLayout.
(B) FlowLayout.
(C) BoxLayout. (D) BorderLayout.
(Q.41) A method of the Component class used to set the position and size of a component is
(A) setBounds.
(B) setLocation.
(C) setSize.
(D) setPosition.
(Q.42) A method used to add a menu bar to a top-level container such as a JFrame is (1Mark)
(A) getJMenuBar
(B) setJMenuBar
(C) update.
(D) setLayout.
(Q.43) A method used to enable and disable components such as JButtons is
(A) enable().
(B) setEnabled(boolean b).
(C) isEnabled(). (D) disable().
(Q.44) Default Layout Manager for the Applet class in Java is
(A) BorderLayout.
(B) GridLayout.
(C) CardLayout.
(Q.45) A self contained graphic entity that can be customised is
(A) Swing component.(B) Swing container.
(C) Java Applets.

(D) FlowLayout.
(D) Java Foundation Classes.

(Q.46) Containers that have some predefined specific role are


(A) Basic Controls.
(B) General Purpose Containers.
(C) Special Purpose Containers.(D) Interactive Displays
(Q.47) Most common event that is fired from a text field is
(A) window event.
(B) action performed. (C) focus event. (D) action event.
(Q.48) The default echoChar is
(A) comma(,). (B) curly bracket{}.

(C) dot(.).

(D) blank.

(Q.49) The role of nextFocusableComponent is to


(A) occur when an object receives focus.
(B) occur when an object loses focus.
(C) receive user input.
(D) specify the component that should receive the focus next when tab is pressed
(Q.50) A bar representing a range of numbers and having a knob is called a
(A) slider.
(B) scrollbar.
(C) titlebar.
(D) menubar.
(Q.51) If you want the text area to display its text using multiple fonts or other styles, you should use
(A) editor pane.
(B) label.
(C) textfield.
(D) textarea.
(Q.52) A JTextArea mainly fires

22

(A) Action Events.

(B) PropertyChange events.

(C) Button Events.(D) Focus Events.

(Q.53) int getMaximum( ) method returns the


(A) value of block incremented. (B) orientation of scrollbar.
(C) maximum value of scrollbar. (D) current value.
(Q.54) A method used to enable and disable components such as JButton is
(A) enable().
(B) setEnabled(boolean b).
(C) isEnabled(). (D) disable().
(Q.55) Maintaining a consistent appearance across the platform can be done through
(A) GridLayout Layout Manager.
(B) GridBagLayout Layout Manager.
(C) CardLayout Manager.
(D) BoxLayout Manager.
(Q.56) A component that can span multiple rows, columns or both is known as
(A) GridLayout Layout Manager.
(B) CardLayout Manager.
(C) BoxLayout Manager.
(D) GridBagLayout Layout Manager.
(Q.57) Each component is like a deck and is known as
(A) CardLayout Manager.
(B) BoxLayout Manager.
(C) GridLayout Layout Manager. (D) GridBagLayout Layout Manager.
(Q.58) In CardLayout, a component shares the
(A) common window. (B) display space.
(C) select window.

(D) main space.

(Q.59) The component in BoxLayout do not wrap to


(A) first row.
(B) second row.
(C) third row.

(D) all row.

(Q.60) The option that fills the line from left to right until no more components can fit is known as
(A) GridLayout Layout Manager.
(B) GridBagLayout Layout Manager.
(C) FlowLayout Layout Manager.
(D) BoxLayout Manager.
(Q.61) In java, an event is implemented as a/an
(A) mechanism.
(B) class.
(C) object.

(D) module.

(Q.62) Whenever a key is pressed in java, it generates a/an


(A) mechanism.
(B) object.
(C) module.

(D) class.

(Q.63) Every application must have at least one


(A) bottom-level container.
(B) container. (C) level container.(D) top-level container.
(Q.64)Swing provides three generally useful top-level containers:JFrame, JDialog and (1Mark)
(A) JApplet.
(B) JPush.
(C) Jbutton.
(D) JClick.
(Q.65) A frame is a top-level window with a title and a/an
(A) event.
(B) border.
(C) object.
(Q.66) You can add the Frame in your project by selecting the
(A) New -> JFrame.
(B) New -> FrameJ.
(C) Open -> JFrame.

(D) process.
(D) Open -> Frame.

(Q.67) If one wants to hide the frame, he/she has to click the
(A) open button.
(B) minimize button.
(C) close button.
(Q.68) In Java, size measurements are in
(A) points.
(B) twips.
(Q.69) Text field allows the user to enter the
(A) double line of text.(B) single line of text.

(D) maximise button.

(C) units.
(C) line of a text.

(Q.70) Labels are used commonly for displaying


(A) editable data.
(B) data.
(C) common data

(D) smallest units.

(D) line.
(D) non-editable data.

(Q.71) JTextField objects fire

23

(A) all events.

(B) action events.

(C) any events. (D) click events.

(Q.72) The character that is displayed in place of text being entered is known as
(A) character.
(B) field.
(C) column.
(D) echochar.
(Q.73) After adding a password field, we can change the echo character by setting its(1Mark)
(A) password setting. (B) asterisk setting.
(C) echoChar property. (D) property.
(Q.74) The method which is used to set the echo character is known as
(A) Void setEchoChar(char).
(B) Char getEchoChar().
(C) Char[ ] getPassword().
(D) Void selectAll().
(Q.75) The method which is used to return the echo character is known as
(A) Void setEchoChar(char)
(B) Char getEchoChar()
(C) Char[ ] getPassword()
(D) Void selectAll()
(Q.76) Char[ ] getPassword() method is used to return the text displayed by
(A) password field.
(B) EchoChar. (C) getPassword.
(D) field.
(Q.77) A text area is an editing area for
(A) blocks.
(B) columns.

(C) rows.

(D) words.

(Q.78) A check box indicates whether a particular condition is


(A) on or off.
(B) only true.
(C) only false. (D) empty.
(Q.79) A radio button is created through
(A) FiledComponent.
(B) JComponent.

(C) Rowcomponent.

(D) JRadioButton Component.

(Q.80) Brief the use of JComboBox.


(Q.81) What does a JList fire when a user selects an item?
(Q.82) Write a short note on CardLayout Manager.
(Q.83) Name some layout mangers provided by the swing.
(Q.84) Name some top-level containers in java swing.
(Q.85) Write various swing controls.
(Q.86) Brief the use of JCheckBox and JPannel.
(Q.87) Define the term container.
(Q.88) Describe the concept of Labels in java swing.
(Q.89) Why do we prefer a combobox over a list.
(Q.90) What does a getPassword() method of a password field returns?
(Q.91) Which layout manager is used to display the component in their natural size? (2Marks)
(Q.92) Write the steps to set the layout manger within NetBeans IDE.
(Q.93) Define the term JCheckBox.
(Q.94) Write the uses of Basic Controls.
(Q.95) Write the uses of Basic Controls.
(Q.96) Brief the concept of Java Swing.
(Q.97) Write the three types of selection which a list allows.
(Q.98) Name the class used to create a list control and a combo box control. (2Marks)
(Q.99) Write a note on Swing GUI components.
(Q.100) What is the text property of a text field and a text area? Also discuss how does a text field is different from the
password field.
(Q.101) Write some methods of List in java Swing.
(Q.102) Define flowlayout manager.
(Q.103) Explain any four major events used in Swing.
(Q.104) What is Grid Layout Manager?
(Q.105) Brief the concept of "List" in java swing.
(Q.106) Write the difference between Handling Single Selection and Handling Multiple Selections.
(Q.107) Write a note on CHECKBOXES. Also write some methods of JCheckBox class.
(Q.108) Write the use of Password fields.
(Q.109) Write the use of JComboBox.
(Q.110) Write the steps to create an Exit Button in java Swing.
(Q.111) Explain the events in java swing.
(Q.112) Write the steps to create the Radio button.

24

(Q.113) Write the steps to define event handler for a control.


(Q.114) Just brief the steps to add the frame in your project.
(Q.115) Write some common methods of password field.
Java GUI Programming Revision Tour - III
(Q.1) To test your grammar, your English teacher purposely writes grammatically incorrect passage on her sheet and gives it
to you for corrections. So, you copy down the given passage on your own sheet and make correction there.
This situation is analogous to the
(A) call by method in java.
(B) call by value in java.
(C) call by method in java.
(D) call by reference in java.
(Q.2) The parameters that appear in function definition are called
(A) original parameters.(B) formal parameters.(C) actual parameters.(D) parameterized.
(Q.3) In the following code,
int a = 20;
int b = 30;
int c = sum(a,b);
a and b are
(A) actual parameters.
(C) formal parameters.

(B) actual arguments.


(D) formal arguments.

(Q.4) int sum(int x, int y)


{
return x + y;
}
In the above code, x and y are
(A) data types. (B) actual parameters. (C) formal arguments.

(D) formal parameters.

(Q.5) One of the conventions of method-naming is that the method name should always begin with a\an
(A) noun.
(B) adjective.
(C) action.
(D) verb.
(Q.6) One of the conventions for method-naming is that
(A) there should not be a single capital letter at all.(B) start with special character.
(C) start with capital letter.
(D) start with lower case.
(Q.7) A method returns value through
(A) closing braces.
(B) return_value statement.(C) return statement.(D) value statement.
(Q.8) Static members are called by using
(A) field name.
(B) program name.

(C) class name.

(D) method name.

(Q.9) To access an instance member, we need to use dot operator with the
(A) object reference.
(B) class reference.
(C) class name.
(D) method name.
(Q.10) A class is created through the keyword
(A) class.
(B) create.

(C) using.

(D) public static void.

(Q.11) Look at the following code:


void method-name(int x, int y)
{
int a = sum();
}
Here, in the above code, sum() method is known as
(A) calling method.
(B) called method.
(C) return type method. (D) simple method.
(Q.12) The first line of method declaration that tells about the type of return value along with number and type of arguments
is called
(A) called.
(B) calling.
(C) definition.
(D) prototype.
(Q.13) Methods reside a in

25

(A) data types.

(B) objects.

(Q.14) Constructors can either be


(A) functions or methods.
(C) Parameterized or Non-Parameterized.

(C) scope.

(D) class.

(B) Calling or Called.


(D) Legal or Valid.

(Q.15) There is an Object which is passed by reference, but if you make any changes in the formal parameter, the changes
will not be reflected back to the actual parameter. This object is known as
(A) primitive data types.
(B) array.
(C) string.
(D) this.
(Q.16) A method that calls another method is called
(A) called method.
(B) declared method. (C) calling method.

(D) defined method.

(Q.17) A blue-print defining the characteristics (data items) and behaviour(methods) of a set of similar objects is called
(A) object.
(B) class.
(C) instance.
(D) data type.
(Q.18) The "new" operator requires a call to a/an
(A) object.
(B) constructor.

(C) destructor.

(D) pointer.

(Q.19) The values passed to a calling function are known as


(A) parameters.
(B) arguments.
(C) formal parameters. (D) function call.
(Q.20) The operator used to refer to members of a class with object reference is
(A) dot (.) operator.(B) reference operator.(C) relational operator.(D) this operator.
(Q.21) The operator which is used to create a new object is
(A) create.
(B) create object.
(C) new.

(D) create obj.

(Q.22) An identifiable entity with some characteristics and behaviour is known as


(A) class.
(B) object.
(C) group.
(Q.23) The process of creating an object is called
(A) object creation.
(B) object formation.
(C) instantiation.
(Q.24) A class represents a group of
(A) similar objects.
(B) different types of objects.
(D) same variables and different data types.

(D) module.

(D) instant object.

(C) different entities.

(Q.25) Static data members are declared


(A) within the class definition.
(B) outside the class definition.
(C) outside the main().
(D) with virtual keyword always.
(Q.26) In java the class variables and methods are always declared with the
(A) instance keyword. (B) public keyword.
(C) volatile keyword.
(D) static keyword.
(Q.27) Static data members are also called
(A) variables. (B) fundamental data types.(C) class variables.(D) abstract data members.
(Q.28) A static member function can access
(A) static members of the same class only.
(B) static members of any class.
(C) static & non-static members of same class.(D) static & non-static members of any class.
(Q.29) If we declare the object of a particular class type and the class does not have a constructor, then
(A) it would be compiler error.
(B) default constructor gets called automatically.
(C) default constructor has to be called explicitly. (D) it would give run time error.
(Q.30) Reusability of classes is one of the major characteristics of OOPS. It is implemented through
(A) polymorphism.
(B) inheritance. (C) data abstraction.
(D) encapsulation.
(Q.31) A method having same name as that of class is called
(A) identity.
(B) same.
(C) class.

(D) constructor.

(Q.32) The difference between static variable and a static function is that a

26

(A) static variable has a function scope but the static function has a program scope
(B) static variable has a file scope but the static function has a program scope.
(C) static variable has a function scope but the static function has a file scope.
(D) static variable has a file scope but the static function has a function scope.
(Q.33) The benefit of using functions is
(A)reduced program size(B)non-readable to user(C)increased ambiguity(D)complex prog.handling
(Q.34) The variables that receive the incoming values in a function, are known as
(A) Actual parameters.(B) Formal parameters.(C) Functional parameters.(D) Global parameters
(Q.35) The non-parameterized constructor is called
(A) explicitly.
(B) automatically.
(C) forcefully.

(D) locally.

(Q.36) The number of constructors a class can have is


(A) only one.
(B) two.
(C) three.

(D) many.

(Q.37) The difference between constructors and the other member function is that the(1Mark)
(A) constructors cannot be overloaded.
(B) constructors have a return type.
(C) constructors do not return any value.
(D) constructors are called explicitly.
(Q.38) A user-defined data type
(A) contain main method.
(B) do not contain main method.
(C) is same as primitive data type.
(D) is same as fundamental data type.
(Q.39) An application has a class
(A) containing main method.
(C) containing secondary method.

(B) that does not contain main method.


(D) that contains instance method.

(Q.40) An instance of a class is referred to as


(A) method.
(B) data.

(C) function.

(D) object.

(Q.41)If I create an object of car type, then driving, moving, applying brake are its(1Mark)
(A) Classes.
(B) Data.
(C) Functions.
(D) Attributes.
(Q.42) Once a class is declared, we can create and declare variables of this class type, known as
(A) final.
(B) static.
(C) objects.
(D) functions.
(Q.43) In java, the composite data type is
(A) string.
(B) class.

(C) primitive data types. (D) array.

(Q.44) Region within which a variable or piece of code is accessible is called


(A) program.
(B) scope.
(C) access specifier.
(D) class.
(Q.45) The keyword that stores the address of the current object is
(A) address of. (B) size of.
(C) this.
(D) current.k
(Q.46) A constructor that creates objects through values passed to it is called
(A) simple constructor.
(B) parameterized constructor.
(C) default constructor.
(D) argument constructor.
(Q.47) A constructor that does not receive parameters called
(A) simple constructor.
(B) argument constructor.
(C) non - parameterized constructor.
(D) parameterized constructor.
(Q.48) A constructor generally declared as
(A) public.
(B) private.

(C) protected.

(D) default.

(Q.49) In an application, the prototype of main( ) method is


(A) Public static void main(String args). (B) Public static void main(String[ ] args).
(C) Public void main(String[ ] args).
(D) Private static void main(String[ ] args).
(Q.50) An instance method is defined without the keyword

27

(A) final.

(B) public.

(C) static.

(D) create.

(Q.51) The class members are that members that are declared with
(A) non-static keyword.(B) static keyword.(C) public keyword.(D) private keyword.
(Q.52) In java, all primitive data types are
(A) passed by value.(B) passed by reference.(C) passed by object.(D) called by reference.
(Q.53) In java, all reference type data are passed by
(A) value.
(B) parameters.
(C) arguments.

(D) reference.

(Q.54) In a method, String is always passed as


(A) public.
(B) protected.
(C) reference.

(D) value.

(Q.55) Methods not returning a value are declared with


(A) no data type.
(B) zero value.
(C) no-return.

(D) void data type.

(Q.56) To carry out a specific task, we use


(A) methods. (B) variables.
(C) class.

(D) fields.

(Q.57) There is an object named car of class vehicle with the colour, gears, power, length, width as
(A) features.
(B) functions.
(C) methods.
(D) attributes.
(Q.58) Final keyword is a
(A) parameter.
(B) method name.

(C) modifier.

(D) access specifier.

(Q.59) In java, the concept of hiding details from public is known as


(A) encapsulation.
(B) abstraction.
(C) overloading. (D) overriding.
(Q.60)The method in which the defined functionality can never be changed is known as
(A) static method.
(B) class method.
(C) final method.
(D) instance method.
(Q.61) Every object is directly associated with
(A) data items and functions.
(B) class.

(C) data types. (D) modifiers.

(Q.62) Objects of a class interact by sending


(A) variables.
(B) messages.

(C) calls.

(Q.63) The data type that specify the empty set of values is
(A) \u0000.
(B) null.
(C) void.
(Q.64) Parameters that you can pass in a method are of
(A) one type.
(B) two types.
(C) null types.

(D) definitions.
(D) return.
(D) void types.

(Q.65) Invoking a method means


(A) declaring a method (B) defining a method(C) prototyping a method(D)calling a method.
(Q.66) In pass by value mechanism, the values of actual parameter are copied into
(A) original parameter.(B) formal parameter.(C) identifier.(D) data type.
(Q.67) In call by value method, changes are not reflected back to the
(A) formal arguments.(B) original value.(C) formal value.(D) formal parameter.
(Q.68) A reference stores
(A) memory location.(B) reference.(C) value.(D) identifier.
(Q.69)The data that can be accessed only through member functions of that class is(1Mark)
(A) public data.(B) private data.(C) public or private data.(D) protected data.
(Q.70) The data that can be accessed by the nonmember functions through the objects of that class is
(A) protected data.
(B) private data.
(C) public data.
(D) local data.

28

(Q.71) The data members that are usually maintained to store values common to the entire class are
(A) non-static members.(B) static data members.(C) initialized members.(D) abstract members.
(Q.72) A method may contain several
(A) return statement.(B) main( ) method.(C) other defined methods.(D) object.
(Q.73) The method terminates as soon as the
(A) continue statement is encountered. (B) break statement is encountered.
(C) semicolon is encountered.
(D) return statement is encountered.
(Q.74) In java, we do not need to create the object called
(A) this.
(B) string.
(C) class.

(D) array.

(Q.75) A composite data type is based on


(A) object data type(B) secondary data type.(C) reference data type.(D) primitive data type.
(Q.76) What is an object?
(Q.77) What are the two parts of an object?
(Q.78) What is a method?
(Q.79) What do you understand by abstraction in java?
(Q.80) What is a Scope?
(Q.81) What are the different types of class members available in a java program?
(Q.82) What is a composite data type?
(Q.83) What is a static member?
(Q.84) What do you understand by Instance members?
(Q.85) Whats wrong with the following constructor definition for the class student?
public void student(int n)
{
rollno = n;
}
(Q.86) What is Method Prototype?
(Q.87) How do we create an object?
(Q.88) Why do we use methods?
(Q.89) What is a class?
(Q.90) What is the use of new operator?
(Q.91) What is the difference between user-defined data type and an application?
(Q.92) Explain the difference between a method declaration and a method invocation.(2Marks)
(Q.93) How does a parameter for a primitive type differ from a parameter for a reference type?
(Q.94) Discuss constructor and its different types that is supported by java.
(Q.95) What does it mean that a method or field is static?
(Q.96) How do we return a value from a function? Is it possible to have more than one return statement in a program?
(Q.97) What is the difference between call by value and call by reference?
(Q.98) The String object being passed by reference types are passed by reference but changes, if any, are not reflected
back to them. Why?
(Q.99) What is the difference between the instance variables and class variables? Can you specify the instance variable and
the class variable in the example given below?
\"\"
(Q.100) What is difference between parameterized & non-parameterized constructor(3Marks)
(Q.101) Differentiate between formal and actual variable.
(Q.102) How can class be used as a user-defined data type?
(Q.103) What is the significance of constructors in OOP classes?
(Q.104) What is this keyword? Discuss its significance?
(Q.105) Define the following terms
i. Class ii. Object iii. Primitive data types iv. User-defined data types
(Q.106)Discuss various levels of scope and visibility of a program provided by java.(4Marks)
More About Classes and Libraries
(Q.1) The declaration of a method is also known as
(A) Description.
(B) Initializing.
(C) Prototype.

(D) Definition.

(Q.2) The method of the String class is

29

(A) delete().

(B) append().

(C) reverse().

(D) replace().

(Q.3) Math.round(Float.MAX_VALUE) statement returns


(A) 0.
(B) -2147483648.
(C) Null.

(D) 2147483648.

(Q.4) The method that returns the maximum number of characters that can be inserted in the string is
(A) capacity(). (B) length().
(C) setLength().
(D) maxString().
(Q.5) The public members of objects are accessed through
(A) # operator. (B) . operator.
(C) + operator.(D) operator.
(Q.6) Calendar.Date field stores numeric
(A) date.
(B) year.

(C) month.

(D) day.

(Q.7) In calendar, class getInstance() method is


(A) Abstract method.
(B) Static method.
(C) Public method.(D) Instance method.
(Q.8) Math.round(Float.POSITIVE_INFINITY) will return
(A) 9223372036854775807.
(B) -2147483648.
(C) 2147483648.
(D) -9223372036854775807.
(Q.9) In round() method, if the argument is a negative infinity or less than the MIN_VALUE for the type, then it will return the
MIN_VALUE of the
(A) parameter. (B) return type.
(C) data type.
(D) argument.
(Q.10) Math.round(Float.NaN) will return
(A) 0.
(B) 1.
(C) Null.

(D) 1.0.

(Q.11) Math.round(-1.5) will yield the result as


(A) 1.
(B) -2.
(C) -1
(Q.12) StringBuffer sf = new StringBuffer;
This method creates a sf string object of
(A) full length.
(B) empty length.

(D) 1.5.

(C) null length. (D) full capacity.

(Q.13) We can change the length of a string in a StringBuffer object with the
(A) get() method.
(B) length() method. (C) set() method. (D) setLength() method.
(Q.14) When the StringBuffer objects length is longer than the String it holds, the extra character contains
(A) \u0000.
(B) \f0000.
(C) \a0000.
(D) \g0000.
(Q.15) The method that compares strings while ignoring case is
(A) compareTo().
(B) equalsIgnoreCase(). (C) compareIgnoreCase().(D) equalsCompareCase().
(Q.16) The operator alternative to concat() method is
(A) / operator. (B) - operator. (C) + operator.(D) \ operator.
(Q.17) To return a new string from the current string we can use
(A) + operator. (B) subString() method. (C) Trim() method.(D) - operator.
(Q.18) The method that is used to remove white spaces from both ends of the string is
(A) truncate(). (B) remove().
(C) trim().
(D) hide().
(Q.19) The method used to calculate absolute value of a number
(A) abs() method.
(B) absolute() method.(C) value() method.(D) floor() method.
(Q.20) To concatenate two strings, we can use
(A) capacity() method.(B) charAt() method.(C) valueOf() method.(D) concat() method.
(Q.21) For creating an object, it is mandatory to use new operator in
(A) StringBuffer class.(B) String class.(C) Object class.(D) Character class.
(Q.22) The compareTo() method compares two strings
(A) linearly.
(B) geometrically.
(C) lexicographically.

(D) geographically.

30

(Q.23) StringBuffer object is always created with the use of


(A) new operator.
(B) +operator. (C) create operator.(D) instantiate operator.
(Q.24) The function of the dot(.) operator is to
(A) enable us to access the instance variables of any object within a class.
(B) enable us to store values in instance variables of an object.
(C) call object methods.
(D) create a new object.
(Q.25) The method that returns the character at the specified length is
(A) characterAt().
(B) charAt().
(C) lengthAt().
(D) valueAt().
(Q.26) The method that returns the total number of characters in the string is
(A) capacity().
(B) length().
(C) setLength().
(D) append().
(Q.27) The StringBuffer methods allow
(A) modification of calls of methods.
(C) chaining of calls of methods.

(B) appending of calls of methods.


(D) deletion of calls of methods.

(Q.28) pow() and round() methods are available in


(A) java.util package.(B) java.io package.(C) java.lang.Math package.(D) java.awt package.
(Q.29) In java, the two types of packages are
(A) utility packages & API packages.(B) web based package & Application based package.
(C) java API package & User defined package.(D)system defined package & User defined package.
(Q.30) The collection of networking related classes are available in
(A) java.lang package.(B) java.util package.(C) java.net package.(D) java.io package.
(Q.31) To obtain the values in a calendar object, we use
(A) value() method
(B) insert() method
(C) get() method

(D) set() method

(Q.32) To create an object of calendar class, we need to use


(A) Accessor method. (B) getInstance() method.
(C) get() method.
(Q.33) Which command creates a package in java?
(A) Package.
(B) Create.
(C) Run.

(D) Set() method.

(D) Library.

(Q.34) Calendar class is the part of


(A) java.util package.(B) java.io package.(C) java.lang package.(D) java.net package.
(Q.35) To compute something in the form of ab where a and b are numbers, we can use (1Mark)
(A) round() method.
(B) pow() method.
(C) multiply() method. (D) divide() method.
(Q.36) To access a package we need to use
(A) Using statement.
(B) Package statement. (C) Import statement.(D) Access statement.
(Q.37) Group of logically related classes in java is known as
(A) Class.
(B) Tool.
(C) Package.

(D) Object.

(Q.38) Methods used to obtain information about an object are known as


(A) Access methods.
(B) Accessor methods. (C) User defined methods.(D) System methods.
(Q.39) To control the access to fields and methods of a class in java, we can use
(A) Access Modifier.
(B) Class and Object. (C) Access Specifier.
(D) Accessibility.
(Q.40) The concept of OOPs through which properties of a class can get accessed in another class is
(A) Encapsulation.
(B) Abstraction. (C) Polymorphism.
(D) Inheritance.
(Q.41) In java, the class variables and methods are always declared with the
(A) instance keyword. (B) public keyword.
(C) volatile keyword.
(D) static keyword.

31

(Q.42) Set of readymade software routines or class definitions is known as


(A) Routine.
(B) User defined class.
(C) Library.
(D) Class.
(Q.43) The Library which is by default imported to the java program is
(A) Java.lang.
(B) Java.io.
(C) Java.util.

(D) Java.Math.

(Q.44) The class which hold mutable strings is


(A) Character class.
(B) MutableString class. (C) String class. (D) StringBuffer class.
(Q.45) The class which holds a single character is
(A) SingleCharacter class.(B) String class.(C) Character class.(D) StringBuffer class.
(Q.46) Math library is available in
(A) Java.lang. (B) Java.util.

(C) Java.net.

(D) Java.awt.

(Q.47) All input and output related classes are a part of


(A) java.util.
(B) java.io.
(C) java.lang.io.
(Q.48) The superclass of all the classes in java is
(A) Class.
(B) Base.
(Q.49) In java, all strings are
(A) Classes.
(B) Files.

(D) java.awt.
(C) Object.

(C) Packages.

(D) Java.
(D) Objects.

(Q.50) The immutable strings are available in


(A) String class.(B) StringBuffer class.(C) Character class.(D) ImmutableString class.
(Q.51) To bind fields and methods into a single unit, we use
(A) library.
(B) package.
(C) variables.

(D) class.

(Q.52) The term that refers to the process that set specified path of a user defined package is
(A) classpath.
(B) language.
(C) address.
(D) protocol.
(Q.53) The default access specifier of class members is
(A) Private.
(B) Public.
(C) Protected.

(D) Default.

(Q.54) The other name for default access specifier is


(A) friendly.
(B) protected.
(C) public.

(D) library.

(Q.55) A class enforces information hiding through


(A) Inheritance.
(B) Access specifier.
(C) Access Modifier.(D) Classes and Objects.
(Q.56) The class used to show specific instant of time is
(A) Calendar.
(B) Date.
(C) Time.
(Q.57) Calendar class is an
(A) Abstract class.
(B) Base class. (C) Aviator class.

(D) Current.
(D) Anonymous class.

(Q.58) If we do not want to insert a number in pow( ) method then we can use
(A) None
(B) NULL
(C) NaN

(D) Not Available

(Q.59) If we use setLength( ) method to specify a length shorter than its string, the string is
(A) appended.
(B) truncated.
(C) modified. (D) updated.
(Q.60) The class member that is accessible everywhere in the program is
(A) protected.
(B) private.
(C) default.
(D) public.
(Q.61) The objects of StringBuffer class can be
(A) deleted.
(B) detected.
(C) forwarded. (D) modified.
(Q.62) The StringBuffer object is more flexible than
(A) class object.
(B) io object.
(C) Character object.

(D) String object.

32

(Q.63) Protected members can be accessed from within classes belonging to the same
(A) system.
(B) package.
(C) class.
(D) method.
(Q.64) A class is a collection of methods and
(A) fields.
(B) main() method.
(Q.65) Java is a
(A) case-sensitive language.
(C) non-case-sensitive.

(C) keywords.

(D) interfaces.

(B) procedural language.


(D) structured language.

(Q.66) Lexicography is the way of writing words in


(A) non-alphabetical order.(B) small letter.(C) alphabetical order.(D) capital letter.
(Q.67) Character class is a
(A) Wrapper class.(B) Inherited class.(C) Package of classes.(D) Library of methods.
(Q.68) The class member that restricts accessibility in subclasses is
(A) public.
(B) protected.
(C) private.

(D) default.

(Q.69) The keyword used to represent current string is


(A) that.
(B) object.
(C) current.

(D) this.

(Q.70) A string object encapsulates sequence of


(A) operators. (B) methods.
(C) texts.

(D) characters.

(Q.71) A StringBuffer object contains a memory block called


(A) Memory.
(B) Buffer.
(C) Cache.

(D) Block.

(Q.72) In StringBuffer class append( ) and insert( ) methods are overloaded and will call the
(A) toChar( ) method for all objects.
(B) String( ) method for all objects.
(C) StringBuffer( ) method for all objects.(D) toString( ) method for all objects.
(Q.73) In Java, API stands for
(A) ApplicationPackage Interface.
(C) Application Programming Interface.

(B) Applied Programming Interface.


(D) All package Interface.

(Q.74) Two classes in two different packages can have the same
(A) path.
(B) name.
(C) classpath.

(D) object.

(Q.75) A package acts as a


(A)Container for classes(B)Methods for classes(C)Objects for classes(D)Collector for classes
(Q.76) The packages are always organized in
(A) linear structure.(B) horizontal structure.(C) hybrid structure(D)hierarchical structure.
(Q.77) The defined classes in a user defined package need to be declared with
(A) private access specifier.
(B) protected access specifier.
(C) public access specifier.
(D) default access specifier.
(Q.78) If we compile a file of a user defined package, it will create
(A) .class file.
(B) .exe file. (C) .doc file. (D) .obj file.
(Q.79) The class used to convert Date to integer field is
(A) Convert class.
(B) Util class. (C) Date class. (D) Calendar class.
(Q.80) The Date class represents a date object in
(A) long integer format.(B) float format.(C) short integer format.(D) long float format.
(Q.81) What is an access specifier?
(Q.82) What are the different types of access specifier supported by java?
(Q.83) What are the different types of variable on which you can apply an access specifier within a java program ?
(Q.84) What do you understand by Accessor methods?
(Q.85) What is the other name for default access specifier?

33

(Q.86) What is a Java Library?


(Q.87)Name some methods of StringBuffer class which is not available in String class?(1Mark)
(Q.88) Which is the default package of java?
(Q.89) In java, API stands for?
(Q.90) What type of classes available in java.io package?
(Q.91) What is NaN?
(Q.92) How do we create an object of Date class?
(Q.93) How do we create an object of Calendar class?
(Q.94) Discuss classpath in java?
(Q.95) What is the use of import statement in java?
(Q.96) What is the difference between Date class and Calendar class?
(Q.97) Discuss Inheritance in java.
(Q.98) Discuss four accessor methods of String class with its usage?
(Q.99) Discuss round() method with example.
(Q.100) If we want to find out the power of a number in a java program, then what should we do?
(Q.101) How do we manipulate date and time in java? Discuss it.
(Q.102) If a method or field is static then what do you understand by it ?
(Q.103) Discuss the process to create an object of String class?
(Q.104) What is the difference between String and StringBuffer class?
(Q.105) Discuss properties of StringBuffer class?
(Q.106) Discuss the process of creating an object of StringBuffer class.
(Q.107) Discuss the properties of different access specifiers of java language?
(Q.108) Differentiate between length() method and capacity() method?
(Q.109) What is a String and what are the different classes available in java that we can use to work with character data?
(Q.110) What is a package and also discuss its advantages in java?
(Q.111) What are the different types of packages available in java? Also mention the name of some of the important
packages.
Concept of Inheritance
(Q.1)The feature of Java in which a class can inherit property of another class is(1Mark)
(A) overriding.
(B) overloading.
(C) inheritance.
(D) class.
(Q.2) The base class is also known as
(A) Parent class.
(B) Child class.

(C) Derived class.

(D) Class.

(Q.3) A class can implement as many as interfaces but can extend only one
(A) variable.
(B) function.
(C) interface.
(D) class.
(Q.4) Suppose there are three classes: Computer, Apple_Computer and IBM_Computer, the relationship between these
classes is
(A) Computer is the superclass; Apple_Computer and IBM_Computer are subclasses of Computer.
(B) IBMComputer is the superclass; AppleComputer and Computer are subclasses of IBMComputer.
(C) Computer, AppleComputer and IBMComputer are sibling classes.
(D) Computer is a superclass, AppleComputer is a subclass of Computer and IBMComputer is a subclass of AppleComputer.
(Q.5) The syntax to define a new class "Coke" based on the superclass "SoftDrink" is (1Mark)
(A) class Coke is a SoftDrink.
(B) class Coke implements SoftDrink.
(C) class Coke defines SoftDrink.
(D) class Coke extends SoftDrink.
(Q.6) constructors of a superclass are not inherited by
(A) base class.
(B) interface.
(C) abstract class.

(D) subclasses.

(Q.7) A class "Car" and its subclass "Honda_City" both have a method run() which was written by the programmer as a part
of the class definition. If "junker" refers to an object of type "Honda_City", then the statement that is true for junker.show(); is
(A) show() method defined in "Honda_City" will be called.
(B) show() method defined in "Car" will be called.
(C) the compiler will complain that run() has been defined twice.
(D) overloading will be used to pick run().
(Q.8) The feature of java that shows the real world model is
(A) inheritance.
(B) abstract class.
(C) interface.

(D) base class.

34

(Q.9) A derive class is also known as


(A) Subclass.
(B) Base class.

(C) Super class.(D) Class.

(Q.10) Java does not allow


(A)Multiple inheritance(B)Interface definition(C)Abstract class (D)Multilevel inheritance
(Q.11) The super class of all the classes of a java program is
(A) Derived class.
(B) Super class.
(C) Base class.
(D) Object.
(Q.12) If a superclass has a function with the same signature as in the subclass of it. You want to call the function of a
superclass, then the keyword that can be used is
(A) super.
(B) abstract.
(C) interface.
(D) extends.
(Q.13) Java supports multiple inheritance in terms of
(A) interface.
(B) extends.
(C) abstract.

(D) multiple.

(Q.14) The syntax to call the variable of a superclass if the superclass and subclass both have the same signature is
(A) super.hiddenVariable.
(B) super.methodName. (C) sub.hiddenVariable (D) subr.Method.
(Q.15) A final class cannot be
(A) overwritten.

(B) overloaded. (C) extended.

(D) superclass.

(Q.16) Syntax to define a variable as final is


(A) public final <datatype> < nameof variable>=variablevalue.
(B) public final <datatype>= .
(C) <datatype>< nameof variable>= .
(D) final < nameof variable><datatype>= .
(Q.17) Consider A as a superclass and B as a subclass. So, the syntax to define A and B class is
(A) class A extends B { }
(B) class B extends A { }
(C) class A extends A { }
(D) class B extend A { }
(Q.18) A superclass whose objects can be declared and created is known as
(A) concrete.
(B) constant.
(C) concat.
(D) base.
(Q.19) When a class inherits from a single base class, it is a
(A)Single Inheritance(B)Multilevel Inheritance(C)Multiple Inheritance(D)Hierarchical Inheritance.
(Q.20) A function's argument list is known as the functions's
(A) signature.
(B) methods.
(C) variables.

(D) classes.

(Q.21) The syntax for defining a method as "final" is


(A) public final void < nameof method()> (B) public final <datatype>< nameof method()>
(C) <datatype>< nameof variable>=. (D) final < nameof variable><datatype>.
(Q.22) When a class inherits from multiple base classes and all of its base classes inherit from a single base class. This form
of inheritance is known as
A)Hybrid Inheritance(B)Multiple Inheritance(C)Multilevel Inheritance(D)Hierarchical
(Q.23) A class from which another class is inheriting its properties is called
(A) Derive class.
(B) Super class.(C) Sub class. (D) Class.
(Q.24) A feature accessible in all the classes whether a subclass or class in the same package is known as
(A) public member.
(B) private member.
(C) public protected.
(D) protected.
(Q.25) The feature which reduces the number of comparisons in a program and makes the program run faster is known as
(A) Encapsulation.
(B) Abstact.
(C) Polymorphism.
(D) Inheritance.
(Q.26) A method in a subclass hides or overshadows a method inherited from the superclass if both methods have the same
signature. This property is known as
(A) overriding.
(B) overloading. (C) inheritance. (D) class.

35

(Q.27) The superclass of all the classes in java is


(A) superclass.
(B) parentclass. (C) Class.

(D) Object.

(Q.28) An abstract class is created through the keyword


(A) overriding.
(B) abstract.
(C) interface. (D) overloading.
(Q.29) A class can implement an interface using a keyword called
(A) implement.
(B) abstract.
(C) interface. (D) inheritance.
(Q.30) An interface defines a
(A) member.

(B) variable.

(C) protocol of behaviour.

(Q.31) The statement super.overriddenMethod() will call the


(A) interfaces.
(B) subclass function. (C) superclass methods.

(D) document.
(D) variable.

(Q.32) Syntax for allocating the memory to the object is


(A) < objname > = new < classname() >;
(B) < classname > = new < classname() >;
(C) < classname > < objname > = new < classname() >;
(D) < classname > < objname > = new
(Q.33) The syntax to implement the interface in a class is
(A) class < classname > implements {}
(B) < classname > implements < interface_1 >,< interface_2 > {}
(C) class < classname > implements < interface_1 >, < interface_2 > {}
(D) class < classname > < interface_1 >,< interface_2 > {}
(Q.34) In java, super keyword is used to
(A) call immediate parent and all the constructor of parent class.
(B) call all the constructor of child class.
(C) call immediate child.
(D) call immediate child, all the constructor of child class.
(Q.35) The syntax for defining an abstract class is
(A) abstract {.}.
(B) public <classname>{.}.
(C) public abstract <classname>{.}. (D) public implement <classname>{.}.
(Q.36) Syntax to define a abstract method is
(A) public abstract void <methodname();>
(C) public abstract void ();

(B) public void <methodname();>


(D) public <methodname();>

(Q.37) The syntax for defining the interface is


(A) implement interfacename{}.
(C) interfacename{}.

(B) interface interfacename{}.


(D) class interfacename{}.

(Q.38) Abstract method is always declared with the


(A)private modifier.(B) private protected modifier.(C) protected modifier(D)public modifier.
(Q.39) The body of the interface contains two things which are
(A) abstract method and constants.
(B) abstract method and default variables.
(C) only constants.
(D) only abstract method.
(Q.40) To prevent a class from being inherited, we can use the keyword called
(A) abstract.
(B) final.
(C) interface.
(D) local.
(Q.41) Type of inheritance supported by java is
(A)Single Inheritance(B)Double Inheritance(C)Multiple Inheritances(D)Class Inheritance.
(Q.42)Correct syntax for defining a new class Coke based on the superclass SoftDrink (1Mark)
(A) class Coke is a SoftDrink. (B) class Coke implements SoftDrink.
(C) class Coke defines SoftDrink.
(D) class Coke extends SoftDrink.
(Q.43) A subclass can inherit

36

(A) only member variables.


(C) both member variables and methods.

(B) methods.
(D) only variables not the member function.

(Q.44) A class Animal has a subclass Mammal. So, we can say that
(A) Mammal can have no subclasses.
(B) Mammal can have no siblings.
(C) Animal can have only one subclass. (D) Mammal can have no other parent than Animal.
(Q.45) In java class hierarchy, the root of the tree is
(A) class.
(B) base class.
(C) derive class.

(D) object.

(Q.46) In java, every class can have


(A)one immediate class(B)five classes(C)more than one immediate class(D)no immediate class.
(Q.47) Reusability feature comes under the concept of
(A) interface.
(B) abstract class.
(C) inheritance (D) class.
(Q.48) The direct superclass of all the classes in java is
(A) base class.
(B) abstract class.
(C) derive class.

(D) object class.

(Q.49) In java, a class can inherit the property of its higher class, this property is known as
(A)additive property(B) transitive property(C) transparent property(D) visible property.
(Q.50)When same name of variable and method comes in class, this property is known as(1Mark)
(A) overloading.
(B) overmethod.
(C) overribbing.
(D) overriding.
(Q.51) The final variables are
(A) static.
(B) dynamic.

(C) correct.

(D) define.

(Q.52) An interface can extend


(A) one interface.
(B) two interfaces.

(C) three interfaces.

(D) many interfaces.

(Q.53) A final subclass method cannot be


(A) overriden.
(B) overload.

(C) interface.

(D) abstract.

(Q.54) Final Variable, method, classes are used for


(A) interface.
(B) security.
(C) abstract class.

(D) class.

(Q.55) When a class inherits from a multiple base class, it is


(A)Single Inheritance
(B) Multilevel Inheritance.
(C) Multiple Inheritance.
(D) Hierarchical Inheritance
(Q.56) When several classes inherit from the same class, it is
(A) Single Inheritance.
(B) Multilevel Inheritance.
(C) Multiple Inheritance.
(D) Hierarchical Inheritance.
(Q.57) When a subclass is the base class of another class, it is a
(A) Single Inheritance.
(B) Multiple Inheritance.
(C) Multilevel Inheritance.
(D) Hierarchical Inheritance.
(Q.58) The class which inherits the property of the other class is known as
(A) Parent class.
(B) Super class.(C) Sub class. (D) Class.
(Q.59) A feature accessible only inside their own class and nowhere else is known as(1Mark)
(A) public member.
(B) private member.
(C) public protected.
(D) protected.
(Q.60) The members which are defined without any specifiers are known as
(A) public member.
(B) private member.
(C) default.
(D) protected.
(Q.61) The members are accessible only from to their subclasses are known as
(A) protected.
(B) private member.
(C) default.
(D) private protected.
(Q.62) An interface is declared with a keyword

37

(A) overriding.

(B) abstract.

(Q.63) An abstract class object is


(A) not created.
(B) created.

(C) interface.

(D) overloading.

(C) created in subclass.(D) created in superclass.

(Q.64) A superclass variable hides, when superclass variable and subclass variable have there
(A) name.
(B) no name.
(C) same name.
(D) definition.
(Q.65) A superclass method overrides when a superclass & a subclass method have
(A) same name.
(B) same signature.
(C) different name.
(D) definition.
(Q.66) An object can refer to itself by using
(A) super keyword.
(B) interface keyword.

(C) this keyword.

(Q.67) A keyword use to define an object in java is


(A) newer.
(B) new1.
(C) basenew.

(D) sub keyword.


(D) new.

(Q.68) Way to make general classes into more specific classes is known as
(A) overriding.
(B) inheritance.
(C) overloading.
(D) class.
(Q.69) A concrete superclass is the one whose objects
(A) can be declared & created. (B) cannot be declared.
(C) can be created.
(D) cannot be declared & created.
(Q.70) The feature which we use to control the access of the data member and member function is known as
(A) Access specifier.
(B) Controllers. (C) Limits.
(D) Control specifier.
(Q.71) While at the time of defining the interface, you need to replace the keyword class with
(A) abstract.
(B) implement.
(C) final.
(D) interface.
(Q.72) The modifier which we cannot change should be declared as
(A) private.
(B) public static final.
(C) default.
(D) public.
(Q.73) Define inheritance.
(Q.74) What is the primary purpose of inheritance?
(Q.75) Define base class.
(Q.76) How do you prevent a subclass from having access to a member of a superclass?(1Mark)
(Q.77) Brief the concept of overriding.
(Q.78) What is the use of super keyword?
(Q.79) Define the use of implement keyword.
(Q.80) What is an abstract class?
(Q.81) What is the use of specifiers of superclass members that are not accessible to a subclass?
(Q.82) Define the signature of a method.
(Q.83) Write the use of this() and super() with constructors.
(Q.84) Define concrete classes.
(Q.85) Explain the relation between base class and derive class.
(Q.86) Write the difference between interface and abstract class?
(Q.87) How can I get the superclass to call back to a method in the subclass?
(Q.88) A class "abc" inherits from a class "xyz". Write syntax to define the class "abc".
(Q.89) How can we prevent a class from being extended?
(Q.90) How many objects per class can you declare in a java program?
(Q.91) How does constructor and destructor works in inheritance?
(Q.92) How does an interface is different from a class?
(Q.93) Discuss interface with syntax.
(Q.94) What are the advantages and disadvantages of an interface?
(Q.95) What are the benefits of inheritance?
(Q.96) What type of inheritance does Java have? Also illustrate the concept of function overloading with the help of an
example.
(Q.97) What is the difference between an abstract class and an interface?
(Q.98) Can we explicitly inherit from the Object class?
(Q.99) How can I call an overridden method in the superclass?
(Q.100) Write the difference between overloading and overriding method.

38

(Q.101) Define access specifier in java and State the significance of public, private, protected and default modifiers or
specifiers.
(Q.102) Explain the concept of Hierarchical Inheritance with example.
GUI Dialogs and Tables
(Q.1) If the returned value equals JOptionPane.YES_Option, it means
(A) NO button was pressed.
(B) the user closed the dialog without using a button.
(C) CANCEL button was pressed.(D) YES button was pressed.
(Q.2) If the returned value equals JOptionPane.CLOSED_Option, it means
(A) the user closed the dialog without using a button.(B) YES button was pressed.
(C) NO button was pressed.
(D) CANCEL button was pressed.
(Q.3) If the returned value equals JOptionPane.OK_Option, it means
(A) YES button was pressed.
(B) OK button was pressed.
(C) CANCEL button was pressed.(D) that the user closed the dialog without using a button.
(Q.4) Addition or removal of rows in a table are performed through the object called (1Mark)
(A) DefaultTable.
(B) TableModel.
(C) DefaultModel.
(D) DefaultTableModel.
(Q.5) Dialogs are not
(A) accessible.

(B) volatile.

(C) dependent. (D) independent.

(Q.6) Dialogs are of


(A) three types.

(B) multiple types.

(C) two types.

(Q.7) The dialog which is also known as alert is


(A) JOptionPane.
(B) JMessagePane.

(D) single type.


(C) JDialog.

(D) JConfirmDialog.

(Q.8) Dialog box which blocks all user interactions with other application windows until it is finished
(A) Option dialog.
(B) Modeless dialog.
(C) Dialog.
(D) Modal dialog.
(Q.9) The most flexible dialog is a
(A) Message dialog.
(B) Confirm dialog.

(C) Option dialog.(D) Input dialog.

(Q.10) The predefined dialog type of JOptionPane class that does not return anything is known as
(A) showOptionDialog. (B) showInputDialog.
(C) showConfirmDialog.(D) showMessageDialog.
(Q.11)The method which is used to return the cell value at row & column in JTable is(1Mark)
(A) getValueAt().
(B) getCellAt().
(C) getAccessAt().
(D) getValue().
(Q.12) The statement that is used to access JOptionPane class is
(A) export.
(B) import.
(C) run.

(D) execute.

(Q.13) A dialog box that is used to display informative messages to the user is
(A) Message dialog box.(B) Input dialog. (C) Option dialog.
(D) Confirm dialog.
(Q.14) JOptionPane class is available in
(A) java.swingx.package.(B) javax.swing.*; package.(C) javax.package.(D) swing.java.package.
(Q.15) A simple message dialog box has
(A) two buttons.
(B) more than one button.

(C) only one button.(D) three buttons.

(Q.16) An input dialog box contains


(A) two buttons.
(B) more than one button.

(C) only one button.(D) three buttons.

(Q.17) To create a message box, we call the


(A) showInputDialog().
(B) showOptionDialog().
(C) showMessageDialog().
(D) showConfirmDialog().
(Q.18) A standard dialog for selecting a file from the file system is

39

(A) Jdialog.

(B) JOptionPane.

(C) JcolorChooser.

(D) Jfile Chooser.

(Q.19) A method that displays a modal dialog with one button which is labelled is
(A) showMessageDialog()(B) showInputDialog().(C) showConfirmDialog().(D) showOptionDialog().
(Q.20) A dialog with empty text field,
(A) showMessageDialog()(B) showInputDialog()(C) showConfirmDialog()(D) showOptionDialog().
(Q.21)When one of the showXxxDialog methods returns an integer, the possible value is(1Mark)
(A) Null_Option.
(B) Show_Option.
(C) Closed_Option.
(D) Confirm_Option.
(Q.22) The other name for JOptionPane is
(A) alerts.
(B) panel.

(C) confirmation box.

(Q.23) The IDE value for JOptionPane.DEFAULT_OPTION is


(A) 0.
(B) 1.
(C) -1.

(D) 2.

(Q.24) The IDE value for JOptionPane.YES_NO_OPTION is


(A) 0.
(B) 1.
(C) -1.

(D) 2.

(Q.25) To create simple, standard dialogs, we use the


(A) JOptionPane class. (B) JfileColor class.(C) Jdialog class.

(D) dialog box.

(D) Javax class.

(Q.26) A window which usually pops up in response to some command is


(A) a Form.
(B) a PopUp window. (C) a Dialog Box.

(D) an Error Message.

(Q.27) To create a dialog based on JDialog control, we need to


(A)copy Dialog box from palette(B)drag Dialog icon(C)create Dialog button(D)click Dialog box
(Q.28) To rename a dialog box,
(A) right click & select variable name.
(B) left click & select navigator.
(C)right click & select change variable name(D)click inspector window & select variable name
(Q.29) The type of value that showConfirmDialog() and showOptionDialog() returns is (1Mark)
(A) float.
(B) short.
(C) long.
(D) int.
(Q.30) The button that closes the window and restores the settings in the dialog box to the state they were in when the
dialog box was opened is
(A) Cancel button.
(B) OK button. (C) Help button. (D) Restore button.
(Q.31) In JOptionPane, the predefined dialogs are of
(A) five types.
(B) two types. (C) four types. (D) three types.
(Q.32) The method that displays a dialog intended to receive user input and returns a String if the input component is a text
field is known as
(A) showOptionDialog.(B) showInputDialog.(C) showConfirmDialog.(D) showMessageDialog.
(Q.33) The method that displays a dialog with several buttons and returns as int option type corresponding to the button
pressed is known as
(A) showOptionDialog().(B) showInputDialog().(C) showConfirmDialog()(D) showMessageDialog().
(Q.34) The dialog used for choosing the colour is
(A) JFileChooser.
(B) JColorChooser.

(C) JOptionChooser.

(Q.35) The general purpose dialog provided by java swing is


(A) JGeneralPurposeDialog.
(B) JDialog.
(C) JGeneralDialog.

(D) JDialog.

(D) JOptionDialog.

(Q.36) The dialog that provides a variety of pre-defined styles of dialogs is


(A) JFileChooser.
(B) JOptionPane.
(C) JDialog.

(D) JColorChooser.

(Q.37) The option that makes the Dialog visible by typing is


(A)showInputDialog(true)(B)showConfirmDialog()(C)MsgDialog.setVisible(true)(D)setVisible(ON)

40

(Q.38) Like JTree, the component that relies on a separate model object to hold and represent the data it displays is a
(A) Jlist.
(B) JButton.
(C) JTable.
(D) Table Model.
(Q.39) When you use DefaultTableModel, you must
(A) create java table.
(B) apply javax.swing package.
(C) export javax.defaulttableModel.
(D) import javax.swing.table package.
(Q.40) The area which allows the user to provide a response that can be taken through JtextField, JcomboBox or Jlist is
(A) Icon area. (B) Input area.
(C) Message area.
(D) Button area.
(Q.41) Dialog boxes can be
(A) regular or interval type.
(C) modal and modeless type.

(B) mode and modeless type.


(D) application and customized type.

(Q.42) A dialog window is


(A)an independent subwindow(B) a subwindow(C)dependent on main window.(D) a notice window.
(Q.43) To create simple, standard dialogs, you use the
(A) Combo Box.
(B) Set Icon Option.
(C) Jcomponent Class (D) JOptionPane.
(Q.44) A button that instructs the system to apply and save the settings is
(A) Cancel button.
(B) OK button.
(C) Help button.
(D) Option button.
(Q.45) The commonly used button to dismiss simple secondary windows is
(A) Restore button.
(B) Cancel button.
(C) Close button.

(D) Help button.

(Q.46) The IDE value for JOptionPane.YES_NO_CANCEL_OPTION is


(A) 0.
(B) 2.
(C) 3.
(D) 1.
(Q.47) The IDE value for JOptionPane.OK_CANCEL_OPTION is
(A) -2.
(B) 3.
(C) 2.
(D) -3.
(Q.48)If the returned value equals JOptionPane.NO_Option, it means_____ was pressed
(A) CANCEL button (B) OK button (C) NO button (D) YES button
(Q.49) The object that organises and provides data to a table in java is
(A) Class.
(B) Object.
(C) Table Model.

(D) Table.

(Q.50) A window for displaying/receiving some information is known as


(A) Desktop.
(B) Dialog.
(C) Methods window. (D) Menu window.
(Q.51) To obtain tablemodel of a table named myTbl1, we use the method
(A) myTbl1.accessModel().(B) myTbl1.putModel().(C) myTbl1.getModel()(D) myTbl1.buildModel().
(Q.52) The dialog in which interaction with other window is not locked is known as
(A) an Option dialog.(B) a Modeless dialog.(C) a Dialog.(D) a Modal dialog.
(Q.53) Dialog boxes are windows which usually pop up in response to some
(A) methods.
(B) commands.
(C) prompts.
(D) functions.
(Q.54) When you add a new node or dialog below other components, it will be shown in (1Mark)
(A) Hierarchy Window. (B) Inspector window. (C) Access window.
(D) Node window.
(Q.55) The method which is used to close the current window is known as
(A) close.
(B) alert().
(C) dispose().

(D) disappear().

(Q.56) The method used to ask users for confirmation is


(A) showConfirmDialog().(B) confirmDialog().(C) showDialog().(D) showConfirm().
(Q.57) We can create other dialogs using
(A) a Create Dialog.
(B) a Build Dialog.

(C) a Message Dialog.(D) an Option Dialog.

41

(Q.58) The import statement required for using JOptionPane is


(A) import javax.swing.JOptionPane.
(B) import JOptionPane.
(C) import javax.Jswing.JOptionPane. (D) import javax.Swingx.JOptionPane.
(Q.59) When OK button is clicked, the dialog window is removed because of
(A) dealloc(); (B) setvisible(false);
(C) MsgDialog();
(D) MsgDialog.dispose();
(Q.60) Related information can be best represented through a/an
(A) Dialog box. (B) Table.
(C) Radio button.

(D) Option pane.

(Q.61) A table model object must implement the


(A) TableModel interface.(B) Default table model.(C) import javax.(D) javax.swing.table.
(Q.62) Which predefined dialog type of JOptionPane class does not return anything?
(Q.63) Write the commonly used component Methods of JTable Class.
(Q.64) Define Table Model in java Swing.
(Q.65) Write the function which is used to return the number of rows from the table.(1Mark)
(Q.66) Rahul is working with java swing and he wants to show the data in tabular form. Can you name the option that he will
use?
(Q.67) Name the function that returns the cell value of a table.
(Q.68) Write the function for invoking input dialog for big form.
(Q.69) Write the code to add the detail (12, Amrita, Head) in table.
(Q.70) Write the type of Dialogs supported by Java Swing.
(Q.71) Sai is working with java swing. He wants to show option dialog. Which function will he use?
(Q.72) Write the name of the button which is used to create your own designed Dialog Box.
(Q.73) Write the import statement required for using JOptionPane class.
(Q.74) Write the procedure to add or remove rows in a JTable object.
(Q.75) Write the names of simple modal dialogs of JOptionPane.
(Q.76) Write the method form for invoking Message Dialog.
(Q.77)Addition or Removal of rows in a table can be performed by which option in java(1Mark)
(Q.78) Write the function to show the confirm dialog.
(Q.79)Write the function which is used to display the message in JOptionPane class(1Mark)
(Q.80) What is the purpose of model property?
(Q.81) What is JColorChooser?
(Q.82) Write the difference between a dialog created with JDialog and a dialog created with JOptionPane?
(Q.83) Write the function to obtain table model of a table named mytable1? (2Marks)
(Q.84) Write the syntax to obtain the table model in DefaultTableModel object.
(Q.85) Write the syntax to add a row to the DefaultTabelModel.
(Q.86) Define Dialog window in java.
(Q.87) Write the function which is used to display the input dialog box.
(Q.88) Write the syntax to remove a row from the DefaultTabelModel.
(Q.89) Write the method to count the number of rows and columns in a table named as myTbl1.
(Q.90) Write the function for invoking Confirm Dialog for a big form.
(Q.91) Write the modal dialogs for JOptionPane.
(Q.92) Write the procedure to set the dialog during runtime.
(Q.93) Dialogs created by JOptionpane are made up of four basic elements. Discuss all of them.
Database Connectivity to MySQL
(Q.1) The resultset is
(A) used for executing SQL statement. (B) a logical set of records.
(C) session between application program & database(D)the method to create or modify tables
(Q.2) One of the tasks that JDBC performs from within Java application code is
(A) establishing a connection with a database.
(B) providing connectivity to non-Java front end applications.
(C) modifying tables.
(D) creating an instance of driver.
(Q.3) ODBC is developed by
(A) Sun Microsystems. (B) Microsoft.

(C) IBM.

(D) Oracle.

(Q.4) first( )

42

(A) moves the cursor forward one row.(B) moves cursor to first row in the ResultSet object.
(C) moves cursor relative to its current position.
(D) retrieves the current row number the cursor is pointing at.
(Q.5) last( )
(A) positions the cursor on the rno-th row of the ResultSet object.
(B) moves cursor relative to its current position.
(C) moves cursor to first row in the ResultSet object.
(D) moves cursor to last row in the ResultSet object.
(Q.6) The method of a ResultSet that shows the status of ResultSet object is known as(1Mark)
(A) stmt().
(B) conn().
(C) executeQuery().
(D) getResultSet().
(Q.7) The most popular programming interface for accessing relational database is
(A) JDBC.
(B) JVM.
(C) ODBC.
(D) XML.
(Q.8) JDBC stands for
(A) Java Database Connectivity.
(C) Java Digital Base Connector.

(B) Java Database Composition.


(D) Java Digital Base Composition.

(Q.9) Function of DriverManager class is to


(A) represent connection with data source.
(B) use for executing SQL statements.
(C) represent database result set generated by using SELECT SQL statement.
(D) load JDBC driver in memory.
(Q.10) Function of Connection class
(A) is to load JDBC driver in memory.
(B) represents connection with data source.
(C) is used for executing SQL statements.
(D) provides predefined methods to access, analyse and convert data values.
(Q.11) The method that is used to open a Connection is
(A) openConnection();
(B) DriverManager.getConnection();
(C) Class.openConnection();
(D) Statement.getConnection();
(Q.12) A Connection is represented through
(A) Connection object.(B) ResultSet object.(C) Statement object.(D) Connector.
(Q.13) ResultSet.relative(introws) moves the cursor to the
(A) current position.
(B) specific record.
(C) first row.

(D) last row.

(Q.14) A function used to load the driver is


(A) Classname()
(B) Class.name()

(C) Class()

(Q.15) WHERE clause specifies


(A) table name.
(C) connection between java program and database.

(D) Class.forName()

(B) selection criteria for the query.


(D) name of the primary key.

(Q.16) The type of driver which acts as a bridge access to a database and which was previously accessed via ODBC is
known as
(A) jdbc.odbc bridge.
(B) odbc bridge.(C) jdbc bridge. (D) Jdk bridge.
(Q.17) JDBC
(A) helps in communication between networks.(B) establishes a connection with a database.
(C) is the name of the class.
(D) is a transmission medium.
(Q.18) MySQL provides connectivity for client applications developed in Java programming language via a JDBC driver,
known as
(A) MySQL Connector/J.
(B) Java API.
(C) ODBC API. (D) Driver Manager.
(Q.19) Class offers the method that is used to register the driver with DriverManager, known as
(A) Name().
(B) forClass().
(C) forName().
(D) Name.for().
(Q.20) MySQL databases URL is framed as

43

(A) jdbc://mysql://database-name.
(B) jdbc://mysql://database-name?username.
(C) jdbc://mysql://database-name?password.
(D) jdbc://mysql://localhost/database-name? user = username &password = password.
(Q.21) If the result-set contains multiple rows, then to retrieve data from all rows of the record-set, we use
(A) location.
(B) row numbers.
(C) loops.
(D) connections.
(Q.22)If we have an INSERT/DELETE/UPDATE query, then the method we need to invoke is (1Mark)
(A) < statement - object >.executeQuery()
(B) < statement - object >.executeUpdate()
(C) executeObject()
(D) < statement - object >.updateQuery()
(Q.23) The first step to make a JDBC connection is to
(A) get the connection.
(B) create a database connection.
(C) create a query.
(D) register the database driver.
(Q.24) Syntax for the statement that can be used to update the database is
(A) Statement = con.createStatement(); (B) Statement stmt = createStatement();
(C) Statement stmt = con.Statement(); (D) Statement stmt = con.createStatement();
(Q.25) Update and Insert query can be executed by
(A) processUpdate()
(B) update()
(C) runUdate() (D) executeUpdate()
(Q.26) To execute one static SQL statement, we use
(A) Result object.
(B) First object. (C) Set object. (D) Statement object.
(Q.27) The syntax to open a database is
(A) DriverManager.getConnection(jdbc:mysql://localhost:3306/school, "root" , "Pooja");
(B) DriverManager.getConnection(jdbc:mysql://localhost:3306/school,root ,Pooja);
(C) DriverManager.getConnection(jdbc:mysql://localhost:3306/school, "root" , "Pooja");
(D) DriverManager.getConnection(jdbc:mysql://localhost:3306/school,"root" ,"Pooja");
(Q.28) Two commonly used drivers to connect MySQL from Java are:
(A) Java.sql.Driver and com.jdbc.driver. (B) Java.Driver and com.mysqldriver.
(C) Java.sql and com.mysql.jdbc..
(D) Java.sql.Driver and com.mysql.jdbc.driver.
(Q.29) One of the class in JDBC API hierarchy is
(A) MySQL class.
(B) ODBC class.

(C) Statement class.

(D) Bridge class.

(Q.30) Function of Statement class is


(A) to provide predefined methods to access, analyse and convert data values.
(B) that it is used for executing SQL statements.
(C) that it loads JDBC driver in memory. (D) that it opens connections to data source.
(Q.31) Function of ResultSet class is
(A) to load JDBC driver in memory.
(B) used for executing SQL statements.
(C) used to provide predefined methods to access, analyse and convert data values.
(D) opens connections to data source.
(Q.32) next( )
(A) moves the cursor to first row in the ResultSet object.
(B) moves the cursor forward one row.
(C) positions the cursor on the rno-th row of the ResultSet object.
(D) moves the cursor to the last row in the ResultSet object.
(Q.33) getRow( )
(A) positions the cursor on the rno-th row of the ResultSet object.
(B) moves cursor relative to its current position.
(C) retrieves the current row number the cursor is pointing at.
(D) moves the cursor forward one row.
(Q.34) JDBC API consists of
(A) set of interfaces and classes written in Java programming.

44

(B) protocols that register the drivers.


(C) methods used in DriverManager.

(D) statement objects.

(Q.35) Purpose of DriverManager is to


(A) create ResultSet object.
(B) create Statement object.
(C) manage the drivers for a JDBC application. (D) manage the JDBC layer.
(Q.36) Database URL specifies
(A)name of the network(B)name of the driver(C)protocol for communication(D)name of object
(Q.37) executeQuery( )
(A) executes Update, Insert or Delete statements.
(C) executes statements that return more than one result set.

(B) produces single result set.


(D) modifies statements.

(Q.38) executeUpdate( )
(A) modifies statements.
(B) produces single result set.
(C) executes Update, Insert or delete statements.
(D) executes statements that return more than one result set.
(Q.39) Execute( )
(A) executes statements that return more than one result set.
(B) modifies statements.
(C) produces single result set.
(D) executes Update, Insert or delete statements.
(Q.40) Once a connection to the database has been establish, we can use the connection object to
(A) create statements. (B) create objects.
(C) create function.
(D) create class.
(Q.41) A command in SQL which returns multiple results is
(A) execute().
(B) run().
(C) process().
(Q.42) The executeQuery( ) returns a single
(A) Query.
(B) Value.

(D) query().

(C) ResultSet object.

(D) Column.

(Q.43) By default, a ResultSet object sets its current position as before


(A) first row of ResultSet.
(B) second row of ResultSet.
(C) third row of ResultSet.
(D) fourth row of ResultSet.
(Q.44) The ResultSet is just like a cursor which holds the
(A) column of a table.(B) row of a table.(C) value of a table.(D) tuple row of ResultSet.
(Q.45) The ResultSet.next( ) makes the next row to the
(A) current row. (B) second row. (C) middle row. (D) last row.
(Q.46) ResultSet.last moves the cursor in the ResultSet object to the
(A) current row. (B) second row. (C) middle row. (D) last row.
(Q.47) A method which moves the cursor to the nth row is known as
(A) ResultSet.relative(introws). (B) ResultSet.absolute(introws).
(C) ResultSet.last(introws).
(D) ResultSet.after(introws).
(Q.48) The method for retrieving column values from the current row is known as
(A) getXXX.
(B) setXXX.
(C) getvalue.
(D) setvalue.
(Q.49) A class of java package which controls the JDBC drivers is known as
(A) Driver.
(B) Driver Manager.
(C) Package. (D) Controllers.
(Q.50) All the classes in Java are imported by the
(A) * symbol. (B) & symbol.
(C) # symbol. (D) *. symbol.
(Q.51) If the connection is not established between the Java and SQL, it throws the
(A) exception. (B) data.
(C) information.
(D) driver.
(Q.52) When you have loaded a driver, it is available for making a
(A) path.
(B) way.
(C) route.

(D) connection.

45

(Q.53) The full form of ODBC is


(A) Object Data Connectivity.
(C) Open Database Connectivity.

(B) Oriented Data Connectivity.


(D) Open Data Connectivity.

(Q.54) Backbone of JDBC architecture is


(A) software.
(B) connection.

(C) JDBC drivers.

(D) execute.

(Q.55)To establish connection between Java & MySQL, we need a software that is called(1Mark)
(A) SQL Connector.
(B) MySQL Connector/J.
(C) J Connector.
(D) MM Connector/J.
(Q.56) The method used to close all database resources is
(A) close( ).
(B) rs.next( ).
(C) first( ).

(D) last( ).

(Q.57) To import the entire package, the command is


(A) import java;
(B) import java.sql.*;
(C) importpackage;

(D) javapackage;

(Q.58) A method to retrieve data from result set is


(A) Resultset.getXXX(). (B) Result.getXXX().(C) Resultset.XXX().(D) Resultset().
(Q.59) To select a JAR/Folder from the project window, one needs to click on
(A) Test Package.
(B) Source Package.
(C) Library Node.
(D) Properties.
(Q.60) We send SQL statements to DBMS by
(A) JDBC statement.
(B) Local host. (C) Connection. (D) Query.
(Q.61)
(Q.62)
(Q.63)
(Q.64)
(Q.65)
(Q.66)
(Q.67)
(Q.68)
(Q.69)
(Q.70)
(Q.71)
(Q.72)
(Q.73)
(Q.74)
(Q.75)
(Q.76)
(Q.77)
(Q.78)
(Q.79)
(Q.80)
(Q.81)
(Q.82)
(Q.83)
(Q.84)
(Q.85)
(Q.86)
(Q.87)
(Q.88)
(Q.89)
(Q.90)
(Q.91)

What is the use of class.forName() method?


Menu can contain sub-menus. What does this means, and how are sub-menus handled in java?
Write the different types of JDBC drivers?
What do you understand by ODBC and how is it different from JDBC?
What are the different types of parameters required for "class.forName" while loading drivers?
What type of parameter that we use in executeQuery() method?
Discuss the difference between executeQuery() and executeUpdate() methods?
Brief the concept of ResultSet Methods. Also discuss the next() and first() methods.
What tasks does JDBC perform ?
Explain the purpose of Driver manager.
What is MySQL JDBC connector?
What is the JDBC-ODBC Bridge?
Write the usage of ResultSet.last() statement.
What does a JDBC do for you?
What is the role of connection?
Which package's classes must be included as part of your Java application for database connectivity to work ? ?
Write the name of two most popular database connectivity frameworks.
What is execute() method?
What is Driver Manager in java.
What is a DriverManager class?
Name the four component of JDBC.
What is the first step to access database data into java program?
What is class.forName(String driver) method?
Define the term JDBC.
Discuss the use next() function.
Explain getConnection() method with its syntax.
Write the steps to open a connection() method with its syntax.
How can you create JDBC statement objects and what are they?
Describe how to open a database connection using JDBC.
Write the steps for the JDBC connection?
How do we use a statement object in SQL.
Web Application Development

(Q.1) The series of numbers representing a Web address are better known as
(A) URL.
(B) HTTP.
(C) URI.
(D) IP address.

46

(Q.2) The acronym URL stands for


(A) Unknown Reference Location.
(C) Unfamiliar Rodent Lounge.

(B) Uniform Resource Locator.


(D) Union Resource Locator.

(Q.3) An E-mail is the acronym for


(A) Elective Mail.
(B) Exchange Mail.

(C) Environmental Mail. (D) Electronic Mail.

(Q.4) A hyperlink is a
(A) very fast internet connection.(B) words or images that reference other electronic files.
(C) type of error message.
(D) video game.
(Q.5) A URL
(A) stores video clips.
(C) identifies the location of an electronic file.

(B) transmits live webcam images.


(D) prevents viruses from spreading.

(Q.6) A Web server is a


(A) computer that stores electronic files.(B) person that brings food from restaurants.
(C) hardware device for a laptop.
(D) software program.
(Q.7) Protocol that is used for the Web client to talk to the server is
(A) HTML.
(B) HTTP.
(C) CGI.
(Q.8) A common use of CGI is
(A) real-time updates of Web pages.
(C) animations used on Web sites.

(D) Perl.

(B) web site guest books.


(D) simulations on Web sites.

(Q.9) A Web client is


(A) any program that connects with a Web server.
(C) the software that runs on an Internet host.

(B) another name for a browser.


(D) Web address of the user.

(Q.10) A word that looks underlined on a web page is usually


(A)an important word(B)the web address(C)a " link " to another web page(D) a mistake.
(Q.11) All web addresses start with
(A) htp.
(B) http://.

(C) http:/.

(D) WWW.

(Q.12) This URL tells about the source http://www.Summervilla.edu, which is


(A) associated with an educational institution.
(B) an English teachers personal home page.
(C) an article from a magazine.
(D) from a directory.
(Q.13) The http://www.classzone.com is an example of
(A) a URL.
(B) an access code.
(C) a directory. (D) a server.
(Q.14) The Internet was originally developed by
(A)computer hackers(B)a corporation(C)U.S. Department of Defense(D)University of Michigan
(Q.15) Pages that comprises the same information in response to all requests from all users is
(A) simple pages.
(B) complex pages.
(C) static pages.
(D) dynamic pages.
(Q.16) The user runs client software to
(A) process query.
(B) create query.

(C) wait for query.

(D) return result.

(Q.17) An address for a resource on the World Wide Web is


(A) URL or Universal/Uniform Resource Locator.(B) Cookie.(C) Firewall.(D) Certificate.
(Q.18) The term used by Web browsers to locate Internet resources is
(A) Hypertext. (B) Frames.
(C) URL.
(D) Bookmarks.
(Q.19) A web browser checks before it connects to a web site, the
(A) number of web pages in the web site.
(B) size of the web site.
(C) web site's Digital Certificate.
(D) type of web site.
(Q.20) The process of encoding data to prevent unauthorised access, especially during transmission is

47

(A) browsing.

(B) blogging.

(C) encrypting. (D) phishing.

(Q.21) The instructions given to computer to perform action is


(A) Statement. (B) Process.
(C) Technology Progress.

(D) Protocol.

(Q.22) In the URL http://www.microsoft.com, http is


(A) host name. (B) protocol name.
(C) server name.

(D) directory name.

(Q.23) The Internet host that generates the information is


(A) server.
(B) client.
(C) service provider.
(D) domain.
(Q.24) The term for the security measure that hides the identity of sensitive information sent across Web servers is
(A) Distortion. (B) Ciphers.
(C) Encryption. (D) Decode.
(Q.25) A markup language is
(A) numbers that respond to a browser's request for a Web page.
(B) a combination of letters and numbers that make up the address displayed on the top of the browser.
(C) a computer language that describes how text should be formatted on browser.
(D) a language that marks unformatted text.
(Q.26) A Web server is
(A) a special code that tells a browser how to display text.
(B) a software that responds to a browser's request.
(C) human that keeps up with Web surfers constant demands by manually sending Web sites back to browsers.
(D) WWW client that navigates through web.
(Q.27) Web Browser is used to access the Internet services and resources available through the World Wide Web, it is
basically a
(A) software.
(B) program.
(C) operating system. (D) network server.
(Q.28) A computer on the Internet that hosts data, that can be accessed by web browsers using HTTP is known as
(A) Web Computer.
(B) Web Rack.
(C) Web Space.
(D) Web Server.
(Q.29) If user needs to run a CGI program or script, the Web browser will
(A) send a GET request to the server, using the script name as the requested file name.
(B) send a CGI request to the server, using the script name as the requested file name
(C) send a CGI request to the server, which can automatically determine the script name.
(D) send a script request to the server, using the script name as the requested file name.
(Q.30) Visitors can customize some or all of the content, such as stock quotes, weather or ticket availability in
(A) Static Web page.
(B) Home page. (C) Dynamic Web page. (D) Web server.
(Q.31) The process of a computer receiving information, such as a Web page, from a server on the Internet is
(A) streaming.
(B) downloading.
(C) flowing.
(D) uploading.
(Q.32) An Internet standard that permits file uploading and downloading with other computers on the Internet is
(A) Telnet.
(B) FTP.
(C) IM.
(D) Webcasting.
(Q.33) CGI program generates
(A) Web rack.
(B) Web pages. (C) Dynamic web pages.
(D) HTML pages.
(Q.34) A connection between a part of a Web page and a different part of the same Web page or another Web Page is
(A) server.
(B) protocol.
(C) browser.
(D) hyperlink.
(Q.35) The World Wide Web is
(A) a computer game.
(B) a software program.
(C) the part of the Internet that enables information-sharing via interconnected pages.
(D) another name for the Internet.
(Q.36) The three parts of a Web site's address are
(A) host name, folder name, subfolder name.
(B) domain name, sub domain name, machine address.
(C) host name, domain name, top-level domain name.

48

(D) top-level domain name, domain name, host name.


(Q.37) Server machines use numbered
(A) Routers.
(B) Ports.

(C) Hubs.

(D) Clients.

(Q.38) The term for a machine that contacts a server for information is
(A) Client.
(B) Master.
(C) Host.

(D) Slave.

(Q.39) Internet has been around for a few decades, but the Web was invented in
(A) 1992.
(B) 1990.
(C) 1989.
(D) 1991.
(Q.40) A request send for a PHP page from a client is passed to
(A) PHP interpreter.
(B) JSP interpreter.
(C) Developer. (D) Server Side Include.
(Q.41) A Web browser
(A) requests, interprets and displays Web pages.(B) works as a tool to design Web pages.
(C) delivers Web pages.
(D) runs gateway programs.
(Q.42) Commonly used program to create Web pages is
(A) Notepad.
(B) Power point.(C) Adobe Reader.
(Q.43) Browser developed from Mozilla is
(A) Internet Explorer.
(B) Firefox.
(C) Safari.

(D) Paint.

(D) Lynx.

(Q.44) Fast and stable browser that is compatible with most relatively operating systems is
(A) Lynx.
(B) Opera.
(C) Firefox.
(D) Internet Explorer.
(Q.45) The browser retrieves code, usually written in
(A) HTML.
(B) HTTP.
(C) FTP.

(D) SMTP.

(Q.46) Each web site has a unique address called


(A) path.
(B) file name. (C) URL.

(D) URI.

(Q.47) A location on web server is called a


(A) Web document.
(B) Web page. (C) Web interface.

(D) Web site.

(Q.48) A document created by web server whenever a browser requests the document is (1Mark)
(A) dynamic.
(B) static.
(C) active.
(D) inactive.
(Q.49) Dynamic documents are sometimes referred to as
(A) client-side document.
(B) server-side dynamic document.
(C) static web pages.
(D) active web pages.
(Q.50) The interpreter processes the PHP code and generates an output, which is
(A) static.
(B) dynamic.
(C) active.
(D) inactive.
(Q.51) A repository of information linked together from points all over the world is (1Mark)
(A) World Wide Web.
(B) Hyper Text Transfer Protocol.
(C) Hyper Text Markup Language.
(D) Uniform Resource Locator.
(Q.52) Dynamic documents are sometimes referred to as
(A) HTML pages.(B) Active documents.(C) Server-side dynamic documents.(D) Static documents.
(Q.53) A technology that creates and handles dynamic documents is
(A) GIC.
(B) CGI.
(C) GCI.

(D) AGI.

(Q.54) Client-Server communication can take place in


(A) two forms. (B) three forms. (C) five forms. (D) many forms.
(Q.55) Web Pages that changes when the developer modifies them are
(A) active pages.
(B) inactive pages.
(C) static pages.
(D) HTML pages.

49

(Q.56) Server is usually located at a


(A) nearby computer. (B) remote computer.

(C) world wide web.

(D) network set up.

(Q.57) A language for creating Web pages is


(A) HTTP.
(B) GIC.

(C) FTTP.

(D) HTML.

(Q.58) The WWW today is a client-server service, which is


(A) limited.
(B) vast.
(C) distributed. (D) complex.
(Q.59) Browsers interact with the server using a set of instructions called
(A) protocols. (B) rules.
(C) parameters.
(D) regulations.
(Q.60) Part of Internet that brings all the protocols under one roof is
(A) Client.
(B) Server.
(C) WWW.

(D) HTTP.

(Q.61) If one plans to transfer files on a regular basis, then one should use
(A) FTP sockets.
(B) FTP client. (C) HTTP interface.
(D) SMTP storehouse.
(Q.62) The web browser program sends a request to
(A) another browser.(B) web administrator.(C) local machine.(D) web server.
(Q.63) In HTTP communications, the role Web browser plays is
(A) as a client. (B) as a server. (C) as a host. (D) as a protocol.
(Q.64) Client-side scripting programs are executed by
(A) Web browser before making a HTTP request.
(B) Web server after receiving a HTTP request, but before HTML is generated.
(C) Web browser after receiving a HTTP response containing HTML.
(D) Web server after generating HTML but before sending a HTTP response.
(Q.65) PHP stands for
(A)Private Home Page(B)Personal Hypertext Processor(C)Public Home Page(D)Personal Home Page.
(Q.66) A fixed-content document that is created and stored in a server is a
(A) dynamic document. (B) static document.
(C) active document.
(D) client document.
(Q.67) The World Wide Web is a massive collection of web sites, all hosted on
(A) Computers.
(B) Internet.
(C) World Wide Web. (D) A network.
(Q.68) Document that is created by a Web server whenever a browser requests the document is
(A) static.
(B) dynamic.
(C) active.
(D) inactive.
(Q.69) One way to create an active document is to use
(A) CGI.
(B) URL.
(C) Java applets.
(Q.70) WWW is the acronym of the
(A) Web World Wide. (B) World Wide Webpage.

(D) HTML pages.

(C) World Wide Websites.(D) World Wide Web.

(Q.71) The Web is a computer network all over the


(A) world.
(B) country.
(C) continent.

(D) state.

(Q.72) All the computers use a communication standard called


(A) FTP.
(B) TELNET.
(C) RSS.

(D) HTTP.

(Q.73) A Web browser access the webpage from a Web server by a


(A) request.
(B) response.
(C) interrupts.
(D) normal messages.
(Q.74) Symbol used as a separator in a domain name is
(A) dot(.).
(B) slash(/).
(C) colon(:).

(D) comma(,).

(Q.75) It is a client program that initiates requests to a


(A) network server.
(B) World Wide Web. (C) Web server. (D) operating system.

50

(Q.76) Web browsers often provide a


(A) graphical interface. (B) interface.

(C) way.

(Q.77) Majority of the Web sites use the


(A) TELNET.
(B) FTP.

(D) operating system.


(C) HTTP.

(Q.78) Internet Explorer is most commonly used


(A) operating system. (B) browser.
(C) network service.

(D) RSS.

(D) World Wide Web.

(Q.79) HTML is used to


(A) plot complicated graphs.
(B) solve equations.
(C) translate one language into another. (D) author webpage.
(Q.80) The " http " type at the beginning of any site's address stands for
(A) HTML Transfer Technology Process. (B) Hyperspace Techniques and Technology Progress.
(C) Hyperspace Terms and Technology Protocol. (D) Hyper Text Transfer Protocol.
(Q.81) Google (www.google.com) is a
(A) number in math.(B) search engine.(C) chat service on the web.

(D) directory of images.

(Q.82) Yahoo (www.yahoo.com) is a


(A)portal(B)super computer(C)organisation that allocates web address(D)website for consumers
(Q.83) Safari is a web browser developed by
(A) Microsoft
(B) Apple Computer.

(C) IBM.

(D) INTEL.

(Q.84) CGI is a program intended to be run on


(A) database.
(B) word.

(C) web.

(D) power point.

(Q.85) The full form of JSP is


(A) Java Server Pages(B) Java Special Pages(C) Java Static Pages.(D) Java Showing Pages.
(Q.86) A CGI program can
(A) generate on-the-fly Web page updates.
(B) update an existing Web page in a Web browser.
(C) generate any object that can be displayed in a Web browser.
(D) do real-time updates of static webpages.
(Q.87) A common use of CGI is
(A) real-time updates of web pages.
(C) animations used on web sites.

(B) web site guest books.


(D) to specify any kind of information on the Internet.

(Q.88) A Web client is


(A) any program that connects with a web server.
(C) the software that runs on an Internet host.

(B) another name for a browser.


(D) any computer remotely situated.

(Q.89) The protocol used for the Web client to talk to the server is
(A) HTML.
(B) HTTP.
(C) CGI.

(D) Perl.

(Q.90) HTTP (HyperText Transfer Protocol) requests are


(A) the only way information moves around the Internet.
(B) used to request HTML from a Web server.
(C) used to ensure a stateful exchange of information over the Internet.
(D) are server response to Internet.
(Q.91) CGI stands for
(A) Common Gateway Interface.
(C) Commonly Game Interaction.

(B) Common Graphical Interface.


(D) Common Group Interface.

(Q.92) SSI stands for


(A) Server Side Include.
(C) Strategic Simulations Include.

(B) Server Side Interface.


(D) Switch Server Interface.

51

(Q.93) ASP stands for


(A) Automatic Service Pages.
(C) Active Server Pages.

(B) Animated Server Pages.


(D) Application Service Provider.

(Q.94) The feature common in CGI, SSI, ASP and servlets is that they can/are
(A) execute on the client or the server for maximum flexibility.
(B) execute on the server and interact with other server programs.
(C) easy and quick to learn.
(D) efficient and scale well as the number of visitors to site increases.
(Q.95) HTML is an acronym of
(A) High Tech Markup Language.
(C) Hyper Text Markup Language.

(B) How To Markup Language.


(D) HoT MeaL.

(Q.96) Telnet is a
(A) telephone network.
(C) standard Internet protocol for remote login.

(B) teller network.


(D) dialup program.

(Q.97) FTP stands for


(A) Full Text Processing.
(C) File Transfer Process.

(B) File Transfer Program.


(D) File Transfer Protocol.

(Q.98) Web Server is software for


(A) analyzing Web traffic.
(C) crawling the Web.

(B) serving Web page upon user's request.


(D) Unix Operating System.

(Q.99) Gobal means of data transfer medium is


(A) HTTP.
(B) Internet.
(C) chat service on the web.

(D) directory of images.

(Q.100) Internet Explorer is a


(A) News Reader.
(B) Graphing Package. (C) Web Browser.

(D) Any person browsing the net.

(Q.101) Name a web server originally developed on UNIX platform.


(Q.102) Name a web server from Netscape.
(Q.103) Name a web server from Microsoft.
(Q.104) Give two example of commonly used web browser.
(Q.105) What is a client machine?
(Q.106) What is a Server?
(Q.107) Name three parts of URL.
(Q.108) What is DNS.
(Q.109) What does http in URL specify?
(Q.110) Why is Telnet used?
(Q.111) What do you mean by URL?
(Q.112) Which document is referred as server side document?
(Q.113) Name any four functions of Web server.
(Q.114) What is web application development?
(Q.115) What is a Client and a Server?
(Q.116) Name some commonly used Servers?
(Q.117) Explain difference between web server and a web browser?
(Q.118) Write the purpose of PHP and Mozilla?
(Q.119) What is Client-Server Computing?
(Q.120) Differentiate between Static and Dynamic web pages.
(Q.121) How does client server communication takes place with CGI scripts.
(Q.122) Name some server side technologies used for generating dynamic web pages. (2Marks)
(Q.123) Explain URL and its components.
(Q.124) What is the role of web server program on the Internet?
(Q.125) What do you understand by Client-Server Model?
(Q.126) Explain how CGI works.
(Q.127) What do you understand by the following?
i) URL ii) CGI iii) ASP
(Q.128) Discuss advantages of dynamic web pages.

52

(Q.129) Explain Internet protocols and commonly used protocols.


(Q.130) What is WWW? How does it function?
(Q.131) Discuss advantages and disadvantages of static web pages.
HTML - I : Basic HTML Elements
(Q.1) A coded HTML command that indicates how part of web page should be displayed is known as a/an
(A) tag.
(B) document.
(C) file.
(D) header.
(Q.2) Anushka wants to make the background appear green in the browser. The correct HTML is
(A) < body bgcolor=green >.
(B) < background >green< /background >.
(C) < body=green, background >.
(D) < body style=background-color:green >.
(Q.3) To specify English language, we use
(A) eng.
(B) english.

(C) eg.

(Q.4) The tag to include a background image is


(A) < body style=background-image:filename.gif >.
(C) < body background = filename.gif >.

(D) en.

(B) < image >filename.gif< /image >.


(D) < body bgimg=filename.gif >.

(Q.5) Rahul desires to code in html. He wants the title to be displayed in his browsers window. The html tag that he should
use is
(A) < head >. (B) < title >.
(C) < caption >.
(D) < p >.
(Q.6) Shikha wants to make the body text appear 70 pixels away from top edge of the page. The correct attribute to be used
is
(A) < body margin:top = 70 >.
(B) < topmargin >70< /topmargin >.
(C) < body style=70:topmargin >.
(D) < body topmargin = 70 >.
(Q.7) Rajeev wants to make the text appear in center. The correct HTML tag is
(A) < body style = center >.
(B) < center > The text is centralized< /center >.
(C) < /center > The text is centralized < center >.
(D) < centralized > The text is centralized < /centralized >.
(Q.8) Rohan has prepared an article. He wants that the text should be displayed exactly ( i.e., with all the tabs, blank lines
etc. ) in the same way as he has typed in the HTML code. The HTML tag that needs to be used by Rohan is
(A) < br >< /br >.
(B) < p >< /p >.
(C) < p align = center >.(D) < pre >< /pre >.
(Q.9) Abha wants to change the color, style and size of the text, which she has created in HTML. The correct tag to achieve
this is
(A) < font > tag.
(B) < style > tag.
(C) < size > tag. (D) < color > tag.
(Q.10) Siddharth is creating a web site with the help of html codes. He wants the text that appears on the website to be
either in Georgia or Bookman Old Style font. The attribute which he should use is
(A) < font style = Georgia; Bookman Old Style >.
(B) < font type = Georgia, Bookman Old Style >.
(C) < font face = Georgia, Bookman Old Style >.
(D) < font text = Georgia; Bookman Old Style >.
(Q.11) Priyanka is preparing some questions for the students of her class to make them understand the concept of the
HTML. She desires to have a horizontal line of size 4 and width 40% drawn after each question. The correct HTML code to
accomplish this is
(A) < horizontal = size:4 , width =40% >.
(B) < horizontal> size= 4, width =40% < /horizontal >.
(C) < hr size = 4 width = 40% >.
(D) < hr > size = 4 , width = 40% < /hr >.
(Q.12) The attribute that specifies a horizontal line to be rendered in one solid color (noshaded), instead of a shaded color, is
known as
(A) unshade attribute. (B) noshade attribute.(C) nonshaded attribute.(D) shading attribute.

53

(Q.13) Bela has Windows XP installed on her computer. She wants to create a first page using the HTML code. She is
confused with the steps to open the text editor, which in this case is notepad. The correct steps are
(A) Start
Run
Programs
Microsoft Office.
(B) Start
Settings
Taskbar
Notepad.
(C) Start
Programs
Accessories
Notepad.
(D) Start
Accessories Programs
Notepad.
(Q.14) Raghav has created a first page in HTML code. He clicks at File
Save command. Then, he selects the desired
folder. The file name chosen by him is trial. The extension that is to be used by him so as to save it properly is
(A) trial.swf.
(B) trial.avi.
(C) trial.xml.
(D) trial.htm.
(Q.15) Rita is coding for the first time in HTML. She has read the various HTML tags. The general form that she should use
for her HTML document is
(A) < head >
< title > < /head >
< /title >
(B) < html >
< head >
< title > < /title >< /head >
< body >< /body >< /html >
(C) < html >
< body >
< title > < /title >< /body >
< head >< /head >< /html >
(D) < head >
< body >
< /body >
< /head >
< html >
< /html >
(Q.16) Aditya has been practicing the html tags. He has worked on the tags like < i>, < p >, < br >, < hr >, < h1 >< h6 >.
Now he wants to define the text as strong. The statement that he wants to make it appear as strong is Life is beautiful. The
correct html tag to achieve this is
(A) < s > Life is beautiful < /s >.
(B) < strong > Life is beautiful < /strong >.
(C) < h > Life is beautiful < /h >.
(D) < div > Life is beautiful < /div >.
(Q.17) Abhay is taking a quiz on html basics. The first question that appears on screen, asks him to mark the correct option
out of the four options with html tags. The correct option is
(A) < strong > This is a test on html < /strong >.(B) < /b > This is a test on html < /b >.
(C) < strong > This is a test on html < strong >. (D) < b > This is a test on html < b >.
(Q.18) Rajat is preparing an html document. He wants a title should appear on the browser of the title bar. The < title >
should be placed in the
(A) body section.
(B) CSS section.
(C) footer section.
(D) head section.
(Q.19) Abhinav wants to code in html. He knows about the tag to be used to make his text appear in 3D horizontal rule. The
correct attribute that he should use to make the text in 2D is
(A) < horizontal size = 36 2d >.
(B) < hr size = 36 noshade >.
(C) < horizontal size = 36 noshade >.
(D) < hr size = 36 2d >.
(Q.20) Amisha wants to display one horizontal rule of width 40% and the other horizontal rule of width 70% after a line break,
in her html document. The correct format is
(A) < horizontal width = 40% , 70%> < br >.
(B) < hr width = 40%, br, 70% >.
(C) < br/ >< hr width = 40 %, 70% >.
(D)< hr width = 40% >< br >< hr width = 70% >.
(Q.21) Ritika wants to write a chemical reaction in an html code. The correct html tag that should be used by her to type
H2O is
(A) H < SUP > 2 < /SUP >.
(B) H < HR > 2 < /HR >.
(C) H < PRE > 2 < /PRE >.
(D) H < SUB > 2 < /SUB >.
(Q.22) Misha wants to change the background color of her webpage. The html tag that needs to be applied to the bgcolor
attribute so as to change the background color her webpage is
(A) < pre >.
(B) < body >.
(C) < head >.
(D) < title >.
(Q.23) Sangeeta wishes to write an equation of mathematics using html code. However, she wants the comments to be
added so that the equation can be understood by everyone without any guidance. The proper syntax to start an HTML
comment is
(A) < comment >.
(B) < ! comment >.
(C) < --! >.
(D) < !-- >.
(Q.24) Rita is preparing a question in mathematics, which includes a greater than symbol. But since this symbol has a
special meaning in html, the correct way to include greater than symbol is
(A) < !- - greater >.
(B) < & greater >.
(C) & gt.
(D) < & gt >.
(Q.25) The textual content that appears in the source HTML document but is not rendered by the browser is known as

54

(A) message.

(B) footer.

(C) title.

(D) comment.

(Q.26) Akash wants the background color to be in black color and the text to be in yellow. The correct format to achieve this
is
(A) < body style = background color: black, text: yellow >.
(B) < body bgcolor= black, text = yellow >.
(C) < body bgcolor=black text=yellow >.
(D) < bgcolor=black text=yellow >.
(Q.27) Ankur has written a paragraph using html. Now he wants the heading of the article should appear on largest font. The
heading should be in
(A) < h6 >.
(B) < h1 >.
(C) < h4 >.
(D) < h2 >.
(Q.28) Anurag wants the top margin of his document
should be set to 60. The correct format that should be used by him is
(A)<topmargin=60 >(B)< margin =top,60 >(C)< body margin=top,60 >(D)< body topmargin = 60 >
(Q.29) BASEFONT is an example of
(A) empty element.
(B) container element. (C) twin element.(D) pair element.
(Q.30) The < hr > tag is used inside
(A) < head >.
(B) < title >.

(C) < body >.

(D) < footer >.

(Q.31) The correct HTML for creating a hyperlink is


(A) < a name="http://www.extramarks.com">Extramarks.com< /a >
(B) < a >http://www.extramarks.com< /a >
(C) < a url=http://www.extramarks.com > Extramarks.com < /a >
(D) < a href=http://www.extramarks.com > Extramarks < /a >
(Q.32) A special word used inside tag to specify additional information to tag such as color, alignment etc. is known as
(A) tag.
(B) attribute.
(C) header.
(D) footer.
(Q.33) The default font size set by BASEFONT is
(A) 5.
(B) 2.
(C) 3.
(D) 1.
(Q.34) HTML stands for
(A) Home Tool Markup Language.
(C) Hyper Text Markup Language.

(B) High Text Marker Language.


(D) Hyper Transfer Marker Language.

(Q.35) The Web standards are made by


(A) World Wide Web Consortium.(B) Mozilla.(C) Microsoft.(D) Internet Explorer.
(Q.36) The correct HTML tag for the largest heading is
(A)<h1>.
(B) <h6>.
(C) <h7>.
(Q.37) HTML is a
(A) web page layout language.
(C) programming language.

(D)<hn>.

(B) word processing tool.


(D) desktop publishing solution.

(Q.38) The correct html tag for defining a paragraph is


(A) < para >.
(B) < paragraph >.
(Q.39) To insert a line break, we use
(A) < b >.
(B) < break >.

(C) < p >.

(D) < pg >.

(C) < br/ >.

(D) < break/ >.

(Q.40) HTML is
(A)case-sensitive(B)not case-sensitive(C)programming language(D) desktop publishing solution
(Q.41) For header information, we use
(A) < header > tag.
(B) < heading > tag.

(C) < h1 > tag. (D) < head > tag.

(Q.42) The html tag used to display the text in the browsers window is
(A) < br/ >.
(B) < head >.
(C) < title >.

(D) < body >.

55

(Q.43) The elements that require a starting as well as ending tags, is known as
(A) empty elements.(B) enclosed elements.
(C) container elements. (D) conditional elements.
(Q.44) The elements that require a starting tag and not an ending tag is known as
(A) empty elements.(B) container elements.(C) conditional elements.(D) enclosed elements.
(Q.45) To mark the beginning and end of an HTML document, we use
(A) < html > and < /html > tags.
(B) < title > and < /title > tags.
(C) < htm > and < /htm > tags.
(D) < head > and < /head > tags.
(Q.46) To specify the text direction for the content in an element, we use
(A) lang attribute.(B) directory attribute.(C) dir attribute.(D) text attribute.
(Q.47) The text that we type between < p > and < /p > tags is by default
(A) centre aligned.
(B) left aligned. (C) right aligned.
(D) bottom aligned.
(Q.48) The value of # FFFFFF is
(A) black.
(B) red. (C) green.

(D) white.

(Q.49) The value of # 000000 is


(A) black.
(B) red. (C) green.

(D) white.

(Q.50) The attribute to change the font type of the text we want to display is
(A) basefont. (B) font.(C) face.
(D) header.
(Q.51) If no font-name given in the list is supported by the browser, then the browser renders the text in
(A) arial font.
(B) verdana font.
(C) default font. (D) georgia.
(Q.52) Browser does not recognize
(A) fonts.
(B) paragraphs.

(C) tabs.

(Q.53) The default text color on a white background is


(A) white.
(B) black.
(C) red.

(D) headings.
(D) teal.

(Q.54) The correct HTML tag to make text bold is


(A) < bold >.
(B) < b1 >.
(C) < bd >.

(D) < b >.

(Q.55) The blank area left from the edge of a page is known as
(A) column.
(B) margin.
(C) row.
(D) tag.
(Q.56) The default size of horizontal rule is
(A) 3 pixels.
(B) 5 pixels.
(C) 8 pixels.

(D) 7 pixels.

(Q.57)One of the many tiny dots that make up the display on the computer is known as (1Mark)
(A) point.
(B) character.
(C) element.
(D) pixel.
(Q.58) The two types of size attributes are
(A) short and long.(B) float and short.(C) long and float.(D) absolute and relative.
(Q.59) The correct html tag to make a text italic is
(A) < i >.
(B) < italic >.
(C) < italicize >.

(D) < italics >.

(Q.60) VLINK refers to


(A) virtual links. (B) visited links. (C) visual links. (D) video links.
(Q.61) ALINK refers to
(A) audio links. (B) array links.

(C) activity links.

(D) active links.

(Q.62) The two types of styles for individual words or sentences are
(A)outer and inner(B)logical and abstract(C)logical and physical.(D) abstract and physical.

56

(Q.63) The element that only has a starting tag and not an ending tag is
(A) < html >.
(B) < p >.
(C) < br >.
(D) < head >.
(Q.64) In the < hr > tag, the default rule is
(A) 1-D.
(B) 2-D.
(C) 3-D.

(D) noshade.

(Q.65) The tag that is an example of physical text style is


(A)typewriter text <TT>(B) emphasis <EM>.(C) computer code <CODE>.(D) keyboard entry <KBD>.
(Q.66) The text style that renders the text according to its meaning is known as
(A)abstract text style(B)logical text style.(C) physical text style.(D) virtual text style.
(Q.67) The html container tag that should be applied to the text to format it to a paragraph is
(A)<paragraph> </paragraph>(B)<p> </p>(C)<format style = para> </format>(D) <para> </para>
(Q.68) The < center > tag is a/an
(A) container element.
(C) attribute used inside footer section.

(B) empty tag.


(D) attribute used inside title section.

(Q.69) To define the basic font size, the tag used is known as
(A) font.
(B) size.
(C) basefont.

(D) face.

(Q.70) The tag that identifies the document as an html document is known as
(A) < title >.
(B) < html >.
(C) < body >.
(D) < head >.
(Q.71) The tags that require a starting as well as ending tag are called
(A) empty elements.
(B) twin elements.
(C) pair elements.(D) container elements.
(Q.72) The text styles that are handled in its own way by the browsers are known as (1Mark)
(A) physical.
(B) logical.
(C) abstract.
(D) virtual.
(Q.73) The syntax of the heading element is
(A) < h >.
(B) < head >.

(C) < header >.

(Q.74) HTML has six levels of headings. They are numbered


(A) 2 through 7.
(B) 3 through 8.
(C) 1 through 6.
(Q.75) The blank area left from the edge of page is known as
(A) blank.
(B) border.

(D) < heading >.


(D) 4 through 9.

(C) pixel.

(Q.76) To break a text flow and insert the horizontal rule, the tag used is
(A) < br >.
(B) < break >.
(C) < text >.
(Q.77) The maximum characters that a title can have
(A) 72.
(B) 69.
(C) 23.

(D) < hr >.


(D) 64.

(Q.78) The attribute that sets the background graphics of body tag is known as
(A) bgcolor.
(B) background.
(C) body.
(Q.79) The length of an attribute value is limited to
(A) 1024 characters.
(B) 1125 characters.
(C) 1124 characters.

(D) margin.

(D) graphics.

(D) 1025 characters.

(Q.80) The correct way to use comments in the HTML code is


(A) < ! . This is a comment ! . >.
(B) < .! This is a comment .! >.
(C) < ! - - - This is a comment - - - >.
(D) < - - - ! This is a comment ! - - - >.
(Q.81)
(Q.82)
(Q.83)
(Q.84)
(Q.85)
(Q.86)

What does HTML stand for?


What all do we need to have to work with HTML?
What do you mean by tag in html?
What is hr tag used for?
Where is the head of the HTML document?
Who invented HTML?

57

(Q.87) What is an HTML document?


(Q.88) How many types of elements used in html? Name them.
(Q.89) What is the length of an attribute value?
(Q.90)Which attribute is used to set the background color of web page with <body>tag?(1Mark)
(Q.91) How many levels of heading are used in HTML?
(Q.92) What is the head tag used for?
(Q.93) What is < font > tag used for in HTML code? Give any two options used with this tag?
(Q.94) How do we declare comments in HTML code. What is it used for?
(Q.95) Give the HTML code line to set the background image as birds.gif.
(Q.96) Write the HTML codes to set the bgcolor as black and a text "I like to play football as lime.
(Q.97) Write the HTML codes to make body text appear 50 pixels away from the top edge of page and 75 pixels away from
left edge of page.
(Q.98) What is the purpose of using the tags < H1 >< H6 >?
(Q.99) What is the difference between < p > tag and < br > tag?
(Q.100) What is the title tag used for? Give an example.
(Q.101) What does the body tags enclose?
(Q.102) Write the expansions and the use of the following tags used in HTML:
a)
< hr >
b)
< br >
c)
<p>
(Q.103) What do we need to do to have a flat, 2D rule? Write the HTML code line. (3Marks)
(Q.104) What is the difference between container elements and empty elements?
(Q.105) What is the general form of an HTML document?
(Q.106) What does a background attribute do? Write the tag to include a background image.
(Q.107) What is the HTML command to display the following in your web page? A2 + B2(3Marks)
(Q.108) Differentiate between VLink and ALink? Give one example for each.
(Q.109) Write the HTML code to display a paragraph in blue color in size 4 but its first letter should be of size 6 and of red
color.
(Q.110) Write the HTML code to display text in a particular font-type.
(Q.111) Write a sample HTML code to display the lines in exactly the same way as given here: Joseph Brown
< J2 >, Garrison Avenue,
Durham 3511
HTML - II : Lists, Tables and Forms
(Q.1) The method attribute that is used to send the information to the URL specified through action attribute is known as
(A) POST.
(B) FORM.
(C) SET.
(D) GET.
(Q.2) Ekta wants to create an ordered list such that the list appears in lowercase letters starting from 6th letter. The correct
HTML code line is
(A)<ol=6>.(B) <ol type = a start = 6 >.(C) < ol start = 6 >.(D) < ol type = a, start = 6 >.
(Q.3) Sita wants to create an ordered list such that the list starts from number 8 and the numbering style is in lowercase
roman numerals. The correct HTML code line is
(A)<ol=8>.
(B) <ol type=8>.(C) <ol start = 8, type = i>.(D) <ol start = 8 type = i >.
(Q.4) Lekha has been asked to create an HTML code for the favorite sport of the user. She has to include a control type
such that the user is able to select one or more options. The control type that should be used is
(A) button.
(B) checkbox.
(C) submit.
(D) hidden.
(Q.5) Akriti is creating a HTML code for the expenses of the month January. She wants the sum (displayed at the bottom) in
the center and with the color as cyan. The correct HTML code line to do this is
(A)< td > < tr > Sum < /tr >
< /td >
(B)< td align = center bgcolor = cyan > < tr > Sum < /tr >< /td >
(C)< tfoot ><tr>< td >Sum< /td > < /tr >
(D)< tfoot align = center bgcolor = cyan > < tr > < td > Sum < /td > < /tr >
(Q.6) Sarthak wants that the Age, which is the header in table, to be in bold. The correct HTML code line for this is
(A)< b > Age < /b >
(B) < tr > Age < /tr >
(C)< tr > < th > Age < /th > < /tr >
(D)< td > < th > Age < /th > < /td >
(Q.7) Akash wants to span the rows in such a way so that the data is aligned in the middle. The correct HTML code for this is
(A) < table align = middle >.
(C) < tr align = middle >.

(B) < table valign = middle >.


(D) < tr valign = middle >.

58

(Q.8) Amit wants to create a list that contains different cars. But he wants the list items should have letters starting with A.
To achieve this, he should use
(A) < ol >.
(B) < ol type = A >.
(C) < ul type = A >.
(D) < ul >.
(Q.9) Ashita wants to create a list that contains various kinds of drinks. But she wants the list items should have bullets
rather than numbers or letters. To achieve this, she needs
(A) < ol >.
(B) < disc >.
(C) < ul >.
(D) < square >.
(Q.10) Ajay is creating a table in HTML. He is familiar with the tags in table like < td >, < th >, < tr > etc. Now, he wants to
give some amount of space between cell border and the cell contents. The correct attribute to achieve this is
(A) align.
(B) cellpadding.
(C) cellspacing. (D) valign
(Q.11) Reena is creating a table in HTML. She is familiar with the tags in table like < td >, < th >, < tr > etc. Now, she wants
to give some amount of space between cells. The correct attribute to achieve this is
(A) align.
(B) cellpadding.
(C) cellspacing.
(D) valign
(Q.12) Ayesha wants to specify the height of the table as 90 and width of the table as 45. Also, she wants the border of size
4. The correct HTML code is
(A) < table border = 4 ht = 90, width = 45 >.(B) < table border = 4 height = 90, width = 45 >.
(C) < table border = 4 height, width = 90, 45 >.
(D) < tr border = 4 height = 90, width = 45 >.
(Q.13) Sujit is creating a table. He wants the background color of his table to be aqua along with the border as 1. The
correct syntax for introducing the color in the background is
(A)< th border = 1 bgcolor = aqua >.
(B) < td border = 1 background = aqua >.
(C) < table border = 1 bgcolor = aqua >.
(D) <table border =1 background=aqua >.
(Q.14) Sneha is learning to create tables in HTML. She needs to write a caption as First Page for her table. The correct
way is
(A) < caption >First Page< /caption >.
(B) < title >First Page < /title >.
(C) < p >First Page < /p >.
(D) < head >First Page< /head >.
(Q.15) Rajeev wants the thickness of the table border to be 4. The syntax which he should use to achieve this is
(A) <th border=4>(B) <table bgborder=4>(C)<table border=4>(D)<td border=4 >.
(Q.16) The form attribute that specifies the target page where the result of script will be displayed is known as
(A) name.
(B) enctype.
(C) method.
(D) target.
(Q.17) Ashish wants to make use of some control which helps him to select only one or two options out of many options
available. The appropriate control is
(A) radio box.
(B) checkbox. (C) drop down box.
(D) button.
(Q.18) Manan is working on tables. He wants to left-align the content inside a table-cell. The correct HTML code line is
(A)<td valign=left>(B) < tdleft >.(C) < td align = left >.(D) < td leftalign >.
(Q.19) Mamta wants to create a frame such that top and bottom edges of the border are displayed. The correct HTML code
line is
(A) < table border = 1 frame = lhs >. (B) < table border = 1 frame = hsides >.
(C) < table border = 1 frame = above >.(D) < table border = 1 frame = vsides >.
(Q.20) Mahima wants to create a frame such that only the top edge of the border is displayed. The correct HTML code line is
(A) < table border = 1 frame = lhs >. (B) < table border = 1 frame = hsides >.
(C) < table border = 1 frame = above >.(D) < table border = 1 frame = abvside >.
(Q.21) Resham wants to display borders between rows only in the table. The correct HTML code line is
(A) < table border = 1 type = rows > (B) < table border = 1 compact = rows >
(C) < table border = 1 rules = rows > (D) < table border = 1 type = rows >
(Q.22) Shilpa is using the frame attribute for the first time. She wants the table border to be 2 and only the horizontal sides
of her frame should be displayed. The correct syntax is
(A) < table border = 2 frame = horizontal >.(B) < table border = 2 sides = hframe >.

59

(C) < table border = 2 frame = >.

(D) < table border = 2 frame = hsides >.

(Q.23) Ranjeet wants to show some computer options that may fit on the same line as the start of the definition. The attribute
to be used is
(A) start attribute.
(B) compact attribute. (C) dir attribute. (D) lang attribute.
(Q.24) Naina wants to display a table with border as 1 and the color of the border as teal. The correct HTML code line is
(A) < table border = 1 color >.
(B) < table border = 1 color = teal >.
(C) < table color = teal >.
(D) < table border = 1 bordercolor = teal >.
(Q.25) Damanjeet wants to give a border to her HTML table. The correct HTML code to display a border 3 for her table is
(A) < table> border = 3 </table >.
(B) < table border = 3 >.
(C) < td > border 3 < /td >.
(D) < tr > border 3 < /tr >.
(Q.26) Pinki wants to insert a new table row. The correct tag to be used is
(A) < table row >.
(B) < th >.
(C) < td >.
(D) < tr >.
(Q.27) Manisha wants to create an HTML table. She is searching for the correct table tag that should be used to mention the
title in the table. The correct table tag is
(A) < bt >.
(B) < I >.
(C) < caption >.
(D) < br >.
(Q.28) Rashi is taking the test on HTML. The first question that appears on her screen is: The two attributes for < ol > are
(A) dir and lang attribute.
(B) start and type attribute.
(C) type and underline attribute. (D) dir and start attribute.
(Q.29) Pooja desires to create an HTML code using < ul > tag in such a way that the list items have either squares or circles
before them. The attribute of < ul > tag that needs to be used is
(A) dir attribute. (B) lang attribute.
(C) type attribute.
(D) underline attribute.
(Q.30)Priya has to prepare a list of guests to be invited in the party. She wants that all names should have bullets before
them. The tag that can be used to accomplish this is(1Mark)
(A) < un >.
(B) < ul >.
(C) < uo >.
(D) < ol >.
(Q.31) The indented list without any bullet symbol or any number in front of each item is known as
(A) ordered list.
(B) unordered list.
(C) text list.
(D) definition list.
(Q.32) ROWSPAN and COLSPAN attributes are used to
(A) specify the span of a cell.
(B) delete rows and columns.
(C) edit rows and columns.
(D) insert rows and columns.
(Q.33) A list that lists the items with bullets is
(A) < list >.
(B) < dl >.

(C) < ol >.

(D) < ul >.

(Q.34) . Ramesh has to prepare an assignment on the basic types of lists in HTML. They are
(A)data list, number list, order list(B)data definition, number definition, order definition
(C)ordered list, unordered list, definition list(D)basic list, advanced list, logical list.
(Q.35) Khushboo wants to have the caption as Colors in her HTML table. The correct syntax is
(A) < title > Colors < /title >.
(B) < caption > Colors < /caption >.
(C) < caption Colors >.
(D) < title Caption >.
(Q.36) Every HTML document must include the tags
(A) < html > < /html > & < body > < /body >.
(B) < body > < /body > & at least one < p >.
(C) < html > < /html > & < head > < /head >.
(D) < title >< /title > & < p> < /p >.
(Q.37) Resham wants to display borders between rows only in the table. The correct HTML code line is
(A) < table border = 1 type = rows > (B) < table border = 1 compact = rows >
(C) < table border = 1 rules = rows > (D) < table border = 1 type = rows >
(Q.38) The tag that starts a table cell is

60

(A) < table >.

(B) < tc >.

(C) < td >.

(D) < tr >.

(Q.39) Asha is creating her first table in HTML. The correct table tags are
(A) < table >< tr > < tt >.
(B) < thead > < body > < tr >.
(C) < table > < tr > < td >.
(D) < table > < head > < tfoot >.
(Q.40) A list that lists the items with numbers is defined as
(A) < list >.
(B) < dl >.
(C) < ol >.

(D) < ul >.

(Q.41) The correct HTML for making a checkbox is


(A) < input type = "check" >.
(B) < checkbox >.(C) < check >.(D) < input type = "checkbox" />.
(Q.42) The correct HTML for making a text input field is
(A)<text type ="input"/>.(B)<input type ="text"/>.(C) <textfield>.(D) <input type="input"/>.
(Q.43) Abhinav wants the border to be 2 and the color of border to be green in color. The correct syntax is
(A) < table > border = 2 color = green< /table >.
(B) < bordercolor = green > < table border = 2 >.
(C) < table border = 2 bordercolor = green >.
(D) < tr border = 2 bordercolor = green >.
(Q.44) The frame attribute of < table > defines the
(A)color of the border(B)position of the border(C) thickness of the border(D)rows in a table
(Q.45)In a table, when the current element loses focus, the event handler is known as(1Mark)
(A) onKeyPress.
(B) onFocus.
(C) onClick.
(D) onBlur.
(Q.46) In a table, the event that occurs when a pointing device is double clicked is known as
(A) onBlur.
(B) onMouseMove.
(C) onDblClick.
(D) onDragStart.
(Q.47) The event that occurs when a keyboard key is depressed for an element that has focus is known as
(A) onKeyDown.
(B) onKeyPress.
(C) onKeyUp.
(D) onMouseDown.
(Q.48) When a pointing device moves within the boundary of an element, the event that occurs is known as
(A) onMouseUp.
(B) onKeyUp.
(C) onMouseMove.
(D) onMouseDown.
(Q.49) The two attributes of the < ol > tag are
(A) < li > < type >.(B) < start > < disc >.(C) < square > < ul >.(D) < start > < type >.
(Q.50) The start attribute of < ol > tag must be set to
(A) alphanumeric value.(B) numeric value.(C) special character.(D) letter.
(Q.51) The number of < thead > tag a table can have is
(A) 2.
(B) 1.
(C) 3.
(D) infinite.
(Q.52) The means to collect information/data from the site-visitor is known as
(A) attribute.
(B) tag.
(C) form.
(D) button.
(Q.53) The three types of buttons used in HTML are
(A) push button, reset button and submit button.
(B) submit button, click button and set button.
(C) reset button, submit button and release button.
(D) trigger button, reset button and release button.
(Q.54) Users interact with forms through
(A) servers.
(B) ISP.
(C) tables.

(D) controls.

(Q.55) To specify how the browser should encode the data before it sends it to the server, we use
(A) name.
(B) enctype attribute.
(C) target attribute.
(D) action attribute.
(Q.56) To send the form information in the HTTP environment, the value we use is
(A) GET.
(B) TARGET.
(C) POST.
(D) FORM.

61

(Q.57)The control that allows user to create a single-line input control is known as (1Mark)
(A) TEXTAREA.
(B) RADIOBOX.
(C) MENU.
(D) INPUT.
(Q.58) The character that is displayed on the password forms when the user inputs characters is
(A) + character.
(B) * an asterisk.
(C) - character.(D) A random character.
(Q.59)To add a border to table, the tag in which the BORDER attribute is specified is(1Mark)
(A) table.
(B) thead.
(C) tfoot.
(D) tborder.
(Q.60) To specify a summary of the content of a table, we use
(A) type attribute.
(B) dir attribute. (C) summary attribute. (D) lang attribute.
(Q.61) The border = 6 would set the border
(A) around the cell to 6 percent.
(B) around the cell to 6 pixels.
(C) inside the table to 6 percent.
(D) around the table to 6 pixels.
(Q.62) To specify the beginning of a tables row, we use
(A) tablerow.
(B) tr.
(C) td.
(D) th.
(Q.63) The attributes for < textarea > tag are
(A) name and size.
(B) cols and size.(C) name and type.(D) name, columns and rows.
(Q.64) The two valid attributes of radiobox are
(A) name and size.
(B) checked and name. (C) value and size.(D) checked and size.
(Q.65) < DT > stands for
(A) Data term.
(B) Description term.

(C) Definition term.

(D) Define term.

(Q.66) < DD > stands for


(A) Data definition.(B) Data description.(C) Data Description.(D) Definition description.
(Q.67) Compact attribute is used when
(A) definition terms are very short.
(C) we have to create a checkbox.

(B) we have to display the list items.


(D) we have to create a form.

(Q.68) If we want to give the amount of space between the cell border and the cell contents, we use
(A)compact attribute(B)cellspacing attribute(C)cellpadding attribute(D)center attribute.
(Q.69) Valign is used to
(A) align a cells contents.(B) align a table.(C) align the border.(D) align the table row.
(Q.70) List inside another list is known as
(A) hierarchical list.(B) sequential list.(C) multiple list.(D) nested list.
(Q.71) A two sided tag is
(A) < dt >.
(B) < li >.

(C) < dl >.

(D) < dd >.

(Q.72)The HTML codes that control the appearance of document contents are known as(1Mark)
(A) tags.
(B) slashes.
(C) properties. (D) attributes.
(Q.73) The two table dimension tags are
(A) < tl > and < tw >.(B) < tr > and < td >.(C) < td > and < rd >.(D) < tr > and < tl >.
(Q.74) The attribute of < option > is
(A) size.
(B) label.

(C) method.

(D) number.

(Q.75) To open a new form as per the URL specified in action attribute, we use
(A) FORM.
(B) GET.
(C) SET.
(D) POST.
(Q.76) The attribute used for checkboxes is:
(A) check.
(B) checkb.

(C) check button.

(D) checkbox.

62

(Q.77) The HTML code line : < td height = 25 > < /td >
(A) sets the height of the table to 25 pixels.(B) sets the height of the cell to 25 pixels.
(C) sets the width to 25 pixels.
(D) sets the length of the table to 25 pixels.
(Q.78) BGCOLOR attribute of < table >
(A) specifies a background color for the cell
(B) specifies a background image for the cell.
(C) specifies a background color for the table.
(D) specifies a background image for the table.
(Q.79) BACKGROUND attribute of < table >
(A)specifies a background color for the cell(B) specifies a background image for the table.
(C)specifies a background image for the cell(D) specifies a background image for the table.
(Q.80) The default alignment of < td > tag is
(A) right.
(B) justified.
(C) center.
(D) left.
(Q.81) What are the three basic types of lists in HTML?
(Q.82) Define definition list.
(Q.83) Differentiate between check box and radio button control?
(Q.84) Define unnumbered list.
(Q.85) Define numbered list.
(Q.86) Name the two attributes of < ol > tag.
(Q.87) Define the term Tables in HTML.
(Q.88) Write the HTML code line to display border 2 of a table.
(Q.89) What is used for the Frame attribute of < table >?
(Q.90) Name the attribute of < TABLE > tag which is used to deal with the inside border edges.
(Q.91) Name the attribute of < TABLE > tag that is used to specify the color of tables border.
(Q.92) Name the attribute to add a background color to a table.
(Q.93) Write the full form of < TH > tag.
(Q.94) Name the attribute of < DL > tag. Define the attribute.
(Q.95) Differentiate between cellspacing and cellpadding.
(Q.96) Explain align attribute of the < table > tag. What values can it have?
(Q.97) What is the full form of < DD > tag in Definition list? Define the terms:
a < THEAD >
b < TFOOT >
c. < TBODY >
(Q.98) Name the various control types in HTML.
(Q.99) Define checkbox. Write its syntax.
(Q.100) Explain Select box Control.
(Q.101) What are Radio Buttons? Name 4 attributes of radiobox.
(Q.102) Define forms in HTML.
(Q.103) Differentiate between < ul > and < ol > tags.
(Q.104) Explain the role of using type attribute in Unordered Lists?
(Q.105) Identify the error(s) in the following HTML code. Also write the correct code.
< OL > type = a start = d
(Q.106) Explain table. What are the basic commands for creating a table?
(Q.107) How can we set text area in a form?
(Q.108) Explain 'SELECT tag'?
(Q.109) Explain the processing of form data when the form is submitted.
(Q.110) What for rowspan and colspan are used? Give one example.
(Q.111) Explain summary attribute. Give an example.
XML - eXtensible Markup Language
(Q.1) Jason works in the technical department for a music store, which has branches all over the world. He is writing a code
for audio collection and he wants to include comments in his code. Comments are inserted to XML to
(A) design the file.(B) break document into sections.(C) have fun.(D) processing.
(Q.2) Raghu is a fresher, he has been asked to take an online test at CSC so as to test his knowledge. The full-form of XML
is
(A)eXperts Marked Language
(B) eXtended Markup Language.
(C) eXpanded Marked Language.
(D) eXtensible Markup Language.

63

(Q.3) Anjali wants to become an expert in markup languages. She has an expertise in HTML. Now, she wants to learn XML.
But before she starts with the coding, she desires to have a brief introduction about it. The ancestor of XML is
(A) SXML.
(B) SGML.
(C) SML.
(D) DHTML.
(Q.4) Neha has read in brief about SGML and now she is learning XML. She is not aware of the relation between the two
languages. XML is a
(A) subset of SGML.
(B) superset of SGML.(C) complexset of SGML.(D) minorset of SGML.
(Q.5) Siddharth wants to use a markup language that will help him displaying the output in the browser. The language that is
about displaying information is
(A) XML.
(B) SGML.
(C) HTML.
(D) SQL.
(Q.6) Ashi has created a code in XML for a book store. She wants to see how it appears in the browser. The step/steps
involved to view an XML document are
(A) XML >> browser.(B) XML >> style-sheet >> browser.(C) XML >> HTML >> browser.(D) browser.
(Q.7) Madhavs teacher has asked him to use XML to write a code for students who are participating in the Summer Camp
along with the tags of his choice. XML is
(A) designed to display data.
(B) designed to be self-descriptive.
(C) platform dependent.
(D) inextensible.
(Q.8) Shikha wants to use a markup language, i.e., HTML for writing a program on Computer Parts. But her friend suggested
her to write in XML as XML is
(A)platform independent(B)inextensible(C) designed to display data.(D) exactly same as HTML.
(Q.9) Nija is a renowned chef at Hotel Taj. She wants to write the code for preparing pakoras using a markup language,
wherein she can choose the tags according to her choice. We can create tags of our own choice in
(A) HTML.
(B) DHTML.
(C) SQL.
(D) XML.
(Q.10) Madhavi wants to use a markup language where the tags < parts >, < Parts > and < PARTS > are treated as different
cases. Tags are case-sensitive in
(A) HTML.
(B) XML.
(C) SQL.
(D) PLSQL.
(Q.11) Sanjana has coded in XML. But she does not know what all is required to view the output in web browser. To process
an XML document on web, we need
(A) only css or xsl.(B) only dtd.(C) only xml file.(D) css or xsl, dtd and xml file.
(Q.12) Ramesh is a trainee and has been asked to take an online test at Magna Infotech to test his knowledge. The other
name for XML file is
(A) XML document.
(B) XSL.
(C) grammar structure.
(D) SGML.
(Q.13) Priyanka wants to use a language which helps to write code for Rasam recipe. A language that is based on XML is
(A) SMGML.
(B) SSML.
(C) RecipeML.
(D) EDI.
(Q.14) Rashis brother is teaching her XML. She was told by him that every XML document has both logical and physical
structure. Logical structure tells about
(A) order of elements.
(B) names of the XML file.
(C) how XML file should be created.
(D) the extension of XML file.
(Q.15) Geeta has written a code for inventory house of her company. She was told that every XML document has a logical
as well as a physical structure. But she doesnt know what a physical structure actually contains. The physical structure
contains the
(A) order of elements. (B) css file.
(C) actual content.
(D) xsl file.
(Q.16) Abha has recently joined as a Programmer in Satyam. She has been asked to revise the basics of XML so that she
does not make any mistakes while writing the codes. First Generation Markup Language is
(A) InkML.
(B) RecipeML.
(C) SGML.
(D) EDI.
(Q.17) Jaya has to write a code for the employee details using XML. Before typing the various details of an employee, she
needs to write the XML declaration. An XML declaration begins with a
(A) <*xml*>.
(B) <$xml$>.
(C) < ? xml? >.
(D) <^xml^>.

64

(Q.18) Kamal has learnt XML with the help of video tutorials. Before he starts writing codes, he wants to test his knowledge.
So, he decides to solve a paper on XML which has objective questions. PI stands for
(A)program instruction(B)pseudo instruction(C)primary instruction(D)processing instruction.
(Q.19) Kajal has learnt XML with the help of online tutorials. Before she starts writing codes, she wants to test her
knowledge. So, she decides to solve a paper on XML which has objective questions. DTD stands for
(A) declaration type document.
(B) document type definition.
(C) definition type document.
(D) definition type declaration.
(Q.20)Ananyas sir has asked to write a code on the Student Details using XML. She was told to write a code with the tags of
her own choice but before that she needs to add a parent element also. The parent element of all other elements in data
instance is known as
(A) child element.
(B) document element.
(C) data element.
(D) entity.
(Q.21) Sudip is writing a poetry using XML document. He read in a tutorial that all XML documents must contain element.
XML documents must contain
(A)only one element(B)only two elements(C)at least two elements(D)at least one element.
(Q.22) XML documents must contain
(A)only one tag(B)a unique opening and closing tag(C)only one attribute(D)only one element.
(Q.23) Tags must be
(A) case-insensitive.

(B) attractive.

(C) nested properly.(D) created for fun.

(Q.24)One of the things that we require to link an HTML document with a style-sheet (1Mark)
(A)create html document (.html file)(B)create groups(C)create sgml file(D)create dhtml file.
(Q.25) A well-formed document is
(A)
< xml version="1.0">
< note >
< to >Tove </to >
< from >Jani < /from >
< heading >Reminder < /heading >
< body >Don't forget me this weekend!< /body>
< /note >
(C)
< ?xml version="1.0"? >
< note >
< to >Tove< /to >
< from >Jani< /from >
< heading >Reminder< /heading >
< /body >Don't forget me this weekend!< body>
< /note >
(Q.26) DTD begins with
(A) < DOCTYPE >
(B) < ? DOCTYPE >

(B)
< ?xml version="1.0"? >
< note >
< to >Tove < to >
< from >Jani < /from >
< heading >Reminder< /heading >
< body >Don't forget me this weekend!< /body>
< /note >
(D)
< ?xml version="1.0"? >
< note >
< to >Tove< /to >
< from >Jani< /from >
< heading >Reminder< /heading >
< body >Don't forget me this weekend!< /body>
< /note >
(C) < ! DOCTYPE >

(D) < ^DOCTYPE >

(Q.27) A language that defines other languages is known as


(A) duplicate-language. (B) meta-language.(C) documentation-language.(D) datalanguage.
(Q.28) The style-sheet presentation defines
(A) rule book of XML document.(B) the styles.(C) actual data.(D) syntactic of SML.
(Q.29) The grammar structure defines
(A) the styles.
(B) actual data.
(Q.30) A language that is based on XML is
(A) EDI.
(B) SDI.
(C) CGI.

(C) rule book of XML document.(D) tags.


(D) InkML.

(Q.31) The fundamental data element in an InkML file is called


(A) cell.
(B) trace.
(C) RecipeML. (D) ods.

65

(Q.32) Every XML document has


(A) only a logical structure.
(B) only a physical structure.
(C) both logical and meta structure.
(D) both logical structure and physical structure.
(Q.33) In terms of Physical Structure of an XML document, an entity is a/an
(A) processed unit.
(B) storage unit. (C) data unit. (D) physical unit.
(Q.34) Prolog is a
(A) declaration part in XML document.
(C) documentation part in XML file.

(B) definition part in XML document.


(D) preface or introduction to XML document.

(Q.35) The two main components of an XML-file are


(A) data instance and data definition.
(B) data declaration and data instance.
(C) prolog and data instance.
(D) prolog and data declaration.
(Q.36) One of the five components of a Prolog can be
(A) comments.
(B) tabs.
(C) shifts.

(D) definitions.

(Q.37) The three pseudo-attributes that an XML declaration has are


(A) vision, decoding and web-based.
(B) version, encoding and standalone.
(C) encoding, web-based and version.
(D) decoding, web-based and version.
(Q.38) XML-parsers ignore
(A) comments.(B) processing instructions.

(C) document type declaration.(D) white space.

(Q.39) A data instance is also known as


(A) body.
(B) head.

(C) root element.

(Q.40) Building blocks of data instance are


(A) cells.
(B) traces.

(C) elements.

(Q.41) One of the element type is


(A) definition element tag.
(C) declared empty element tag.

(D) document element.


(D) structures.

(B) declaration element tag.


(D) defined empty element tag.

(Q.42) Attributes are


(A) property settings of element.(B) root elements.(C) document elements.(D) data elements.
(Q.43) One of the categories of XML document is
(A) invalid document. (B) legal document.(C) correct document.(D) well-formed document.
(Q.44) Attribute values must always
(A) begin with a letter.(B) contain symbols.(C) be quoted.(D) contain only letters.
(Q.45) CSS stands for
(A)Centering Sheet style(B)Cascading Style Sheet(C) Cubical Style sheet.(D) Conical Style Sheet.
(Q.46) A style-sheet is made up of
(A) several style-sheets.(B) workbooks.

(C) worksheets. (D) style rules.

(Q.47) The extension for a css file is


(A) .xml.
(B) .css.

(C) .xsl.

(D) .ods.

(Q.48) XML file confirming to syntax or grammar rules is called


(A) valid document.(B) correct document.(C) well-formed document.(D) confirmed document.
(Q.49) A component that should be part of a web-browser for XML-support is
(A) XML file.
(B) XML processor.
(C) XML compiler.
(D) XML parser.
(Q.50) The two types of entities are
(A) physical and logical.
(B) internal and external.
(C) structured and unstructured. (D) automatic and manual.

66

(Q.51) A valid XML document


(A) has a stylesheet file.(B) has an html file.
(C)confirms to XML syntax rules and DTD specification(D)creates new rules for document.
(Q.52) ADML stands for
(A) Architecture Description Markup Language.(B) Acquired Descriptive Markup Language.
(C) Acquired Descriptive Marked Language.
(D) Architecture Descriptive Marked Language.
(Q.53) CML stands for
(A) Central Markup Language.
(C) Center Markup Language.

(B) Chemical Markup Language.


(D) Chemical Marked Language.

(Q.54) The correct syntax of the declaration which defines the XML version is
(A) < xml version=(B) < ?xml version=(C) < ?xml version=(D) < xml version = 1.0? >.
(Q.55) The correct way to insert comments is
(A) < -- This is comment -- >.
(B) < !- - This is a comment -- >.
(C) < - - ! This is a comment !-- >.
(D) < ? This is a comment ? >.
(Q.56) XSL stands for
(A) eXtra Style Language.
(C) eXtensible Style Listing.

(B) eXpandable Style Language.


(D) eXtensible Stylesheet Language.

(Q.57) XML is given Recommendation by


(A) W3C.
(B) Microsoft.

(C) Sun.

(Q.58) XML is
(A) expandable. (B) a stylesheet.

(D) IBM.

(C) free and extensible.(D) designed to display data.

(Q.59) GML stands for ___________ markup language


(A)Geometric (B)Geography (C)Global
(D)Google
(Q.60) A format for representing recipes on computer is known as
(A) InkML.
(B) CML.
(C) GML.
(Q.61) A sequence of contiguous ink points is known as
(A) vector.
(B) trace.
(C) element.

(D) RecipeML.

(D) scalar.

(Q.62) XML well-formed documents have


(A) two root elements. (B) four root elements. (C) one root element.(D) three elements.
(Q.63) Syntax is the
(A)book of markup languages(B)rules of RecipeML.(C) rules of CML.(D) grammar of a language.
(Q.64) To avoid repetition of statements in stylesheets, we should use
(A) tags.
(B) elements.
(C) grouping.

(D) traces.

(Q.65) To manipulate a selectors style, we use


(A) traces.
(B) elements.
(C) grouping.

(D) properties.

(Q.66) Software packages that check XML document as per the specified DTD and give feedback are known as
(A) XML Compilers.
(B) XML Parsers.(C) XML Processors.(D) XML Validators.
(Q.67) Software packages that are a part of bigger applications that provide XML support are known as
(A) XML compilers.
(B) XML parsers.
(C) XML processors.
(D) XML validators.
(Q.68) All attribute values must be enclosed in
(A) curly brackets.
(B) square brackets.
(C) dollar sign. (D) quotation marks.
(Q.69) XML data within HTML file is known as
(A) Data Island.
(B) Data Definition.

(C) Data description.(D) Data encapsulation.

67

(Q.70) We can define and store document structure in


(A) HTML.
(B) C++
(C) XML.
(Q.71) < Email > tag can be created in
(A) HTML.
(B) XML.
(C) XHTML.

(D) Fortran.

(Q.72) A software that validates XML document is known as


(A) XML Parser. (B) well-formed document.
(C) valid document.
(Q.73) Tidy is a
(A) XML parser. (B) DTD.

(C) XML Validator.

(Q.74) SAX stands for


(A) Standards Automatics for XML.
(C) Standard API of XML.

(D) EDI.
(D) XML Validator.

(D) HTML Parser.

(B) Simple API for XML.


(D) Sequential API for XML.

(Q.75) Selector is
(A) an element linked to a particular style.
(C) the name of the stylesheet.

(B) a property assigned to an element.


(D) the value that a property receives.

(Q.76) The standalone pseudo-attribute specifies


(A) character set.
(B) XML document requires duplicate entities.
(C) XML document requires external entities.
(D) XML document requires tags.
(Q.77) Default value for stand-alone attribute is
(A) 1.
(B) 2.
(C) No.
(D) yes.
(Q.78) Default character-set value is
(A) UPF-8.
(B) UTF-8.
(Q.79) WML stands for
(A) Wireless Markup Language.
(C) World Markup Language.

(C) UCF6.

(D) UTF-6.

(B) Wired Markup Language.


(D) Window Markup Language.

(Q.80) A language that is created using SGML specifications is called


(A) EDI.
(B) LaTex.
(C) SGML application.

(D) SGML complexity.

(Q.81) Explain the structure of XML file/document.


(Q.82) Name the first generic markup language.
(Q.83) Expand the term DTD and PI.
(Q.84) Name one language in which we can create tags of our own choice?
(Q.85) List the important rules for an XML document.
(Q.86) Write any six features of XML.
(Q.87) Create a tag set for employees which consists of an employee name, empid and designation etc. Write a sample
XML tag set for the above.
(Q.88) Differentiate between InkML and RecipeML.
(Q.89) What is an XML document system? Explain in detail.
(Q.90) List the rules laid down by W3C that all XML applications need to follow.(3Marks)
(Q.91) Create XML document using tags of your own choice to define a question Who is the author of Twilight , options as
a. Lewis Carroll, b. Stephenie Meyer , c. J.K. Rowling , d. Michael Alva and the answer as b.
(Q.92) Create XML markup to create a message sent on September 9, 2010 to Prakhar and Piyush by Prerna. The message
is Assignment completed successfully.
(Q.93) Differentiate between XML Validator and XML Parsers.
(Q.94) What are the three pseudo-attributes of XML declaration?
(Q.95) What are comments? Give one example.
(Q.96) What do you mean by meta-language?
(Q.97) What is the full form of XML?
(Q.98) Define the term entity?
(Q.99) What is a markup language?
(Q.100) What is the alternative name for root element?
(Q.101) What does the logical structure of XML document consists of?
(Q.102) Name the different types of entities.
(Q.103) Explain the term Data Instance.

68

(Q.104) Differentiate between well-formed documents and valid documents.


(Q.105) What is a style-sheet?
(Q.106) Give two differences between HTML and XML.
(Q.107) What are the two categories of XML document?
(Q.108) Explain the term Prolog.
(Q.109)Explain XML-document system. How is it different from XML document/XML-file.(2Marks)
(Q.110) Differentiate between
(i) parsed entity and unparsed entity.(ii) internal entity and external entity
(Q.111) Differentiate between elements and attributes?
MySQL Revision Tour
(Q.1)To add a new column tel_no of type integer in table Student, the syntax used is (1Mark)
(A) CREATE TABLE ADD ;
(B) UPDATE TABLE
ADD ;
(C) ARRANGE TABLE ADD ;
(D) ALTER TABLE Student ADD (tel_no integer);
(Q.2) Primary key constraint
(A) can have null value.
(B) is same as unique constraint.
(C) declares column as the primary key and cannot have null value.
(D) declares column as the primary key and can have null value.
(Q.3) Primary key constraint
(A) can have null value.
(B) is same as unique constraint.
(C) declares column as the primary key and cannot have null value.
(D) declares column as the primary key and can have null value.
(Q.4) To drop table EMPLOYEE, the command used is
(A) DELETE EMPLOYEE;(B) REMOVE EMPLOYEE;(C) TRUNCATE EMPLOYEE;(D) DROP TABLE EMPLOYEE;
(Q.5)The set of commands which allow us to perform task related to data definition is(1Mark)
(A) DDL.
(B) DML.
(C) TCL.
(D) SCC.
(Q.6) The two basic types of constraints are
(A) column and unique constraint.
(B) primary key and default constraint.
(C) check and foreign key constraint.
(D) column constraint and table constraint.
(Q.7) A language to operate upon RDBMS is
(A) SQL.
(B) .NET.

(C) Java.

(Q.8) In MySQL database, information is stored in


(A) tree format.
(B) network format.
(Q.9) DBMS stands for
(A) Database Management System.
(C) Database Manipulation Software.

(D) Visual Basic.

(C) graph format.

(D) table format.

(B) Digital Based Mapping System.


(D) Database Mapping System.

(Q.10) To delete a tuple in a table, the DML command used is


(A) DESTROY. (B) DAMAGE.
(C) DELETE.

(D) TRUNCATE.

(Q.11) The constraint that specifies that a column must not assume the null value is(1Mark)
(A)DEFAULT Constraint.(B) NOT NULL Constraint.(C) UNIQUE Constraint.(D) DESCRIBE Constraint.
(Q.12)The command used to retrieve information from one or more databases is known as(1Mark)
(A) FROM Clause.
(B) WHERE Clause.
(C) SELECT.
(D) IS NULL.
(Q.13) DDL stands for
(A) Data Department Language.
(C) Data Development Language.

(B) Data Definition Language.


(D) Data Document Language.

(Q.14) To add an integrity constraint, the command used is


(A) ADD TABLE.
(B) INCLUDE TABLE. (C) ALTER TABLE.

(D) CREATE TABLE.

69

(Q.15) The argument types of CHAR() is


(A) null.
(B) integer.
(C) string.

(D) number.

(Q.16) The function that converts a string into a lowercase is


(A) UCASE(str.
(B) lCASE(str).
(C) LCASE(str). (D) LOWERCASE(str).
(Q.17) The data model in which data is represented in the form of trees is called
(A)relational data model(B)hierarchical data model(C)network data model(D) database model.
(Q.18) The database model in which data is represented in the form of table is
(A)relational datamodel(B)hierarchical datamodel(C)internal data model(D)external data model
(Q.19) The function that returns a substring starting from the specified position is(1Mark)
(A) MID.
(B) LEFT.
(C) RIGHT.
(D) MIDDLE.
(Q.20) A special type of predefined command set that performs some operation and returns a single value is
(A) parameter.
(B) argument.
(C) function.
(D) command.
(Q.21) The function that returns the specified rightmost number of characters is
(A) RIGHT.
(B) RIGHTMOST.
(C) RIGNUM.

(D) RIGCHAR.

(Q.22) The result of the query SELECT SIGN(199); is


(A) 1.
(B) -1.
(C) 0.
(D) 199.
(Q.23) The result of the query SELECT ROUND(16.789, 1) is
(A) 16.7.
(B) 16.9.
(C) 17.

(D) 16.8.

(Q.24)The function that returns a number rounded off as per the given instructions is(1Mark)
(A) ROUND.
(B) TRUNCATE.
(C) MOD.
(D) MID.
(Q.25) A set of attributes that can uniquely identify tuples within the relation is known as
(A) alternate key.
(B) primary key. (C) secondary key.
(D) candidate key.
(Q.26) The data model in which the data is represented by pointers is called
(A)relational datamodel(B)hierarchical datamodel(C)network datamodel(D)conceptual datamodel
(Q.27) The rule which is used to specify the value in the certain column must satisfy a Boolean express is
(A)foreign key constraint(B)check constraint.(C) table constraint.(D) unique key constraint.
(Q.28) The number of attributes in a relation is known as
(A) degree.
(B) rank.
(C) key.

(D) cardinality.

(Q.29) The advantage of hierarchical data model is


(A)reduction of data dependency.(B) addition of node.(C) complexity.(D) machine performance.
(Q.30)An attribute in a table which is key attribute in some other table is known as(1Mark)
(A) primary key.
(B) composite key.
(C) alternate key.(D) foreign key.
(Q.31)A single function that performs the combined action of LTRIM() and RTRIM() is (1Mark)
(A) LRTRIM().
(B) RTTRIM().
(C) TRIM().
(D) LLRR().
(Q.32)A condition or check that is applied to a column or set of columns in table is(1Mark)
(A) restriction.
(B) constraint.
(C) condition.
(D) view.
(Q.33)The function of MySQL which can manipulate the strings in many ways is known as(1Mark)
(A) mathematical functions(B) numeric functions(C) string functions(D) date/time functions.
(Q.34) The syntax for assigning names to a constraint is
(A) CONSTRAINT < name-of-constraint > < definition-of-constraint >
(B) CON < name-of-constraint > < definition-of-constraint >
(C) CONS < name-of-constraint > < definition-of-constraint >
(D) CONSN < name-of-constraint > < definition-of-constraint >

70

(Q.35) The constraint that ensures that all values in a column satisfy certain conditions is
(A) unique constraint.(B) primary key constraint.(C) default constraint(D) check constraint.
(Q.36) The function that returns a numeric expression rounded to an integer is
(A) ROUND.
(B) TRUNCATE.
(C) MOD.

(D) MID.

(Q.37) To remove all the tuples from an employee table the SQL query is
(A)DELETE employee;(B)DELETE ALL FROM employee;(C)DELETE* FROM employee;(D)DELETE FROM employee;
(Q.38) The result of query SQRT(625); is
(A) 13.
(B) 25.
(C) 125.

(D) 55.

(Q.39) The result of the query SELECT SIGN(199); is


(A) 1.
(B) -1.
(C) 0.
(D) 199.
(Q.40) The subdivision of SQL which is used to put values in tables is
(A) DDL.
(B) DDL AND DML.
(C) DML.

(D) DNL.

(Q.41) The SQL keyword, which is used in ascending or descending order, i.e., sorting the result set, is
(A) ORDER BY.
(B) HAVING.
(C) GROUP BY.
(D) SORT.
(Q.42) To redefine a column (datatype, size, default value), the command used is
(A) ADD TABLE.
(B) INCLUDE TABLE.
(C) ALTER TABLE.
(Q.43) The function SUBSTRING is equivalent to
(A) SUBSTR.
(B) SUBSTRG.
(C) SBSTR.

(D) CREATE TABLE.

(D) SUBSTRN.

(Q.44) Existing data in tables can be changed with


(A) EXIST COMMAND.(B) UPDATE COMMAND.(C) REMOVE COMMAND.(D) DESTROY COMMAND.
(Q.45) The function that removes the leading space of the given string is
(A) TRIM.
(B) LTRIM.
(C) RTRIM.
(D) LEAD.
(Q.46) The numeric function among the following is
(A) Mod().
(B) Year().
(C) Concat().

(D) Length().

(Q.47) The string that extracts a substring from a given string is


(A) SUBSTR.
(B) SUBSTRG.
(C) SBSTR.

(D) SUBSTRN.

(Q.48) The function that converts the given string into the upper case is
(A) UCASE(str).
(B) LCASE(str). (C) ULCASE(str).
(D) LUCASE(str).
(Q.49) Referential integrity is ensured through
(A)unique constraint.(B) foreign key constraint.(C) default constraint.(D) check constraint.
(Q.50)When a constraint is to be applied on a group of columns of the table is called(1Mark)
(A) column constraint.(B) table constraint.(C) row constraint.(D) database constraint.
(Q.51) The string function among the following is
(A) Round().
(B) Now().
(C) Sysdate().

(D) Instr().

(Q.52) Nulls are inserted in the table by typing


(A)NULL with quotes(B)NULL without quotes(C)NULL with semi-colon(D)NULL without semi-colon.
(Q.53) The difference between unique constraint and primary key constraint is that
(A) unique key allows null values but primary key does not allow null values.
(B) unique key allows duplicate values but primary key cannot allow duplicate values
(C) unique key allows foreign key values but primary key cannot allow these values.
(D) unique key allows character values but primary key cannot allow these values.
(Q.54) The SQL keyword, which is used in ascending or descending order, i.e., sorting the result set is

71

(A) ORDER BY.

(B) HAVING.

(C) GROUP BY.

(D) SORT.

(Q.55) ALTER TABLE command


(A) add columns in a table only.
(B) modify the column size only.
(C) delete some columns in a table only.
(D) can either add columns, modify the sizes or delete columns in a table.
(Q.56) The means to identify type of data and associated operations for handling it is known as
(A) database.
(B) data select. (C) data type. (D) data genre.
(Q.57) The argument type of DATE() is
(A) none.
(B) date or datetime.

(C) time.

(D) string.

(Q.58) SQL stands for


(A) Standard Question Limited. (B) Structured Quinn Language.
(C) Structured Query Language. (D) Standard Question Language.
(Q.59) A constraint is
(A) a command in the SQL *plus.
(B) the condition or check on table only .
(C) the condition or check on columns of a table only.
(D) the condition or check on one or more columns of a table.
(Q.60) Data Manipulation means
(A) retrieval, insertion, deletion and modification.
(B) retrieval, insertion, deletion and manifestation.
(C) retrieval, valuation, deletion and modification.
(D) ramification, insertion, deletion and modification.
(Q.61) The command used to alter the definition of already created tables is
(A) ALTER TABLE.
(B) CHANGE TABLE. (C) ASSOCIATE TABLE.

(D) TRUNC TABLE.

(Q.62)If I want to select all columns from a table named CLASS, then correct method
(A) SELECT * FROM CLASS.
(B) SELECT (ALL) FROM CLASS.
(C) SELECT CLASS.
(D) SELECT *. FROM CLASS.
(Q.63) NOT NULL constraint ensures that
(A) a column can never have empty values.
(C) a column can have empty value.

(B) a column cannot have value 0.


(D) a column can have value 0.

(Q.64) The text which is not executed is known as


(A) literal.
(B) null.
(C) comment.

(D) variable.

(Q.65) A default value can be specified for a column using the constraint named as
(A)default constraint(B)unique constraint(C) check constraint.(D) foreign key constraint.
(Q.66) The function UCASE is synonym of
(A) LOWER.
(B) UPPER.

(C) CHAR.

(D) CONCAT.

(Q.67) DROP table command in sql lets you drop a table


(A) if it has rows.
(B) if it is not an empty table.
(C) it may or may not be an empty table. (D) only if it is an empty table.
(Q.68) The syntax for adding column in a table is
(A) CREATE TABLE < table name > ADD < column name >< DATA TYPE >< SIZE >;
(B) UPDATE TABLE < table name > ADD < column name >< DATA TYPE >< SIZE >;
(C) ARRANGE TABLE < table name > ADD < column name >< DATA TYPE >< SIZE >;
(D) ALTER TABLE < table name > ADD < column name >< DATA TYPE >< SIZE >;
(Q.69) Columns with no value is known as
(A) literal.
(B) null.
(C) comment.
(Q.70) Text that is not executed is known as
(A) literal.
(B) null. (C) comment. (D) data type.

(D) data type.

72

(Q.71) The syntax of CREATE TABLE command is


(A) CREATE TABLE < table-name > (< datatype >[(size)],< data type > < size >);
(B) Create < tablename > < datatype > <size>,< column name>< datatype > <size>;
(C) CREATE TABLE < tablename > (< column name1 ,<datatype>[<size>]),<column name2 >, datatype>[<size>]..).
(D) CREATE < table-name > (< datatype>[(size)],< data type > < size >);
(Q.72) To insert a tuple in a table, the DML command used is
(A) INSERT IN.
(B) INSERT ON.
(C) INSERT INTO.

(D) INSERT ONTO.

(Q.73) In the "Person_Record" table if we want to change "Hansen" to "Nilsen" in the "LastName" column then the SQL
query will be
(A) UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen'.
(B) MODIFY Persons SET LastName='Hansen' INTO LastName='Nilsen.
(C) UPDATE Persons SET LastName='Hansen' INTO LastName='Nilsen'.
(D) MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen'.
(Q.74) To insert values in the "students" table with fields i.e. name, roll no, sex, grade, salary, the SQL query will be
(A) INSERT INTO students VALUES (2,aditi, f,e1, 10,000);
(B) INSERT INTO students VALUES (2,aditi, e1,f, 10,000);
(C) INSERT INTO students VALUES (aditi, 20,f,e1, 10,000);
(D) INSERT INTO (name, roll no, sex, grade, salary) VALUES (aditi, 20,f,e1, 10,000);
(Q.75) To enforce a foreign key constraint at column level, the syntax to be followed is
(A) Columnname datatype (size) REFERENCES tablename
[(columnname)] [ ON DELETE CASCADE] [ ON UPDATE CASCADE]
(B) Columnname datatype (size) REFERENCES tablename
[(columnname)] [ ON DELETE CASCADE] [ ON DELETE CASCADE]
(C) Columnname datatype (size) REFERENCES tablename
[(columnname)] [ ON DELETE CASCADE] [ ON MODIFY CASCADE]
(D) Columnname datatype (size) REFERENCES tablename
[(columnname)] [ ON DELETE CASCADE] [ ON TRANSLATE CASCADE]
(Q.76) One complete unit of work is known as
(A) Program.
(B) Method.

(C) Function.

(Q.77) The function that returns mn is


(A) MOD.
(B) POW.

(C) MID.

(D) Transaction.
(D) SQRT.

(Q.78) When a constraint is to be applied on a group of columns of the table, it is called as


(A) Row constraint.
(B) Column constraint. (C) Group constraint.(D) Table constraint.
(Q.79) The functions that accepet numeric values and after performing required operation, return numeric values are known
as
(A)Date and Time functions(B)Character functions.(C) Numeric functions.(D) String functions.
(Q.80) The commands used to manage transactions are known as
(A) DDL.
(B) DML.
(C) DQL.

(D) TCL.

(Q.81) Which keyword eliminates the redundant data from the query result and which retains duplicate output rows in a
query result?
(Q.82) Give the examples of numeric functions.
(Q.83) What is the procedure to start MySQL?
(Q.84) What is referential integrity? What are the conditions to set referential integrity?
(Q.85) What is the result of expression MOD (46, 3)?
(Q.86) How many types of functions are there in SQL and what are they?
(Q.87) What is a literal? Give some examples.
(Q.88) What is a data type? Name some data types available in MySQL.
(Q.89) Explain hierarchical data model.
(Q.90) What purpose is served by MOD function? Give its argument type and return value. Write a query to find out the
remainder of 999 divided by 29.
(Q.91) Are the functions DAYNAME() and DAYOFWEEK() same?

73

(Q.92) What is the difference between truncate and round function?


(Q.93) Write some features of SQL?
(Q.94) Write SQL command to create table HOSPITAL with following specification:
Field Name
Data Type
Constraints
PNo
Int (4)
Primary key
Name
Varchar (20)
Age
Int (2)
Department
Varchar (15)
AdmDate
Date
Charges
Double (7,2)
Sex
Char (1)
(Q.95) What do you mean by string functions? Name a few of them.
(Q.96) What is a function?
(Q.97) What is the result of expression ROUND(6786.37, -1)?
(Q.98)Add a PRIMARY KEY data constraint on the column rollno belonging to tableSTUD(1Mark)
(Q.99) Write a command to display the system date.
(Q.100) In an Employee table, for record with ID = 10, Update record with Last_Name, User_ID and Salary.
(Q.101) Give the examples of Character Functions.
(Q.102) What do you mean by date and time functions? Name some of them.
(Q.103) Write the resulting output of the following:
(a) SELECT LOWER (CONGRATULATIONS);
(b) SELECT MOD (36, 3);
(c) SELECT SQRT(15.6 * 24.3);
(d) SELECT LENGTH (Saint John School);
(Q.104) Write a query to display the position of occurrence of string pen in string STUPENDOUS.
(Q.105) What is the importance of unique constraint? How can it be applied on a database query?
(Q.106) Identify the number and types of constraints in the table Ord
CREATE TABLE Ord
(o_id int NOT NULL,
OrderNo int NOT NULL,
P_Id int,
PRIMARY KEY (O_Id),
FOREIGN KEY (P_Id) References Persons(p_id))
(Q.107) Create a table called Customer with the columns specified below:
CName
VARCHAR(20)
SName
VARCHAR(20)
Qty
Int(3)
Price
Double(6,2)
City
VARCHAR
(Q.108) What is the difference between NOW() and SYSDATE()?
(Q.109) What is the difference between UNIQUE and PRIMARY key constraint?
(Q.110) Define the following:
1. Primary key
2. Foreign key 3. Candidate key
4. Alternate key
Database Transactions
(Q.1) MySQL offers a set of commands for transaction control purpose called
(A) TCC.
(B) TDL.
(C) TCL.
(D) TML.
(Q.2) Point until which all changes have been saved permanently is
(A) ROLLBACK.
(B) SAVEPOINT.
(C) COMMIT.

(D) AUTOCOMMIT.

(Q.3) To disable autocommit statement we set the value of it as


(A) 0.
(B) 1.
(C) \0.
(D) none.
(Q.4) The @@ in autocommit statement while checking its status denotes
(A) Client variable.
(B) Peer variable.
(C) Server variable.(D) Connection variable.
(Q.5) To check the status of autocommit statement, we execute the statement
(A) select @@autocommit;(B) set autocommit;(C) get autocommit;(D) select autocommit;

74

(Q.6) When a user issues a DDL (data definition language) statement into a transaction, the Commit that would occur is
(A) implicit.
(B) explicit.
(C) default.
(D) autocommit.
(Q.7) In case of failure, if transaction cannot be successfully completed, then any data changes made by the transaction are
(A) undone.
(B) deleted.
(C) done.
(D) saved.
(Q.8) The concurrent execution of transaction gives motivation to
(10 Marks)
(A) Multiprogramming System.(B) Multi-tasking System.(C) Serialization.(D) Parallel System.
(Q.9) All operation into a transaction gets executed within the statements called
(A) begin and end.(B) start and finish.(C) begin and last.(D) front and end.
(Q.10) The ACID property stands for
(A) The Atomic Composition of Information Databases.
(B) Testing the chemical properties of storage media in TPSs against sulphuric acid.
(C) The Atomicity, Concurrency, Isolation and Dataframe.
(D) The Atomicity, Consistency, Isolation and Durability.
(Q.11) The guarantee that once the user has been notified of success, the transaction will persist through all conditions,
including system failure is
(A) Isolation.
(B) Transaction issue. (C) Durability. (D) Database property.
(Q.12) Statement that terminates the current transaction and makes all changes under the transaction persistent is
(A) ROLLBACK.
(B) SAVEPOINT.
(C) COMMIT. (D) ABORT.
(Q.13) Property that indicates that actions performed by a transaction will be hidden from outside the transaction until the
transaction terminates is
(A) Consistency.
(B) Abort.
(C) Auto commit.
(D) Isolation.
(Q.14) The keyword that is optional with Commit and Rollback statement is
(A) Code.
(B) Work.
(C) Syntax.
(D) Begin.
(Q.15) An organized collection of logically related data is known as
(A) data.
(B) database.
(C) information. (D) metadata.
(Q.16) The logical unit of work that succeeds or fail in its entirely is called
(A) DBMS.
(B) Database.
(C) Transaction.
(D) MySql.
(Q.17) Transaction ends
(A) only when it is Committed.
(C) when it is Committed or Rollback.

(B) only when it is Rollback.


(D) when a database triggers.

(Q.18) An atomic transaction cannot be


(A) subdivided.
(B) summarizes.

(C) duplicated. (D) connected.

(Q.19) Access to database is accomplished by two operations, i.e.,


(A) Read (X) and Write(Y).
(B) Read(X) and Write(X).
(C) Begin(X) and Commit(Y).
(D) Commit(X) and Rollback(X).
(Q.20) Transaction is one unit of work is expressed in
(A) atomicity.
(B) consistency.
(C) durability. (D) isolation.
(Q.21) After a transaction completes successfully, the changes it made to the database persists is known as
(A) isolation.
(B) consistency. (C) durability. (D) atomicity.
(Q.22) Many DBMSs implement durability by writing transactions into a
(A) transaction logs.
(B) catalogs.
(C) commands. (D) control statements.
(Q.23) Transaction state after successful completion is always
(A) saved.
(B) stored.
(C) committed.

(D) active.

(Q.24) A program that is executed to change the database state is

75

(A) Code.

(B) Transaction.

(C) Process.

(D) Table.

(Q.25) A real-world event either happens or does not happen is


(A) atomicity
(B) consistency.
(C) integrity.
(D) durability.
(Q.26) When the transaction is committed, the database must be in the state called
(A) inconsistent.
(B) consistent.
(C) durable.
(D) aborted.
(Q.27) To ensure integrity of data, the database system must maintain
(A) atomicity.
(B) swapping.
(C) scheduling.

(D) concurrency.

(Q.28) The way through which multiple transaction executes is


(A) concurrently.
(B) redundantly.
(C) randomly.
(Q.29) To divide the transaction into different segments we use
(A) savepoint.
(B) save.
(C) autocommit.

(D) occasionally.
(D) rollback.

(Q.30) A Transaction maintains ACID property to have only


(A) activeness of the data.(B) integrity of the data.(C) storing the data(D) using the data.
(Q.31) A transaction access data using the operations
(A) read and store.(B) read and retrieve.(C) read and access.(D) read and write.
(Q.32) The Transaction which does not complete its execution successfully is called
(A) aborted.
(B) out transaction.
(C) exited.
(D) enhanced.
(Q.33) The committed or aborted transaction could be called
(A) terminated.
(B) partially terminated. (C) saved.

(D) stored.

(Q.34) INSERT, UPDATE and DELETE are the commands of


(A) DML (Data Manipulation Language). (B) DDL (Data Definition Language).
(C) DCL (Data Control Language).
(D) TCL (Transaction Control Language).
(Q.35)If we make the changes permanent into a transaction, statement follows is (1Mark)
(A) Rollback.
(B) Consistent.
(C) Stored.
(D) Commit.
(Q.36) To undo changes that we made to a transaction follows the statement called
(A) Commit.
(B) Rollback.
(C) Read.
(D) Write.
(Q.37) All-Or-None Concept is related with
(A) Atomicity. (B) Isolation.
(C) Consistency.

(D) Durability.

(Q.38) Transaction control statements are currently supported by


(A) My SQL.
(B) MS Access.
(C) Java Swing.

(D) PPT.

(Q.39) To discard the changes made to the database we use the statement called
(A) Rollback.
(B) Commit.
(C) Savepoint.
(D) AutoCommit.
(Q.40) To cancel a statement, a user issues
(A) Tab + A.
(B) Ctrl + Z.

(C) Alt + C.

(D) Shift + C.

(Q.41) You can execute Rollback statement to go back to the


(A) commit.
(B) savepoint.
(C) autocommit.
(Q.42) In MySQL command that is default enabled is
(A) Autocommit.(B) Savepoint.
(C) Commit.

(D) default.
(D) Rollback.

(Q.43) To end the transaction implicitly, we may issue


(A) DDL statement.
(B) DML Statement.
(C) DCL statement.

(D) TCL Statement.

(Q.44) To save the data permanently at a specific point or segment, we can issue

76

(A) Save option.

(B) SavePoint.

(C) Status.

(D) LevelPoint.

(Q.45) The database software views a transaction as a


(A) logical sequence of read or write operations.
(B) theoretical sequence of read or write operations.
(C) practical sequence of read or write operations.
(D) analytical sequence of read or write operations.
(Q.46) 44 We say that a transaction is complete only if it has entered
(A) Active state.
(B) Partially committed state.(C) Aborted state.(D) Committed state.
(Q.47) A transaction enters the failed state after the system determines that the transaction can
(A)proceed.(B) no longer proceed.(C) temporarily reside in main memory.(D) partially commit.
(Q.48) A logical unit of work that must succeed or fail in its entirety is known as (1Mark)
(A) Termination.
(B) TCP/IP.
(C) Transaction.
(D) TCP.
(Q.49) The command used in manipulating the database is known as
(A) DML.
(B) DDL.
(C) DCL.

(D) TCL.

(Q.50) Transactions are required to have


(A) ACID properties.(B) BASE properties.(C) CASCADE properties.(D)CONCURRENCY properties.
(Q.51) What do you mean by transaction?
(Q.52) How are multiple transactions executed?
(Q.53) What is the user views of the transaction.
(Q.54) Name the operations used in system view of the transaction.
(Q.55) How does implicit start of a transaction takes place?
(Q.56) What do you mean by TCL commands?
(Q.57) Write the syntax of BEGIN transaction.
(Q.58) Name the command to end the transaction.
(Q.59) What does Isolation property implies?
(Q.60) What is a savepoint?
(Q.61) Write syntax of COMMIT statement.
(Q.62) Give an example of COMMIT statement.
(Q.63) What is COMMIT and ROLLBACK statement in SQL.
(Q.64) Explain Read and Write operations of the transactions?
(Q.65) Explain ROLLBACK statement with an example.
(Q.66) Write sequence of read and write transactions to transfer Rs.500 from account X to account Y?
(Q.67) How can we process two transactions at any point of time?
(Q.68) What are advantages of serial execution?
(Q.69) Why do we use ROLLBACK statements?
(Q.70) Name the TCL commands supported by SQL.
(Q.71) What do you understand by transaction ROLLBACK?
(Q.72) What do you understand by COMMITing a transaction?
(Q.73) Explain atomicity property of transaction?
(Q.74) Transaction will either be COMMITed or be ROLLBACKed. Explain?
(Q.75) Write a transaction using SAVEPOINT?
(Q.76) Give an example to establish a SAVEPOINT and later undo the effects of all commands executed after it was
established.
(Q.77) Explain ROLLBACK command.
(Q.78) What happens to the current transaction if a START TRANSACTION is executed? (3Marks)
(Q.79) What is a transaction? What are the five states of the transaction?
(Q.80) What do you understand by SET autocommit command?
(Q.81) List the ACID properties. Explain the usefulness of each.
More on SQL - Grouping Records and Table Joins
(Q.1) Based on the following table,
The output of the query Select COUNT(*),COUNT(SALARY) FROM EMPLOYEE; is
(A) 6,7.
(B) 6,6.
(C) 7,6.
(D) 7,7.
(Q.2) The syntax for Group By function is

77

(A) SELECT rows FROM table name [GROUP column name];


(B) SELECT column name 1, column name 2,.. [GROUP BY column name];
(C) SELECT column name 1, column name 2,.. FROM table name [GROUP BY];
(D) SELECT column name 1, column name 2,.. FROM table name
[GROUP BY column name];
(Q.3) Christ Hospital has a database record of all the patients admitted in the departments as per their sufferings. The
Hospital table contains all the necessary information. Based on the following table, the query to list names of all patients with
their date of admission in ascending order is
(A) SELECT Name FROM HOSPITAL ORDER BY Dtofadm;
(B) SELECT Name FROM HOSPITAL HAVING Dtofadm;
(C) SELECT Name FROM HOSPITAL AND Dtofadm;
(D) SELECT Name FROM HOSPITAL GROUP Dtofadm;
(Q.4) Christ Hospital has a database record of all the patients admitted in the departments as per their sufferings. The
Hospital table contains all the necessary information. Based on the following table, the query to display Patients Name,
Charges, Age of only female patients is
(A) SELECT Name, FROM HOSPITAL WHERE Sex = F;
(B) SELECT Charges, Age WHERE Sex = F;
(C) SELECT HOSPITAL FROM Name, Charges, Age WHERE Sex = F;
(D) SELECT Name, Charges, Age FROM HOSPITAL WHERE Sex = F;
(Q.5) Christ Hospital has a database record of all the patients admitted in the departments as per their sufferings. The
Hospital table contains all the necessary information. Based on the following table, the query to select all information of
patients of cardiology department is
(A) SELECT * HOSPITAL WHERE Name = Cardiology;
(B) FROM HOSPITAL WHERE Dept = Cardiology;
(C) SELECT * FROM HOSPITAL WHERE Dept = Cardiology;
(D) WHERE Dept = Cardiology;
(Q.6) Apoorv is SQL programmer with Equip Solutions. He has to write the query to find the sum of the salary for the
employees of his organization. The Employee table is as follows:
The correct query is
(A) SELECT SUM(SALARY) FROM EMPLOYEE;
(B) SELECT (SALARY), EMPLOYEE ;
(C) SELECT (SAL);EMP;
(D) SELECT EMPLOYEE (SALARY);
(Q.7) Vinay has to write the query to find the sum of the salaries grouped by dept from the following Employee table.
The correct way to write the query is
(A) SELECT SALARY GROUP BY DEPT_NAME;
(B) SELECT SUM(SALARY) GROUP BY DEPT_NAME;
(C) SELECT SUM(SALARY) FROM EMPLOYEE, DEPT_NAME;
(D) SELECT SUM(SALARY) FROM EMPLOYEE GROUP BY DEPT_NAME;
(Q.8) The command to calculate the total salary for teachers of grade A1 is
(A) COUNT (salary) FROM teacher and grade = A1;
(B) SELECT SUM (salary) FROM teacher where grade = A1;
(C) SELECT (salary) FROM teacher or grade = A1;
(D) count FROM teacher where grade = A1;
(Q.9) The clause that combines all the records that have identical values in a particular field or a group of fields is known as
(A) having.
(B) group by.
(C) joint.
(D) nested.
(Q.10) To search a condition, we use
(A) from clause.
(B) where clause.

(C) having clause.

(D) join clause.

(Q.11) Neha has written the query (SELECT SUM(SALARY) FROM EMPLOYEE;) to calculate the total sum of the salary
from the employee table. The Employee table is as follows:
The total value of the sum is
(A) 376000.
(B) 357000.
(C) 375000.
(D) 367000.
(Q.12) Based on the given table, Mahima has to write the query to find Sum of salary for each particular department. She
also needs to include the DEPT_NAME in the SELECT.
The correct query is
(A) SELECT DEPT_NAME, FROM EMPLOYEE GROUP BY DEPT_NAME;

78

(B) SELECT DEPT_NAME, SUM(SALARY) FROM EMPLOYEE GROUP BY DEPT_NAME;


(C) SELECT SUM(SALARY) GROUP BY DEPT_NAME;
(D) SELECT DEPT_NAME, SUM(SALARY) FROM EMPLOYEE;
(Q.13) Aditi has been asked to COUNT the number of records in Employee table. The table is as follows: The correct count
is
(A) 6.
(B) 4.
(C) 5.
(D) 7.
(Q.14) The correct query to Count number of Department names in Employee table is
(A) COUNT (DEPT) Dept Name Count FROM EMPLOYEE
(B) SELECT COUNT (DEPT_NAME) Dept Name Count
(C) SELECT COUNT (DEPT_NAME) Dept Name Count FROM EMPLOYEE
(D) SELECT (DEPT_NAME) Dept Name Count FROM EMPLOYEE
(Q.15)Based on following table, the avg of all the salaries in the organization is(1Mark)
(A) 62500.
(B) 63500.
(C) 53571.
(D) 54571.
(Q.16) Based on the following table, write the query to find the minimum salary within a particular department
(A) SELECT (SALARY),NAME FROM EMPLOYEE GROUP BY NAME;
(B) SELECT MIN(SALARY),DEPT_NAME FROM EMPLOYEE GROUP BY DEPT_NAME;
(C) SELECT MIN, NAME FROM EMPLOYEE GROUP BY NAME;
(D) SELECT MIN(SALARY),NAME FROM EMP;
(Q.17) Based on the following table, write the query to find the maximum salary within a particular department
(A) SELECT MAX(SALARY),DEPT_NAME FROM EMPLOYEE GROUP BY DEPT_NAME;
(B) SELECT MAX(SALARY),NAME FROM EMP;
(C) SELECT MAX, NAME FROM EMPLOYEE GROUP BY NAME;
(D) SELECT (SALARY),NAME FROM EMPLOYEE GROUP BY NAME;
(Q.18) The join which is used to return all rows from the first table whether there are matches in second table or not is
(A) natural join.
(B) cross join. (C) right join. (D) left join.
(Q.19) The join that returns all rows from the second table whether there are matches in the first table or not is known as
(A) right join.
(B) left join.
(C) natural join.(D) cross join.
(Q.20) Christ Hospital has a database record of all the patients admitted in the departments as per their sufferings. The
Hospital table contains all the necessary information. Based on the following table, the query to list the names of female
patients who are in ENT department is
(A) SELECT Name WHERE Dept = ENT AND Sex = F;
(B) SELECT Name FROM HOSPITAL WHERE Dept = ENT AND Sex = F;
(C) SELECT Name FROM HOSPITAL WHERE Charges = ENT AND Sex = F;
(D) SELECT FROM HOSPITAL WHERE Dept = ENT AND Sex = F;
(Q.21) Christ Hospital has a database record of all the patients admitted in the departments as per their sufferings. The
Hospital table contains all the necessary information. Based on the following table, the query to count number of patients with
Age < 30 is
(A) SELECT Age < 30;
(B) SELECT COUNT (*) FROM HOSPITAL AND Age < 30;
(C) SELECT COUNT (*) FROM HOSPITAL WHERE Age < 30;
(D) SELECT COUNT WHERE Age < 30;
(Q.22) The other name for group function is
(A) combined function. (B) joint function.

(C) aggregate function.(D) count function.

(Q.23) The option that considers only distinct values is called


(A) distinct.
(B) exclusive.
(C) distinguish.

(D) different.

(Q.24) The option that causes a group function to considers all values is called
(A) distinct.
(B) similar.
(C) equal.
(D) all.
(Q.25) Function that computes average is
(A) count.
(B) sum.

(C) avg.

(D) having.

79

(Q.26) Function that counts number of rows in a particular column is


(A) sum.
(B) count.
(C) avg.
(D) join.
(Q.27) Function that returns maximum value from a given column or expression is
(A) min.
(B) max.
(C) maxa.
(D) mina.
(Q.28) Function that returns minimum value from a given column or expression is
(A) min.
(B) max.
(C) mina.
(D) maxa.
(Q.29) Function that returns sum of values in a given column or expression is
(A) count.
(B) max.
(C) avg.
(D) sum.
(Q.30) MIN is a / an
(A) join function.

(B) aggregate function. (C) complex function.(D) count function.

(Q.31) Other name for single row functions is


(A) vector functions.(B) line functions.(C) scalar functions.(D) aggregate functions.
(Q.32) The other name for group function is
(A) multiple row function.(B) joint function.(C) scalar function.(D) vector function.
(Q.33) Functions that work with data of multiple rows at a time are known as
(A) scalar function.(B) group function.(C) vector function.(D) multi-function.
(Q.34) The difference between scalar function and multiple function is in the
(A) number of columns.(B) number of functions.(C) number of characters.(D) number of rows.
(Q.35) Group within group is known as
(A) group by. (B) joint grouping.
(C) nested grouping.

(D) combined grouping.

(Q.36) A field or expression that has different values in the rows belonging to the group is known as
(A) non-group field.(B) joint field.(C) group field.
(D) non-joint field.
(Q.37) Clause used to place condition on group, is known as
(A) where.
(B) and.
(C) having.

(D) or.

(Q.38) Query that combines rows from two or more tables is known as
(A) combine.
(B) having.
(C) where.

(D) join.

(Q.39) If n1 is the first table and n2 is the second table, then unrestricted join will return
(A) n1-n2.
(B) n1 X n2.
(C) n1+n2.
(D) n1/n2.
(Q.40) If two joining tables have fields with same name, then we should use
(A) only one name.(B) qualified field names.(C) delete the entire field.(D) where clause.
(Q.41) To compare columns for equality, we use
(A) where.
(B) having.
(C) equi-join.

(D) non-equi join.

(Q.42) Clause that lists all tables is known as


(A) where.
(B) from.

(D) join.

(C) having.

(Q.43) Query that specifies some relationship other than equality between columns is known as
(A) non-equi-join.
(B) equi-join.
(C) from.
(D) where.
(Q.44) Equi-join minus one of the two identical columns is known as
(A) equi-join.
(B) cross join.
(C) natural join. (D) non-equi-join.
(Q.45) Cartesian product of two tables is known as
(A) cross join.
(B) natural join.
(C) equi-join.

(D) non-equi join.

(Q.46) The name of join that can be used so as not to specify a Join-condition is

80

(A) cross join.

(B) equi-join.

(C) natural join. (D) non-equi-join.

(Q.47) A temporary label given along with the table name in From clause is known as
(A) having.
(B) count.
(C) join.
(D) table alias.
(Q.48) To join 5 tables, the minimum no. of join conditions that we require is
(A) 5.
(B) 4.
(C) 3.
(D) 2.
(Q.49) Cartesian product is denoted by
(A) $.
(B) ^.
(C) #.

(D) X.

(Q.50) A clause that requires a complete join- condition is


(A) on.
(B) having.
(C) using.

(D) natural join.

(Q.51) What is the other name for group function?


(Q.52) Name the two types of SQL functions.
(Q.53) Name the clause that combines all the records that have identical values in a particular field or group of fields?
(Q.54) Define Nested Group.
(Q.55) What is the function of HAVING clause?
(Q.56) Define Join.
(Q.57) What is an alternative name for unrestricted join?
(Q.58) Define natural join.
(Q.59) What do you understand by table alias' ?
(Q.60) Write the query to display Sum, Maximum and Minimum salary of the employees grouped by department number.
(Q.61) In what situations are qualified names useful?
(Q.62) Write a query to display the number of employees with the same job.
(Q.63) Differentiate between a WHERE clause and HAVING clause.
(Q.64) Differentiate between Scalar functions and Group functions.
(Q.65) What is Cartesian product? Give one example.
(Q.66) Explain equi-join and non-equi-join?
(Q.67) Explain natural-join and cross join.
(Q.68) Differentiate between ON and USING join-clauses.
(Q.69) What is the importance of GROUP BY clause in a SQL query?
(Q.70) Write a query to display the difference of maximum and minimum salary of each department having maximum salary
> 5000.
(Q.71) Write a query that records the orders for each day and places the results in descending order of the date.
(Q.72) Differentiate between Left join and Right join. Give syntax for each.
(Q.73) Given following tables: Employee and SalTable, write the query to find out the salary taken by all GOEL, i.e., all those
names who have their last name as GOEL.
(Q.74) Consider the following Sports table and write the query to
a. display names of students who have grade C in either Game 1 or Game 2 or both.
b. display number of students getting grade A in Cricket.
(Q.75) Consider the following Sports table and write the query to display names of the students who have participated in the
same game for both Game1 and Game2.
(Q.76) There are 4 families residing in the Villa Towers. Write the query:
a. To select all information of family members whose occupation is "service"
b. To list the name of family where female members are more than 3
(Q.77) There are 4 families residing in the Villa Towers. Write the query:
a. To list the names of family with income in ascending order
b. To display familys name, male members and occupation of business family.
(Q.78) Write a query:
a. that counts the number of salesperson registering orders for each day. (Note: if a salesperson has more than one order on
a given day, he or she should be counted only once)
b. that finds the maximum rating in each city from customers table .
(Q.79) Consider the following "lab" table and write the following queries:
a. To select ItemName purchased after 2007-10-31
b. To list ItemName, which are within the Warranty period till present date(ie current date)
c. To list ItemName in ascending order of date of purchase where quantity is more than 3
d. To display ItemName, CostPerItem and Quantity whose Warranty is over
(Q.80) Write the function for the following along with their syntax
a. AVG.
b. COUNT.
c. MAX.
d. MIN.
(Q.81) Consider a Based on the Directory Table that consists of (fname, phone, address) fields. write the query

81

a. To select all information from DIRECTORY of Rohini area.


b. To display the data for Arpit, Rakesh and Rohit.
c. To create a view called Dir with following fields Fname and Phone, d. To delete Rows where address is Rohini
Tables and Integrity Constraints
(Q.1) A foreign key cannot refer to
(A) a table
(B) a group of columns (C) a column

(D) a random group of columns

(Q.2) The syntax to check the storage engine of MySQL is


(A) SHOW TABLE < TABLE-NAME >; (B) SHOW CREATE TABLE < TABLE-NAME >;
(C) SHOW < TABLE-NAME >;
(D) SHOW CREATE TABLE ;
(Q.3) The NULL value is not permitted or allowed on
(A) primary key.
(B) column value.
(C) a field.

(D) a tuple.

(Q.4) If a constraint affects multiple rows & columns, then it is known as


(A) Table constraint.
(B) Column constraint. (C) Table constraint(D) Database constraint.
(Q.5) Syntax to enable the foreign key is
(A) FOREIGN_KEY_CHECKS = 0;
(C) SET PRIMARY_KEY_CHECKS = 1;

(B) SET = 0;
(D) SET FOREIGN _KEY_CHECKS = 1;

(Q.6) The SQL statement which is used to insert a new data in the table is
(A) ADD RECORD.
(B) ADD NEW.
(C) INSERT.
(D) INSERT NEW.
(Q.7) The SQL statement which is used to delete all the data from the table is
(A) DELETE.
(B) DROP.
(C) TRUNCATE.

(D) REMOVE.

(Q.8) If I want to change "Pooja" into "Rohilla" in the "LastName" column of the "Persons" table then the SQL query will be
(A) UPDATE Persons SET LastName='Rohilla' WHERE LastName='Pooja'.
(B) MODIFY Persons SET LastName='Pooja' INTO LastName='Rohilla.
(C) UPDATE Persons SET LastName='Pooja' INTO LastName='Rohilla'.
(D) MODIFY Persons SET LastName='Rohilla' WHERE LastName='Pooja'.
(Q.9) UNIQUE constraint ensures that
(A) two rows can have same value in the specified column.
(B) no two rows can have same value in the specified column.
(C) data delicacy can be there.
(D) data inconsistency may /may not be there.
(Q.10) A constraint that affects only a single column is known as
(A) table constraint.
(B) column constraint. (C) row constraint.(D) database constraint.
(Q.11) To insert a tuple in a table, the DML command that we can use is
(A) INSERT IN. (B) INSERT ON.
(C) INSERT INTO.
(D) INSERT ONTO.
(Q.12) The "ALL" clause is similar to
(A) %.
(B) *.
(C) $.

(D) @.

(Q.13) To add a new column "tel_no" of type integer in the table "Student", the syntax used is
(A) CREATE TABLE < table name > ADD < column name >< DATA TYPE >< SIZE >;
(B) UPDATE TABLE < table name > ADD < column name >< DATA TYPE >< SIZE >;
(C) ARRANGE TABLE < table name > ADD < column name >< DATA TYPE >< SIZE >;
(D) ALTER TABLE Student ADD (tel_no integer);
(Q.14) To drop an "EMPLOYEE" table, the command we can use is
(A) DELETE EMPLOYEE;(B) REMOVE EMPLOYEE;(C) TRUNCATE EMPLOYEE;(D) DROP TABLE EMPLOYEE;
(Q.15) The feature of a RDBMS that helps to define and restrict behaviours of columns in a database is known as
(A) constraints.
(B) constants. (C) variables. (D) identifiers.
(Q.16) The syntax to select a column named "Marks" from a table named "Student", having duplicate rows is

82

(A) SELECT Marks FROM Student;


(C) SELECT Marks. Student;

(B) SELECT DISTINCT Marks from Student;


(D) SELECT Student Marks;

(Q.17) The major problem with SQL is that


(A) it cannot support object-orientation.
(B) the same query can be written in many ways, each with vastly different execution plans.
(C) the SQL syntax is too difficult for non-computer professionals to use.
(D) the SQL creates excessive locks within the Oracle database.
(Q.18) The primary key can only be
(A) dropped.
(B) updated.

(C) altered.

(D) deleted.

(Q.19) If I want to change "Roll_No" 400 only for those items that have "Roll_No" 300, then the SQL statement will be
(A) MODIFY items SET Roll No=400 Where Roll No = 300;
(B) UPDATE items SET Roll No=400 Where Roll No = 300;
(C) UPDATE items Roll No=400 in place of Roll No = 300;
(D) UPDATE items Roll No=400 HAVING Roll No = 300;
(Q.20) Nulls are inserted in the table by typing
(A)NULL with quotes(B)NULL without quotes(C)NULL with semi-colon(D) NULL without semi-colon
(Q.21) The columns in the foreign key must match those of the corresponding columns in the primary key of the referenced
table in terms of the
(A) variable.
(B) datatype.
(C) constraint. (D) table.
(Q.22) Whenever two tables are related by a common column, then the related column in the parent table should be defined
as
(A) Primary Key.
(B) Composite Key.
(C) Foreign Key.
(D) Duplicate Key.
(Q.23)The data in the database must be consistent & correct. A DBMS ensures this by
(A) Double Constraints. (B) Some Constraints.(C) Integrity Constraints(D) Data Constraints.
(Q.24) In MySQL, the Foreign Key is only used on
(A) InnoDB.
(B) MyISAM.
(C) DBA.
(D) InoDB.
(Q.25) One of the property of a valid database is
(A) constant.
(B) verified.
(C) consistent. (D) proper.
(Q.26) The syntax to change the engine while the time of creating a table is
(A) Create table < table name >()ENGINE .
(B) Create table ()ENGINE = InnoDB.
(C) Create table <table name>() InnoDB.(D) Create table < table name >()ENGINE = InnoDB.
(Q.27) A foreign key can only be defined in
(A) parent table.(B) child table. (C) parent table as well as in child table.
(D) only in parent but not in child.
(Q.28) A table to which a foreign key points is called a
(A) Referenced table. (B) Child table. (C) Refer table. (D) Main table.
(Q.29) The syntax to disable the foreign key is
(A) FOREIGN_KEY_CHECKS = 0;
(B) SET KEY_CHECKS = 0;
(C) SET FOREIGN_KEY_CHECKS = 0; (D) SET PRIMARY_KEY_CHECKS = 0;
(Q.30) Referential integrity is ensured through
(A) Composite Key.
(B) Primary Key.

(C) Foreign Key.

(D) Duplicate Key.

(Q.31) "NOT NULL" implements


(A) Domain Integrity.(B) Entity Integrity.(C) Referential Integrity.(D) Table Integrity.
(Q.32) The function that converts the given string into the upper case is
(A) UCASE(str).
(B) LCASE(str). (C) ULCASE(str).
(D) LUCASE(str).
(Q.33) The important feature of relational databases of SQL is

83

(A) independence of table relationship.


(C) powerful GUI front-end.

(B) high speed of SQL.


(D) easy to install and use.

(Q.34) The command for creating a database is


(A) USE DATABASE. (B) CREATE DATABASE.

(C) MAKE DATABASE. (D) OPEN DATABASE.

(Q.35) To check the list of existing databases, the command is


(A) VIEW DATABASES; (B) SHOW DATABASES;
(C) CHECK DATABASES;

(D) SEE DATABASES;

(Q.36) Command to delete a database is


(A) REMOVE DATABASE.
(B) DROP DATABASE. (C) DELETE DATABASE.(D) CONTROL DATABASE.
(Q.37) In MySQL, we can create and define integrity constraint through
(A) Delete Table.
(B) Formation. (C) Create Table.
(D) Query.
(Q.38) Valid data means that the data is
(A) incorrect.
(B) invalid and correct.
(C) consistent and incorrect.
(D) consistence and correct.
(Q.39) If individual data items do not contradict one another, then it means that the data is
(A) incorrect.
(B) invalid.
(C) consistent. (D) correct.
(Q.40)If the data satisfies all the relevant constraints, then it means that data is
(A) correct.
(B) invalid.
(C) consistent. (D) incorrect.
(Q.41) If the database violates any of the constraint, MySQL will produce an
(A) idle message.
(B) error.
(C) ambiguity.
(D) unique output.
(Q.42) To add an integrity constraint or a column to a table, the command used is
(A) ADD TABLE.
(B) INCLUDE TABLE.
(C) ALTER TABLE.
(D) CREATE TABLE.
(Q.43) Syntax for creating a table is
(A) Create table < table name > (..);
(C) Create table1 < table name > (..);

(B) Create column < table name >;


(D) Create table2 < table name >;

(Q.44) Syntax for creating a table with column constraint is


(A) Create table < table name > (< column name >< datatype > < column constraint >);
(B) Create column < table name >(< coulmn name datatype> < column constraint >);
(C) Create table1 < table name > (column name< column constraint >);
(D) Create table2 < table name >( column constraint );
(Q.45) Syntax for adding column in an existing table is
(A) CREATE TABLE < table name > ADD < column name >< DATA TYPE >< SIZE >;
(B) UPDATE TABLE < table name > ADD < column name >< DATA TYPE >< SIZE >;
(C) ARRANGE TABLE < table name > ADD < column name >< DATA TYPE >< SIZE >;
(D) ALTER TABLE < table name > ADD < column name >< DATA TYPE >< SIZE >;
(Q.46) Keyword create table is used to
(A) create a double table.
(B) create a inbuilt table.
(C) insert a table in previous table.
(D) create a new table.
(Q.47)Command used to make changes in the column (datatype, size, default value) is (1Mark)
(A) ADD TABLE.
(B) INCLUDE TABLE. (C) ALTER TABLE.
(D) CREATE TABLE.
(Q.48) To check the names of all the tables in the database, the command used is
(A) CHECK TABLES; (B) SHOW TABLES;
(C) GET TABLES;
(D) SELECT TABLES;
(Q.49) A default value can be specified for a column using the constraint named as
(A) default constraint. (B) unique constraint. (C) check constraint.(D) foreign key constraint.
(Q.50) Command used to view a table structure is
(A) DEFINE < table name >;
(B) Describe < table name >;

84

(C) Des < table name >;

(D) DESC < table name >;

(Q.51) If you want to ensure that the column should not store any NULL value, then you will use
(A) Not constraint.(B) Number constraint.(C) Not Null constraint.(D) Null constraint.
(Q.52) Syntax to select all columns from a table ABC is
(A) SELECT * FROM ABC.
(B) SELECT (ALL) FROM ABC.
(C) SELECT ABC.
(D) SELECT *. FROM ABC.
(Q.53) The clause that is used to specify conditions based on a list is
(A) LIKE Clause.
(B) BETWEEN Clause.
(C) IN Clause. (D) ALL Clause.
(Q.54) The clause that is used to eliminate the duplicate rows in the output is
(A) IS NULL clause.
(B) DISTINCT clause. (C) ALL clause. (D) BETWEEN clause.
(Q.55) Command used to retrieve information from one or more databases is
(A) FROM Clause.
(B) WHERE Clause.
(C) SELECT.
(D) IS NULL.
(Q.56) The clause that is used to specify conditions based on a list is
(A) LIKE Clause.
(B) BETWEEN Clause.
(C) IN Clause. (D) ALL Clause.
(Q.57) Syntax to drop the primary key of table T1 is
(A) ALTER TABLE T1 DROP PRIMARY KEY;
(B) ALTER T1 DROP PRIMARY KEY;
(C) ALTER TABLE T1 DROP
(D) TABLE T DROP PRIMARY KEY
(Q.58) MySQL will reject foreign key constraint if its database engine is
(A) INNODB.
(B) not INNODB.
(C) ENNODB.
(Q.59) Referencing action can be done by
(A) CREATE.
(B) CASCADE.

(C) COMMIT.

(Q.60) The statement which is used to update data in the database is


(A) SAVE AS.
(B) UPDATE.
(C) SAVE.

(D) not ENNODB.


(D) ALTER.
(D) MODIFY.

(Q.61) A constraint is
(A) a command in the SQL *plus.
(B) the conditions or checks on table only .
(C) the conditions or checks on columns of a table only.
(D) a condition on one or more columns of a table.
(Q.62) A primary key constraints, declares
(A) that primary key can have null value.
(B) to be same as unique constraint.
(C) column as the primary key and cannot have null value.
(D) column as the primary key and can have null value.
(Q.63) We can define column level constraint & table level constraint by
(A) column command.(B) create table command.(C) row command.(D) database command.
(Q.64) The inline constraint is also known as
(A) row command.(B) create table constraint.(C) column constraint.(D) Database command.
(Q.65) The out-of-line constraint is also known as
(A) row command.(B) create table constraint.(C) column constraint.(D) table constraint.
(Q.66) Nulls are inserted in the table by typing
(A) NULL with quotes.
(B) NULL without quotes.
(C) NULL with semi-colon.
(D) NULL without semi-colon.
(Q.67) The SQL keyword which is used in ascending or descending order, i.e., sorting the result set is
(A) ORDER BY.
(B) HAVING.
(C) GROUP BY.(D) SORT.
(Q.68) DROP table command in SQL lets you drop a table

85

(A) if it has rows.


(C) if it may or may not be an empty table.

(B) if it is not an empty table.


(D) only if it is an empty table.

(Q.69) ALTER TABLE command


(A) adds columns in a table only.
(B) modifies the column size only.
(C) deletes some columns in a table only.
(D) can either add columns, modify the sizes or delete columns in a table.
(Q.70) NOT NULL implements
(A) Entity Integrity.
(B) Foreign Key.(C) Domain Integrity.(D) Referential Integrity.
(Q.71) Existing data in tables can be changed with
(A) EXIST COMMAND.(B) UPDATE COMMAND.(C) REMOVE COMMAND.(D) DESTROY COMMAND.
(Q.72) The difference between unique constraint and primary key constraint is that the
(A) unique key allows null values but primary key cannot allow null values.
(B) unique key allows duplicate values but primary key cannot allow duplicate values
(C) unique key allows foreign key values but primary key cannot allow these values.
(D) unique key allows character values but primary key cannot allow these values.
(Q.73) The number of default value that a column can have is
(A) one.
(B) two.
(C) three.
(D) four.
(Q.74) Referential integrity is ensured through
(A) CREATE TABLE.
(B) FOREIGN KEY.

(C) SINGLE KEY.

(D) COMPOSITE KEY.

(Q.75) Referential integrity is ensured through


(A) unique constraint(B) foreign key constraint(C) default constraint(D) check constraint.
(Q.76) Composite key can only be defined on
(A) table constraint.(B) column constraint.(C) database constraint.(D) row constraint
(Q.77)If you want to the add/delete any existing column in the table, then you use(1Mark)
(A) Drop List. (B) Add/Delete Command.(C) Cancel Command.(D) Alter command.
(Q.78)The constraint that limits values and can be inserted into a column of a table (1Mark)
(A) unique constraint.(B) primary key constraint.(C) default constraint.(D)check constraint.
(Q.79)If you want to the add/delete any existing column in the table, then you use(1Mark)
(A) Drop List. (B) Add/Delete Command.
(C) Cancel Command. (D) Alter command.
(Q.80) To make sure that you have not declared the columns in the child table as NOT NULL, we must specify
(A) NO ACTION action. (B) RESTRICT action. (C) NO UPDATE action (D) SET NULL action.
(Q.81) A null value is not allowed in
(A) foreign key. (B) primary key.

(C) composite key.

(D) domain key.

(Q.82) NULL values are not permitted in columns that forms part of a
(A) Table.
(B) Database.
(C) Primary Key.
(Q.83) The data type should be same of foreign key and
(A) domain key. (B) primary key.
(C) composite key.
(Q.84)
(Q.85)
(Q.86)
(Q.87)
(Q.88)
(Q.89)
(Q.90)
(Q.91)
(Q.92)

(D) Composite Key.

(D) secondary key.

Define Integrity constraints.


What does NOT NULL constraint ensures?
What do you understand by foreign key?
Write a syntax to create a table.
Name the two ways of defining constraints with CREATE TABLE command?
What are the two ways of defining a Primary key?
What is the significance of NOT NULL constraint?
What is the reason of defining a foreign keys?
Write syntax for deleting a column from the table.

86

(Q.93) Write a SQL query to drop marks column of student table.


(Q.94) Add a PRIMARY KEY data constraint on the column rollno belonging to the table named "STUD".
(Q.95) Write a statement to add two new columns (Age and Category) to "Persons" table. The category must not allow null
values.
(Q.96) What does "SET NULL" action states in MySQL?
(Q.97) How can we create a table in MySQL? Give its syntax.
(Q.98) Write SQL command to create table HOSPITAL with following specification:
Field Name
Data Type
Constraints
PNo
Int (4)
Primary key
Name
Varchar (20)
Age
Int (2)
Department
Varchar (15)
AdmDate
Date
Charges
Double (7,2)
Sex
Char (1)
(Q.99) Name few rules that get applied when a foreign key is specified.
(Q.100) What is referential integrity? What are the conditions to set referential integrity?
(Q.101) Can PRIMARY KEY and FOREIGN KEY be disabled?
(Q.102) What does CASCADE action do?
(Q.103) How can constraints and their columns be viewed?
(Q.104) How can we drop tables from database?
(Q.105) What is a constraint? How many types of constraints are there?
(Q.106) Create a table college as per the details given below. Add a primary key constraint on column name collegeID.
College(CollegeID, CollegeName, Street, City, State, pin, phone)
(Q.107) What is the importance of unique constraint? How can it be applied on a database query?
(Q.108) Identify the number and types of constraints in the table Ord
CREATE TABLE Ord
( O_Id int NOT NULL,
OrderNo int NOT NULL,
P_Id int,
PRIMARY KEY (O_Id),
FOREIGN KEY (P_Id) References Persons(p_id))
(Q.109) What is the use of "NO ACTION" attribute in SQL?
(Q.110) Create a table called Customer with the specified columns below:
CName
VARCHAR(20)
SName
VARCHAR(20)
Qty
Int(3)
Price
Double(6,2)
City
VARCHAR
(Q.111) What is a foreign key? How can you define a foreign key in a table?
(Q.112) What is the difference between UNIQUE and PRIMARY key constraint?
(Q.113) Explain the use of ALTER Table statement?
IT Applications
(Q.1) G2B stands for
(A) Government to Broker.
(B) Government to Business.
(C) Government to Bureaucracy.(D) Government to Buyers.
(Q.2) C2G stands for
(A) Citizenship to Government.
(C) Citizenship to Governship.

(B) Citizen to Galaxy.


(D) Citizen to Government.

(Q.3) Xerte is
(A) Open source e-learning developer tool.
(C) Open Source authoring application.

(B) Open Source LAN.


(D) Open Source Course Management System.

(Q.4) Any form of transaction that uses an electronic medium to facilitate the transaction is known as
(A) E-commerce.
(B) E-business.
(C) E-company.
(D) E-trade.
(Q.5) It is the process of converting data model into relational schema is known as

87

(A) Normalization.

(B) Data Modeling.(C) Relational Modeling.(D) Physical Refining.

(Q.6) One component that nearly all GUI programs will have is
(A) window.
(B) mouse.
(C) monitor.

(D) button.

(Q.7) The one of the technique of data modelling is


(A) object modelling.
(B) logic structure.(C) structure modelling.(D) E-R modelling.
(Q.8) The type of E-Business in which manufacturers or retailers sell directly to customers is known as
(A) electronic tendering.(B) bartering online.(C) membership.(D) online direct marketing.
(Q.9) The key through which we can uniquely identify the records is
(A) Primary key.
(B) Composite key.
(C) Super key. (D) Sub key.
(Q.10) One of Indias leading financial services e-business companies is
(A) Sharehouse.
(B) Sharebrand.
(C) Sharewala. (D) Sharekhan.
(Q.11) The site which provides airline reservation is
(A) www.indiangoose.com(B) www.yatra.com(C) www.birb.com(D) www.lakport.com
(Q.12) LIC stands for
(A) Life Immigration Corporation.
(C) Large Income Corporation.

(B) Line in Control.


(D) Life Insurance Corporation.

(Q.13) The two type of entities


(A) irregular and weak entities.
(C) dependent and weak entities.

(B) powerful and powerless entities.


(D) dependent and independent entities.

(Q.14) IRCTC stands for


(A) Indian Railways Catering and Tourism Corporation.
(B) Indian Reservation Catering and Tourism Corporation.
(C) Indian Railways Catering and Tourist Corporation.
(D) Indian Railways Corporation and Tourism Corporation.
(Q.15) The most popular online shopping mall is
(A) cBay.in
(B) dBay.in
(C) eBay.in
(Q.16) A primary key
(A) is the first column of a relation.
(C) can hold only numeric values.

(D) fBay.in

(B) can have only unique values.


(D) stores NULL for unknown values.

(Q.17) The flow of data is controlled by


(A) object.
(B) database object.

(C) links.

(Q.18) Visibility of system status is the feature of


(A) UI.
(B) database object.
(C) GUI.

(D) back-end.
(D) server.

(Q.19) An application seen in terms of two ends is referred as


(A)software and hardware(B)objects and links(C)front end & back end.(D)classes and objects.
(Q.20) The site which started as an online bookstore is
(A) yatra.com
(B) amazon.com
(C) eBay.in

(D) sharekhan.

(Q.21) Yatra.com provides


(A) bus reservation.(B) railway reservation.(C) airline reservation.(D) ship reservation.
(Q.22) Amazon.com was started as an on-line
(A) bank.
(B) anti-virus.

(C) bookstore.

(Q.23) The primary key of the Employee table is


(A) Employee_id.
(B) Fname.
(C) Phone_number.

(D) shopping mall.


(D) Super_id.

88

(Q.24) A collection of related data is referred as


(A) data.
(B) information.
(C) database.

(D) records.

(Q.25) The w3schools.com is a free


(A) technology portal. (B) e-learning portal.(C) society portal.(D) e-mail portal.
(Q.26) The one of the advantage of e-learning is
(A) up-front investment.
(B) inappropriate content.
(C) self paced learning.
(D) reduced social and cultural interaction.
(Q.27) Swing components that do not rely on native GUI are referred to as
(A) lightweight components(B) heavyweight components(C)GUI components(D)non-GUI components.
(Q.28) Containers that have provide gneral-purpose utility is known as
(A) Basic Controls.
(B) General Purpose Containers.
(C) Interactive Displays
(D) Special Purpose Containers.
(Q.29) Containers that have some predefined specific role are
(A) Basic Controls.
(B) General Purpose Containers.
(C) Special Purpose Containers.(D) Interactive Displays.
(Q.30) VLE stands for
(A) Virtual Live Environment.
(C) Virtual Look Enterprise.
(Q.31) CMS stands for
(A) Course Management System.
(C) Corporation Management System.
(Q.32) LMS stands for
(A) Learning Management Semantics.
(C) Large Management Semantics.

(B) Virtual Large Environment.


(D) Virtual Learning Environment.
(B) Connector Main System.
(D) Character Marine System.
(B) Learning Management System.
(D) Learning Marinated System.

(Q.33) An Open Source Course Management System, also known as a Learning Management System is referred as
(A) Noodle.
(B) Soodle.
(C) Moodle.
(D) Doodle.
(Q.34) An object that waits for and responds to an event from a GUI component is a
(A) event listener.
(B) GUI listener.(C) collection class.
(D) click listener.
(Q.35) G2C stands for
(A)Government to Control(B)Government to Client(C)Government to Citizen(D)Government toCourt
(Q.36) G2G stands for
(A)Government to Government(B)Government to Galaxy(C)Galaxy to Government(D)Galaxy to Galaxy
(Q.37) Clicking a JRadioButton generates
(A) ActionEvent.(B) ComponentEvent. (C) ContainerEvent.

(D) Window Event.

(Q.38) A set of same type of entities is known as


(A) an entity type.
(B) an object. (C) an attribute type.

(D) table.

(Q.39)A component that enables the user to choose single value or multiple values is
(A) text field.
(B) combo box. (C) list.
(D) label.
(Q.40) Pressing a button generates a/an
(A) ItemEvent.
(B) MouseEvent.

(C) MouseMotionEvent. (D) ContainerEvent

(Q.41)The opportunity to do shopping via Internet by just sitting at home is provided(1Mark)


(A) viral marketing.(B) electronic tendering.(C) group purchasing.(D) online auctions.
(Q.42) The design methodology is to start with higher-level entity set is known as
(A) object and class.(B) organization.(C) generalization.(D) specialization.

89

(Q.43) The result of union of several lower level entity sets to produce higher-level entity set is
(A) generalization.(B) specialization.(C) organization.(D) merging.
(Q.44) the end that uses icons
(A) Back End. (B) Middle End. (C) Front End. (D) Up-Front End.
(Q.45) In GUI a control is known as
(A) Object.
(B) component.

(C) gadget.

(D) widget.

(Q.46) Pure physical organizations are referred to as


(A) brick-and-mortar organizations.
(B) virtual organizations.
(C) click-and-mortar organizations.
(D) pure- play organizations.
(Q.47) The component that can hold other components is
(A) Component.
(B) Container.
(C) Object.
(Q.48) NeGP stands for
(A) National E-Goverance Plan.
(C) Numerous email Graphic Plans.

(D) SwingUtilities.

(B) Neologism electronic Game Programme.


(D) News Gateway Plan.

(Q.49) A container that can hold a group of components so that they can be displayed on a frame is called
(A) label.
(B) panel.
(C) frame.
(D) desktopPane.
(Q.50) B2G stands for
(A) Business to Government.
(C) Broker to Government.

(B) Business to Governship.


(D) Broker to Governship.

(Q.51) A top-level window with a title and a border is a


(A) frame.
(B) label.
(C) push button.

(D) exit button.

(Q.52) DBMS stands for


(A) Database Management System.
(C) Database Model System.

(B) Database Modification System.


(D) Database Management Security.

(Q.53) eBay.in is Indias most popular


(A) online shopping mall.
(C) banking companies.

(B) e-learning companies.


(D) financial services companies.

(Q.54) DELL is an e-business company that


(A) offers Quick Collect services.
(B) sells PCs, laptops and notebooks online.
(C) offers investment solutions.
(D) provides banking services.
(Q.55) It connects several entities and is known as
(A) an entity type.
(B) relationship. (C) an attribute type.

(D) table.

(Q.56) An attribute that can be further divided is known as


(A)single-valued attribute(B)composite attribute(C)multi-valued attribute(D)super attribute.
(Q.57) An attribute which can hold only more than one value is known as
(A) multi-valued.
(B) single-valued.
(C) one valued. (D) double-valued.
(Q.58) The entity shown in double lined rectangle box is
(A) dependent entity.
(B) independent entity. (C) irregular entity.

(D) regular entity.

(Q.59) The organizations that conduct some e-commerce activities, yet their primary business is done in the physical world
is known as
(A) brick-and-mortar organizations.
(B) virtual organizations.
(C) click-and-mortar organizations.
(D) pure- play organizations.
(Q.60) The type of E-Business in which businesses conduct online tendering and requesting quotes from suppliers is known
as
(A) online direct marketing.
(B) electronic tendering.

90

(C) bartering online.

(D) membership.

(Q.61) An entity is represented by a set of


(A) variables.
(B) records.

(C) columns.

(D) attributes.

(Q.62) An abstraction of a design that allows us to focus on the "big picture" of design without going into details is known as
(A)online design(B)e-commerce(C) conceptual modelling(D)electronic information collection.
(Q.63) The type of E-Business in which the people spread their brands on the Net by word-of-mouth is known as
(A)viral marketing.(B) electronic tendering.(C) find-the-best-price.(D) name-your-own-price.
(Q.64) The type of E-Business in which demands of small buyers are aggregated to get a large volume is known as
(A) viral marketing.(B) electronic tendering.(C) group purchasing.(D) name-your-own-price.
(Q.65) The type of E-Business in which products and services are self configured by using the internet is known as
(A) viral marketing.(B) product customization.(C) group purchasing.(D) online auctions.
(Q.66) The type of E-Business which creates virtual marketplaces where transactions can be conducted in an efficient way is
known as
(A) viral marketing.(B) product customization.(C) electronic marketplaces(D)online auctions.
(Q.67) The type of E-Business which aggregates information and package it for customers, vendors or others in the supply
chain is known as
(A)viral marketing.(B) product customization.(C) value-chain integrators(D) online auctions.
(Q.68) The type of E-Business which provides specialized services in supply-chain operations such as providing logistics is
known as
(A) viral marketing.
(B) product-chain- customization.
(C) value-chain service.
(D) online-chain-auctions.
(Q.69) A person involved in E-Business who exchanges surplus products or services with the process administered
completely online by an intermediary is known as
(A) online barter.(B) information broker.(C) service provider.(D) online auctioneer.
(Q.70) An attribute which can hold only one value is known as
(A) multi-valued.(B) single-valued.(C) one valued.(D) double-valued.
(Q.71) E-business company that offers Quick Collect services to send money online with pay out at over tens of thousand
agent locations worldwide is
(A) DELL.
(B) Sharekhan.
(C) Yatra.
(D) Western Union Money Transfer.
(Q.72) The term used to describe a means of teaching through technology such as a network, browser, CDROM or DVD
multimedia platforms is known as
(A) E-teaching.
(B) E-learning.
(C) E-networking.
(D) E-browsing.
(Q.73) Databases developed in a systematic way are known as
(A) Database cycle.(B) Development cycle.(C) Data cycle.(D) Database Development Life Cycle.
(Q.74) The diamond box is used by
(A) an entity type.
(B) a table.
(Q.75) GUI stands for
(A)Graphical User Interface
(C) Graphical User Interact.

(C) an attribute type.

(D) a relationship.

(B) Grammar User Interface.


(D) Graphical Uniform Interface.

(Q.76) An entity that is visible to the user and is used to perform task is known as(1Mark)
(A) subject.
(B) links.
(C) interface.
(D) object.
(Q.77) The end, hidden from the user is known as
(A) hardware.
(B) hyperlink.
(C) front end.
(Q.78) The layer that contains the database object is called
(A) front-end.
(B) hardware.
(C) links.

(D) back end.


(D) back-end.

91

(Q.79) To handle all database access through one or more server, we require
(A) object.
(B) database object.
(C) back-end. (D) links.
(Q.80) Responsible for processing data for user queries and for request is
(A) object.
(B) database object.
(C) back-end.
(Q.81) The GUI should match
(A) between the system and the real world.
(C) between the software and the hardware.

(D) server.

(B) between the system and the software.


(D) between back-end and front-end.

(Q.82) Display and Functionality are the features of


(A) front-end.
(B) class.
(C) back-end.

(D) container.

(Q.83) Items that can be added into a JComboBox is/are


(A) 0.
(B) 1.
(C) 2.
(D) Unlimited.
(Q.84) When a program is written to respond to the button clicks, menu selections and other actions of the user, it is called
___________________ programming.
(A)Event-driven (B)Action-driven
(C)User-driven (D)Mouse-driven.
(Q.85) The end that collects input from the user is called
(A) hardware.
(B) links.
(C) front end.

(D) back end.

(Q.86) Define GUI.


(Q.87) Define DDLC.
(Q.88) Write the purpose of thew3schools.com website.
(Q.89) Define JTextField of java swing.
(Q.90) Write the use of Primary key.
(Q.91) Write the function of front end.
(Q.92) Name any two major projects of E-Governance in India.
(Q.93) Define the term 'container'.
(Q.94) Define Java Swing.
(Q.95) Explain the purpose of database.
(Q.96) Define the term 'server'.
(Q.97) Write the use of JComboBox.
(Q.98) Write the full form of DBMS.
(Q.99) What is the purpose of www.amazon.com site?
(Q.100) Define the term E-governance.
(Q.101) Write the two features of front-end.
(Q.102) Write the use of component in java Swing.
(Q.103) Explain 'Validation' feature.
(Q.104) Write the objectives of E-Governance.
(Q.105) Define Normalization.
(Q.106) Explain the use of JCheckBox and JPannel.
(Q.107) Write some disadvantages of e-learning.
(Q.108)Explain the concept - 'e-business is good for customer as well as for seller'(3Marks)
(Q.109) What are the types of e-government transactions?
(Q.110) Explain the building blocks of ER Diagrams.
(Q.111) Write various swing controls.
(Q.112) Explain the concept of front-end.
(Q.113) Write the use of JComboBox.
(Q.114) Write the advantages and disadvantages of e-learning.
(Q.115) Write some of the important points that one needs to keep in mind while developing the GUI front end.
(Q.116) Explain the concept of database connectivity.

92

Das könnte Ihnen auch gefallen