Website or Webpage
MCQ Questions & Answers, prepared by SONU (GK
EDITORIAL), Re-edited by PRANAB DAS & Podmeswar Bora, Only for fair use
1. Website is a collection of
a) HTML documents
b) Graphic files
c) Audio and video files
d) All of these
Ans. d
2. A _____ is the simplest form of website, in which the site‟s content is delivered without the use of server side processing.
a) Dynamic Website
b) E-Commerce Website
c) Static website
d) Social Networking Website
Ans. c
3. WordPress can be called as ______.
a) Content Manager of Website
b) Static Website
c) Dynamic Website
d) E-Commerce Website
Ans. a
4. Which of the following website type is used to create beautiful animation?
a) Dynamic
b) E-Commerce
c) Static
d) Flash
Ans. d
5. Flash is proprietary software developed by ______.
a) Yahoo
b) Macromedia
c) Google
d) Sencha
Ans. b
6. Website used to sell and buy something are categorized under _____.
a) Search engine
b) Social Networking
c) E-Commerce Website
d) Entertainment Sites
Ans. c
7. Which of the following is example of micro blogging?
a) Facebook
b) Twitter
c) Orkut
d) Google+
Ans. b
8. Which of the following is not used as blogging platform?
a) WordPress
b) TypePad
c) Pinterest
d) Blogger
Ans. c
9. ______ programs are automatically loaded and operates as a part of browser.
a) Add-ons
b) Utilities
c) Widgets
d) Plug-ins
Ans. d
10. Which of the following language is used to write animation and games in browser?
a) HTML
b) C Programming
c) Java d) None of these
Ans. c
11. ______ programs automatically connects to web sites and download documents and save them to local drive.
a) Web Downloading Utilities
b) Offline Browsers
c) Web Servers
d) None of these
Ans. a
12. What is a CMS in web design
a) Content Management System
b) Creative Management System
c) Content Mixing System
d) Creative Managerial System
Ans. a
13. Which of the following statements is false
a) You can make a website without using HTML
b) You can make a website without using PHP
c) You can make a website without CSS
d) You can make a website without using JavaScript
Ans. a
14. What does CSS stand for_____
a) Current style sheets
b) Current Sheets style
c) Cascading Style Sheets
d) Cascading Sheets Style
Ans. c
15. What is WordPress?
a) It is a software used to press text
b) It is a text formatting software
c) It is a CMS (Content Management System)
d) It is mail service
Ans. c
16. SQL stands for
a) Structured Query language b) Statistical Query Language
c) Superior Questions Lot
d) Standard Query Lot
Ans. a
17. Which of the following is true about JavaScript?
a) It is a server side scripting language
b) It is client side scripting language
c) It is a Software
d) It is a database
Ans. b
18. Which of the following is true about PHP
a) It is a server side scripting language
b) It is client side scripting language
c) It is a Software d) It is a database
Ans. a
19. Which of the following is true?
a) You need a server to host your website files
b) You don‟t need a server to host your website files
c) You can create a website without using HTML
d) You can‟t create a website without a CMS
Ans. a
20. Which of the following software could be used to build a website?
a) PowerPoint
b) Excel
c) Dream Weaver
d) ERP
Ans. c
21. Which of the following is not a CMS
a) WordPress
b) Drupal
c) Magneto
d) SAP
Ans. d
22. Which of the following is not a web hosting company
a) Hostgator
b) Blue Host
c) WPX Hosting
d) Facebook
Ans. d
23. Which of the following statements is true?
a) The web designer shouldn‟t just be concerned about the looks but also about user interface
b) Usability is very important in web design
c) A and B
d) None of these
Ans. c
24. Sites like facebook, twitter etc come under the scope of?
a) Email platform
b) Chat rooms
c) Search engines
d) Social networking
Ans. d
25. A _____ is a document commonly written and is accessible through the internet or other network using a browser?
a) Accounts
b) Data
c) Web page
d) Search engine
Ans. c
26. The pages that could not be modified are called _____?
a) Static
b) Dynamic
c) Immovable
d) None of these
Ans. a
27. The feature of dynamic pages is that?
a) The cannot be modified
b) The can be modified
c) Both A and B
d) None of these
Ans. b
28. When visiting unprotected websites, the lock icon is shown with ______ .
(a) red X to denote unsafe connection
(b) Green tick to denote safe connection
(c) both a and b
(d) none of them
Ans. a
29. Clicking on links from untrusted search engines might take an innocent user to ______.
a) video sharing websites
(b) audio streaming web sites
(c) social media websites
(d) hackers web site which extracts login ID and password
Ans. d
30. Most of the social media websites require ______ as user ID.
(a) Postal code
(b) PAN number
(c) email address
(d) Aadhar ID number
Ans. c
31. Wordpress files need to be copied to ______ to start creating a website.
(a) Documents
(b) root directory of the web server
(c) Downloads
(d) Pictures
Ans. b
32. The First page that you normally view at a Website is its:
a) Home page
b) Master page
c) First page
d) None of these
Ans. a
33. HTML is used to create
a) machine language program
b) high level program
c) Web page d) web server
Ans. c
34. Moving from one website to another is called:
a) Downloading
b) Browsing
c) Uploading
d) Attachment
Ans. b
35. A web address is also called a _____
a) URL
b) ULR
c) RLU
d) LUR
Ans. a
36. Amazon is a best example of ____ site.
a) E-Commerce
b) Blogging
c) Social Networking
d) Entertainment
Ans. a
37. Websites used for building network with friends and relatives is called as ______.
a) E-Commerce
b) Net Banking
c) Blogging
d) Social Networking
Ans. d
38. Google is an example of _____
a) Search Engine
b) Entertainment
c) Social Network
d) None of these
Ans. a
39. Software which allows user to view the webpage is called as ______.
a) Internet Browser
b) Operating System
c) Website
d) Interpreter
Ans. a
40. To make your website mobile friendly, you can make your website a) Responsive b) Reactive c) Fast Loading d) Light
Ans. a
41. A ______ is a unique name that identifies a website.
a) TCP/IP
b) Scroll name
c) Domain name
d) Register name
Ans. c
42. Web pages are of how many types?
a) 3
b) 2
c) 4
d) 5
Ans. b
43. ______ is a collection of webpages.
a) Archive
b) Slot
c) Website
d) Store
Ans. c
Web Browser,
MCQ Questions & Answers, prepared by SONU (GK
EDITORIAL), Re-edited by PRANAB DAS & Podmeswar Bora, Only for fair use
1. Documents in Microsoft One Drive can be edited using _____.
(a) online version of Microsoft office tools using browser
(b) installed version of Microsoft office tools
(c) both a & b
(d) none of them
Ans. c
2. Which document view given an appearance as in web browser?
A. Draft view
B. Outline view
C. Web layout view
D. Full screen reading
Ans. c
3. What is the full form of BOM?
A. Browser Object Method
B .Browser Object Model
C. Browser Oriented Method
D. Browser Oriented Model
Ans. b
4. What is the purpose of Alt + W key in Tally?
A. Change the financial period
B. Invoke Tally Reference Manual
C. Open default web browser
D. Exist Tally without confirmation
Ans. c
5. What‟s a web browser ?
a) A kind of spider
b) A computer that store www files
c) A person who likes to look at websites
d) A software program that allows you to access sites on the world wide web
Ans. d
6. A _____ is a document commonly written and is accessible through the internet or other network using a browser?
a) Accounts
b) Data
c) Web page
d) Search engine
Ans. c
7. Which of the following is used to read HTML code and to render Webpage?
a) Web Server
b) Web Browser
c) Web Matrix
d) Web Heetson
Ans. b
8. First Web Browser was created in _______.
a) 1991
b) 1992
c) 1993
d) 1990
Ans. d
9. First web browser was created by _______.
a) Tim Berners lee
b) Mozilla Foundation
c) Marc Andreessen
d) Jacobs
Ans. a
10. A free open source software version of Netscape was the developed called ______.
a) Opera Mini
b) IE
c) Google Chrome
d) Mozilla
Ans. d
11. Internal name for the old Netscape browser was _____.
a) Mozilla
b) Google Chrome
c) Opera Mini
d) IE
Ans. a
12. Which of the following is considered as latest browser?
a) Mosaic
b) Google Chrome
c) IE d) Mozilla Firefox
Ans. b
13. The first widely used web browser was ______.
a) Mozilla
b) WorldWideWeb
c) NCSA Mosaic
d) Heetson
Ans. c
14. Name the first popular web browser is
a) IBM browser
b) Google chorme
c) Mozilla Firefox
d) MOSAIC
Ans. d
15. Which of the following was the first web browser to handle all HTML 3 features?
a) Cello
b) Erwise
c) UdiWWW
d) Mosaic
Ans. c
16. Which of these rendering engine is used by Chrome web browser?
a) Gecko
b) Blink
c) Quantum
d) Heetson
Ans. b
17. Which of the following is the oldest web browser still in general use?
a) Lynx
b) Safari
c) Internet Explorer
d) Navigator
Ans. a
18. When was Chrome web browser launched ?
a) 2002
b) 2003
c) 2004
d) 2008
Ans. d
19. Which of these tech company owns Firefox web browser?
a) Lenovo
b) IBM
c) Apple
d) Mozilla
Ans. d
20. Which of the following browsers were/are available for the Macintosh?
a) Opera
b) Safari
c) Netscape
d) All of these
Ans. d
21. What is the name of the browser developed and released by Google?
a) Chrome
b) GooglyGoogle
c) Heetson
d) Titanium
Ans. a
Explanation: Google released its own www browser in late 2008. It‟s free and the version for Windows XP and Vista was released first. It provides enhanced security features, it addition to a speedy interface.
22. Which of the following are alternative names for mobile browsers?
a) microbrowser
b) wireless internet browser
c) minibrowser
d) All of these
Ans. d
23. Apple, Inc. joined the “browser wars” by developing its own browser. What is the name of this browser?
a) Opera
b) NetSurf
c) Internet Explorer
d) Safari
Ans. d
24. Some web browsers are intended for specific audiences. What is the target group of the ZAC Browser?
a) disgruntled postal workers
b) autistic children
c) hardcore gamers
d) librarians
Ans. b
Explanation: The acronym “ZAC” stands for “Zone for Autistic Children”. It was developed by the grandfather (John LeSieur) of an autistic child. The features are specifically designed to enhance the web browsing experience of autistic children and adolescents. It is available on the PC platform.
25. Nexus is first graphical web browser.
a) True
b) False
Ans. b
Explanation: Mosaic was the first browser to display images inline with text instead of displaying images in a separate window, while often described as the first graphical web browser.
26. The open source software version of netscape is ______
a) Chrome
b) Mozilla
c) internet Explorer
d) Erwise
Ans. b
27. Which of the following is an Indian Web Browser ?
a) Google Chrome
b) Safari
c) Epic
d) IE
Ans. c
28. Which of the following is a Web Browser ?
a) MS-OFFICE
b) Notepad
c) Firefox
d) Word 2007
Ans. c
29. Which of the following is the latest web browser ?
a) Safari
b) Chrome
c) Microsoft Edge
d) Lynx
Ans. c
30. Which of the following browser has high speed browsing capacity ?
a) Chrome
b) Opera
c) UC browser
d) Lynx
Ans. b
31. Which one is responsible of running javascript code?
A .Browser
B .Notepad++
C .Sublime Text
D. Visual studio code
Ans. a
32. Software which allows user to view the webpage is called as ______.
a) Internet Browser
b) Operating System
c) Website
d) Interpreter
Ans. a
33. Which of the following is considered as first web Browser?
a) Mosaic
b) Nexus
c) Netscape Navigator
d) Internet Explorer
Ans. b
34. Which was the first Graphical web browser ?
a) IE
b) Opera
c) Mozilla
d) Netscape
Ans. d
35. Which of the following Web Browser is developed by Microsoft ?
a) Chrome
b) Internet Explorer
c) Mozilla
d) Opera
Ans. b
36. Which of these web browser has the largest market share presently, across all platforms?
a) Edge
b) Chrome
c) Safari
d) Firefox
Ans. b
37. Which of the following is a “text-only” web browser?
a) Internet Explorer
b) Lynx
c) Firefox
d) Netscape Navigator
Ans. b
38. Is it possible to run more than one browser on your computer?
a) Yes
b) No
Ans. a
39. High speed downloading browser is ______
a) Opera
b) Chrome
c) Firefox
d) UC Browser
Ans. d
40. What is a web browser?
a) A program that can display a web page
b) A program used to view html document
c) It enables user to access the resources of internet
d) All of these
Ans. d
41. Which web browser replace Internet explorer in Window 10
a) Edge
b) Chrome
c) Mozilla
d) Heetson
Ans. a
HTML
MCQ QUESTIONS AND ANSWERS,
PREPARED BY SONU (GK EDITORIAL), RE-EDITED BY
ABOJIT BODOSA, APU BISWAS & PODMESWAR BORA, ONLY FOR FAIR USE
1. In html _______ tag defines paragraph.
a) <p>
b) <para>
c) <table>
d) <section>
Ans. a
2. What is Default extension for a HTML document?
(a) .htm
(b) .html
(c) both a & b
(d) none of them
Ans. c
3. HTML tag begins with______ symbol.
(a) <
(b) >
(c) <! (
d) !>
Ans. a
4. HTML tag ends with _____symbol.
(a) <
(b) >
(c) <!
(d) !>
Ans. b
5. HTML comment begins with_____ symbol.
(a) <
(b) >
(c) <!
(d) !>
Ans. c
6. HTML comment ends with ______symbol.
(a) <
(b) >
(c) <! –
(d) -->
Ans. d
7. SGML stands for .
(a) Standard Grand Markup Language
(b) Synchronized Generalized Markup Language
(c) Standard Generalized Markup Language
(d) Simple Generalized Markup Language
Ans. c
8. DTD stands in markup language for_______.
(a) Document Type Definition
(b) Data Type Definition
(c) Digital Type Definition
(d) Design Type Definition
Ans. a
9. DDL stands for ______
(a) Data Description Library
(b) Data Description Language
(c) Data Description Liberty
(d) Data Description License
Ans. a
10. Most of the HTML tags have a corresponding closing tag, which begins with _____symbol.
(a) <! - -
(b) < /
(c) < :
(d) <
Ans. b
11. If a HTML tag does not have explicit closing tag, the tag may be closed with _____symbol instead of a simple >symbol.
(a) >
(b) : >
(c) />
(d) @ >
Ans. c
12. The title to be displayed at the top of the browser window or browser tab is enclosed in_____ .
(a) < HTML > ::: < =HTML >
(b) < HEAD > ::: < =HEAD >
(c) < TITLE > ::: < /T ITLE >
(d) < BODY > ::: < =BODY >
Ans. c
13. Paragraph is contained inside _______HTML tags.
(a) < p > ::: < /p >
(b) < center > ::: < =center >or < div align =\center" > ::: < =div >
(c) < div align = \left" > ::: < =div >
(d) < div align = \right" > ::: < =div >
Ans. a
14. Elements to be centre aligned in browser display are enclosed inside _______HTML tags.
(a) < p > ::: < =p >
(b) < center > ::: < =center >or < div align = “center" > ::: < /div >
(c) < div align = \left" > ::: < =div >
(d) < div align = \right" > ::: < =div >
Ans. b
15. Elements to be left aligned in browser display are enclosed inside ______HTML tags.
(a) < div align = \justified" > ::: < =div >
(b) < center > ::: < =center >or < div align =\center" > ::: < =div >
(c) < div align = “left" > ::: < /div >
(d) < div align = \right" > ::: < =div >
Ans. c
16. Elements to be right aligned in browser display are enclosed inside_____ HTML tags.
(a) < div align = \justified" > ::: < =div >
(b) < center > ::: < =center >or < div align =\center" > ::: < =div >
(c) < div align = \left" > ::: < =div >
(d) < div align = “right" > ::: < /div >
Ans. d
17. Elements to be justified (aligned use with left and right edges) in browser display are enclosed inside_____ tags in HTML.
(a) < div align = “justified" > ::: < /div >
(b) < center > ::: < =center >or < div align =\center" > ::: < =div >
(c) < div align = \left" > ::: < =div >
(d) < div align = \right" > ::: < =div >
Ans. a
18. _______ HTML tag displays an image in HTML page.
(a) < img src = “file name.jpg" >
(b) < tableborder = 1 > ::: < =table >
(c) < tableborder = 0 > ::: < =table >
(d) < ahref = \target:htm" > ::: < =a >
Ans. a
19. ______HTML tag displays a table without border.
(a) < img src = \file:jpg" >
(b) < tableborder = 1 > ::: < =table >
(c) < tableborder = 0 > ::: < /table >
(d) < ahref = \target:htm" > ::: < =a >
Ans. c
20. ______HTML tag creates a clickable hyper link for navigation inside the same page or between different pages.
(a) < img src = \file:jpg" >
(b) < tableborder = 1 > ::: < =table >
(c) < tableborder = 0 > ::: < =table >
(d) <a href = “target.htm" > ::: < /a >
Ans. d
21. _______HTML tag displays a table with border thickness of 1 pixel.
(a) < img src = \file:jpg" >
(b) < table border = 1 > ::: < /table >
(c) < table border = 0 > ::: < =table >
(d) < a href = \target:htm" > ::: < =a >
Ans. b
22. _____HTML tag can control fontface, size and colour.
(a) < font face = “Arial" size = “1" color = “red" > ::: < /font >
(b) < H1 > ::: < =H1 > (c) < H2 > ::: < =H2 > (d) < H3 > ::: < =H3 >
Ans. a
23. _______HTML tag displays headings of the largest size.
(a) < font face = \Arial" size = \+1"color =\red" > ::: < =font >
(b) < H1 > ::: < /H1 >
(c) < H2 > ::: < =H2 >
(d) < H3 > ::: < =H3 >
Ans. b
24. _____HTML tag displays headings of the second largest size.
(a) < H4 > ::: < =H4 >
(b) < H1 > ::: < =H1 >
(c) < H2 > ::: < /H2 >
(d) < H3 > ::: < =H3 >
Ans. C
25. ______HTML tag displays headings of the third largest size.
(a) < H4 > ::: < =H4 >
(b) < H1 > ::: < =H1 >
(c) < H2 > ::: < =H2 >
(d) < H3 > ::: < /H3 >
Ans. d
26. ______HTML tag displays headings of the smallest size.
(a) < H6 > ::: < /H6 >
(b) < H1 > ::: < =H1 >
(c) < H2 > ::: < =H2 >
(d) < H3 > ::: < =H3 >
Ans. a
27. In HTML, text size ______ represents the normal size of text.
(a) -4
(b) 0
(c) +4
(d) +8
Ans. b
28. In HTML5, font tag has been_______
(a) appreciated
(b) reinstated
(c) deprecated
(d) beautified
Ans. c
29. Colour can be specified using colour name (like red, gray, blue, cyan, magenta, etc.) or numeric value in _______ colour order.
(a) Red-Green-Blue
(b) Blue-Green-Red
(c) Green-Red-Blue
(d) Blue-Green-Blue
Ans. a
30. Colour code of #FF0000 stands for ______ colour.
(a) blue
(b) green
(c) red
(d) black
Ans. C
31. Colour code of #00FF00
stands for _______ colour.
(a) blue
(b) green
(c) red
(d) black
Ans. b
32. Colour code of #0000FF
stands for______ colour.
(a) blue
(b) green
(c) red
(d) black
Ans. a
33. Colour code of #000000
stands for _______ colour.
(a) blue
(b) green
(c) red
(d) black
Ans. d
34. Colour code of #FFFFFF
stands for _______colour.
(a) white
(b) green
(c) red
(d) black
Ans. a
35. In HTML, the two digit color
code value ranges from 00 to_____ in hexadecimal.
(a) AA
(b) 11
(c) FF
(d) CC
Ans. c
36. ______tag is used to display
different HTML pages in a single window (not recommended for mobile viewing).
(a) font
(b) frameset
(c) table
(d) img
Ans. b
37. Width of elements like
image, table, etc. can be controlled using ______attribute.
(a) width
(b) height
(c) length
(d) breadth
Ans. a
38. HTML is what type of
language
a) Scripting language
b) Markup language
c) Programming language
d) Network protocol
Ans. b
39. Height of elements like
image, table, etc. can be controlled using ______attribute.
(a) width
(b) height
(c) length
(d) breadth
Ans. b
40. Width and height value can
be specified in _______or in pixels.
(a) metre
(b) kilometer
(c) percentage
(d) inches
Ans. c
41. ______HTML tag creates a
break.
(a) < center > ::: <
=center >
(b) < table > ::: <
=table >
(c) < img width = \80%"
src = \globe:jpg" >
(d) < br >
Ans. d
42. ______HTML tag displays an
image named globle.jpg at 80% of the total width available in the browser.
(a) < center > ::: <
=center >
(b) < table > ::: <
=table >
(c) < img width = “80%"
src = “globe.jpg" >
(d) < br= >
Ans. c
43. Scrolling text may be
created using______ tag in HTML.
(a) < marquee > ::: <
/marquee >
(b) < span > ::: <
=span >
(c) < p > ::: < =p >
(d) < font > ::: <
=font >
Ans. a
44. Text scrolling to left may
be created using ______ tag in HTML.
(a) < marquee direction =
“left" > ::: </marquee >
(b) < marquee direction =
\right" > ::: <=marquee >
(c) < marquee direction =
\up" > ::: <=marquee >
(d) < marquee direction = \down"
> ::: <=marquee >
Ans. a
45. Text scrolling to right may
be created using_______ tag in HTML.
(a) < marquee direction =
\left" > ::: <=marquee >
(b) < marquee direction =
“right" > ::: </marquee >
(c) < marquee direction =
\up" > ::: <=marquee >
(d) < marquee direction =
“down" > ::: </marquee >
Ans. b
46. Text scrolling upwards may
be created using______ tag in HTML.
(a) < marquee direction =
\left" > ::: <=marquee >
(b) < marquee direction =
\right" > ::: <=marquee >
(c) < marquee direction =
“up" > ::: </marquee >
(d) < marquee direction =
\down" > ::: <=marquee >
Ans. c
47. Text scrolling downwards may
be created using _____tag in HTML.
(a) < marquee direction =
\left" > ::: <=marquee >
(b) < marquee direction = \right"
> ::: <=marquee >
(c) < marquee direction =
\up" > ::: <=marquee >
(d) < marquee direction =
“down" > ::: </marquee >
Ans. d
48. ______tag in HTML creates a
clickable hyperlink.
(a) < p > ::: < =p >
(b) < img src = \globe:png" >
(c) < table border = 1 >
::: < =table >
(d) < a href =
“page.html" > ::: < /a >
Ans. d
49. _______HTML tag displays a
table without border.
(a) < tr > ::: < =tr
>
(b) < th > ::: < =th
>
(c) < table border = 1 >
::: < =table >
(d) < table border = 0 >
::: < /table >
Ans. d
50. _______HTML tag displays a
table with border thickness of 1 pixel.
(a) < tr > ::: < =tr
>
(b) < th > ::: < =th
>
(c) < table border = 1 >
::: < /table >
(d) < table border = 0 >
::: < =table >
Ans. c
51. ______HTML tag is used to mark header column for a table.
(a) < tr > ::: < =tr >
(b) < th > ::: < /th >
(c) < table border = 1 > ::: < =table >
(d) < table border = 0 > ::: < =table >
Ans. b
52. ______ HTML tag is used to mark a row for a table.
(a) < tr > ::: < /tr >
(b) < th > ::: < =th >
(c) < table border = 1 > ::: < =table >
(d) < table border = 0 > ::: < =table >
Ans. a
53. ______HTML tag is used to mark a column inside a row.
(a) < td > ::: < /td >
(b) < th > ::: < =th >
(c) < table border = 1 > ::: < =table >
(d) < table border = 0 > ::: < =table >
Ans. a
54. Among the following options, ______ HTML tag merges 3 columns to create a large column.
(a) < tr > ::: < =tr > (b) < td > ::: < =td >
(c) < td colspan = 3 > ::: < /td >
(d) < td rowspan = 4 > ::: < =td >
Ans. c
55. Among the following options, ______HTML tag merges 4 rows to create a large row.
(a) < tr > ::: < =tr >
(b) < td > ::: < =td >
(c) < td colspan = 3 > ::: < =td >
(d) < td rowspan = 4 > ::: < /td > Ans. d 56. ______ creates an ordered list.
(a) < ul > ::: < =ul >
(b) < ol > ::: < /ol >
(c) < li > ::: < =li >
(d) none of them
Ans. b
57. ______ creates an unordered list.
(a) < ul > ::: < /ul >
(b) < ol > ::: < =ol >
(c) < li > ::: < =li >
(d) none of them
Ans. a
58. ________ declares a list item which may be part of ordered list or unordered list.
(a) < ul > ::: < =ul >
(b) < ol > ::: < =ol >
(c) < li > ::: < /li >
(d) none of them
Ans. c
59. HTML form controls commonly use_____ tag for taking form input.
(a) < input >
(b) < table > ::: < =table >
(c) < img >
(d) < form > ::: < =form >
Ans. a
60. HTML form is contained inside_____ tag.
(a) < input >
(b) < form > ::: < /form >
(c) < img >
(d) < form > ::: < =form >
Ans. b
61. Input tag in HTML supports ______attribute.
(a) type
(b) value
(c) name/ID
(d) all of them
Ans. d
62. To display a button in HTML form, _____attribute is used in the input tag.
(a) button
(b) checkbox
(c) color
(d) date
Ans. a
63. To display a checkbox in HTML form, _______attribute is used in the input tag.
(a) button
(b) checkbox
(c) color
(d) date
Ans. b
64. To display a colour selection input in HTML form, ______attribute is used in the input tag.
(a) button
(b) checkbox
(c) color
(d) date
Ans. c
65. To display a date input in HTML form, ______attribute is used in the input tag.
(a) button
(b) checkbox
(c) color
(d) date
Ans. d
66. To display a date and time input in HTML form, ______attribute is used in the input tag.
(a) button
(b) checkbox
(c) color
(d) datetime
Ans. d
67. To display a field for email input in HTML form, ______attribute is used in the input tag.
(a) email
(b) file
(c) hidden
(d) image
Ans. a
68. To display a file input dialog in HTML form, ______attribute is used in the input tag.
(a) email
(b) file
(c) hidden
(d) image
Ans. b
69. To create a hidden field in HTML form, ______attribute is used in the input tag.
(a) email
(b) file
(c) hidden
(d) image
Ans. c
70. To create an image selection tool in HTML form, _____attribute is used in the input tag.
(a) email
(b) file
(c) hidden
(d) image
Ans. d
71. To create month selection field in HTML form, ______attribute is used in the input tag.
(a) month
(b) number
(c) password
(d) radio
Ans. a
72. To create number input field in HTML form, _____ attribute is used in the input tag.
(a) month
(b) number
(c) password
(d) radio
Ans. b
73. To create password input field in HTML form, ____attribute is used in the input tag.
(a) month
(b) number
(c) password
(d) radio
Ans. c
74. To create radio button input field in HTML form, _____attribute is used in the input tag.
(a) month
(b) number
(c) password
(d) radio
Ans. d
75. To create an input field to display numbers with specific start, end and step values in HTML form, ______ attribute is used in the input tag.
(a) range
(b) reset
(c) search
(d) tel
Ans. a
76. To create an input field to reset all input elements of a form in HTML form, _____ attribute is used in the input tag.
(a) range
(b) reset
(c) search
(d) tel
Ans. b
77. To create search field (behviour depends upon server implementation) in HTML form, ______attribute is used in the input tag.
(a) range
(b) reset
(c) search
(d) tel
Ans. c
78. To create field for telephone number input in HTML form, _____ attribute is used in the input tag.
(a) range
(b) reset
(c) search
(d) tel
Ans. d
79. To create a field for submitting the contents of HTML form to the server, ______ attribute is used in the input tag.
(a) submit
(b) text
(c) time
(d) url
Ans. a
80. To create a text input field in HTML, _____ attribute is used in the input tag.
(a) submit
(b) text
(c) time
(d) url
Ans. b
81. To create a time input in HTML, _____attribute is used in the input tag.
(a) submit
(b) text
(c) time
(d) url
Ans. c
82. To create a field for taking a web address in HTML, _____ attribute is used in the input tag.
(a) submit
(b) text
(c) time
(d) url
Ans. d
83.What is the first tag in html document?
A)<html>
B)<head>
C)<title>
D)</html>
Ans. a
84.Which html tag inserts a line horizontally in a page?
A)<lr>
B)<l>
C)<hr>
D)<line>
Ans. c
85.What are the two main parts, available in html document?
A)Title and Body B)Head and title
C)Head and Body
D)Head and document
Ans. c
86.Which character in html is used to indicate end tag?
A)\
B) /
C)!
D)<#
Ans. b
87. Which symbols starts with html comments?
A)<!
B)</
C)<#
D)<\
Ans. a
88.Which attribute is used with <td> tag to merge two cells horizontally?
A)Colspan = 2
B)Rowspan = 2
C)Mergerows
D)mergecols
Ans. a
89.Which tag creates a checkbox for a form in html?
A. <check box>
B. <input check box>
C. <input = check box>
D. <input type = “check box”>
Ans. d
90.Which html tag is used to add a row in a table?
A. <tr> and </tr>
B. <cr> and </cr>
C. <th> and </th>
D. <td> and </td>
Ans. a
91.Which html tag is used to divide a row into data cells?
A. <tr> and </tr>
B. <cr> and </cr>
C. <th> and </th>
D. <td> and </td>
Ans. d
92.Which is the correct syntax for adding alternate text for image, if the image cannot be displayed?
A. <img src = “boat.gif” alt = “big boat”>
B. <img src = “boat.gif” alt text = “big boat”/>
C. <img src = “boat.gif” alternate = “big boat”/>
D. <img src = “boat.gif” alternate text = “big boat”/>
Ans. a
93.Which is the correct H1 tag for right alignment?
A. <h1 align = “right”>.....</h1>
B. <h1 tag align = “right”>.....</h1> C <h1 align = “r”>.....</h1>
D. <h1 alignment = “right”>.....</h1>
Ans. a
94.What is the correct syntax for making a hyperlink? A <http: // “https://www.myheetson.blogspot.com”</a>
B. <url = “https: // www.myheetson.blogspot.com”>heetson
C. <a href = “https:// www.myheetson.blogspot.com”>heetson</a>
D. <a ref = “https:// www.myheetson.blogspot.com”>heetosn</a>
Ans. c
95.Which is the correct tag for adding iframe in html?
A. <iframe https://www.myheetson.blogspot.com></iframe>
B. <iframe =”https:// www.myheetson.blogspot.com”></iframe>
C. <iframe src = “https://www.myheetson.blogspot.com”></iframe>
D. <iframe href = “https:// www.myheetson.blogspot.com”></iframe>
Ans. c
96.what is the correct html tag for adding a background color?
A. <body color = “Yellow”>
B. <body bgcolor = “Yellow”> C <body background = “Yellow”>
D. <body bg = “Yellow”>
Ans. b
97.How do you add a link which will allow the visitor to send an email from the page?
A. <a href = “mailto : youradderss”>
B. <a href = “sendmailtoyour address”>
C. <a=”mailto”>
D. <href = “mailto”>
Ans. a
98.What will happen, If the background image is smaller than the screen, what will happen?
A. It will be stretched
B. It will leave a blank space at the bottom of the page
C. It will leave a blank space at the top of the page
D. It will be repeated
Ans. d
99.which is the correct html tag for making a text input field?
A. <text type = “Text”>
B. <input type = “text”>
C. <input type = “textfield”>
D. <input type = “textbox”>
Ans. b
100.Which is the correct html tag for creating password field?
A. <text type = “password”>
B .<input type = “pwd”>
C. <input type = “password”>
D. <input type = “passcode”>
Ans. c
101.What is the correct html code for inserting a background image?
A. <Body background = “image jpg”>
B. <body = “image.jpg”>
C. <background = “image.jpg”>
D. <body background = image.jpg>
Ans. a
102.Which option will match, while making bulleted list?
A. Square, disc, polygon
B. triangle, disc, circle
C. triangle, square, circle
D. disc, circle, square
Ans. d
103.What is the meaning of increase the cell padding?
A. Increase the thickness of table border
B. Increase the space between cells
C. Increase the distance between cell and content
D. Increase the no of cells
Ans. c
104. Which property of cells will how many rows a cell should span?
A. Colspan = 5
B. Rowspan = 5
C. Cellspan = 5
D. Span = 5
Ans. b
105.Which web language give more control over the HTML elements and allows them to change at any time without returning to the Web server?
A. BML
B. XML
C. HTML
D. DHTML
Ans. d
106. <a> tag in HTML
a) Alters a hyperlink
b) Defines a hyperlink
c) Deletes a hyperlink
d) Accuses a hyperlink
Ans. b
107. Which tag defines value of a term in description list?
a) <a>
b) <val>
c) <del>
d) <dd>
Ans. d
108. A control‟s ______ is given by its name attribute.
a) Control name
b) Area
c) Sphere
d) Quotation
Ans. a
109. There are how many types of HTML controls?
a) 8
b) 7
c) 4
d) 5
Ans. b
110. In DHTML what does D stand for?
a) Down
b) Drain
c) Dead
d) Dynamic
Ans. d
111. What is the full form of DHTML?
a) Digital Host markup language
b) Dynamic hypertext markup language
c) Digital higher text markup language
d) Dynamic higher markup language
Ans. b
112. From which tag descriptive list starts
a) <LL>
b) <dd>
c) <DL>
d) <DS>
Ans. c
113. The attribute of <form> tag
a) Method
b) Action
c) Both A and B
d) None of these
Ans. c
114. What are empty elements and is it valid?
a) No, there is no such terms as empty elements
b) Empty elements are elements with no data
c) No, it is not valid to use empty element
d) None of these
Ans. b
115. Which of the following attributes of text box control allow to limit the maximum character?
a) size
b) len
c) maxlength
d) All of these
Ans. c
116. HTML is a subset of
a) SGMT
b) SGML
c) SGMD
d) None of these
Ans. b
117. Which of the following is a container tag?
a) <select>
b) <body>
c) <input>
d) Both A and B
Ans. d
118. The attribute, which define the relationship between current document and HREF URL is
a) REL
b) URL
c) REV
d) All of these
Ans. a
119. <DT> tag is designed to fit a single line of our web page but <DD> tag will accept a
a) line of text
b) full paragraph
c) word
d) request
Ans. b
120. Character encoding is
a) method used to represent numbers in a character
b) method used to represent character in a number
c) a system that consists of a code which pairs each character with a pattern, sequence of natural numbers of electrical pulse in order to transmit the data
d) none of these
Ans. c
121. Correct HTML to left align the content inside a table cell is
a) <tdleft>
b) <td raligh = “left”>
c) <td align = “left”>
d) <td leftalign>
Ans. c
122. The tag which allows you to rest other html tags within the description is
a) <th>
b) <td>
c) <tr>
d) <caption>
Ans. d
123. <base> tag is designed to appear only between
a) <head>
b) <title>
c) <body>
d) <form>
Ans. a
124. How can you open a link in a new browser window?
a) <a href =”url” target=”new”>
b) <a href= “url” target=”_blank”>
c) <a href =”url” .new>
d) <a href =”url” target=”open”>
Ans. b
125. What is the use of forms in HTML?
A. To display a table
B .To display a list
C. To send the data to server
D. To display email contents
Ans. c
126. The latest HTML standard is
a) XML
b) SGML
c) HTML 4.0
d) HTML 5.0
Ans. d
127. The tag used to create hypertext relationship between current document and another URL is
a) <ISINDEX>
b) <A>
c) <LINK>
d) None of these
Ans. c
128. The text inside the <text area> tag works like
a) <p> formatted text
b) <T> formatted text
c) <PRE> formatted text
d) None of these
Ans. c
129. Main container for <TR> , <TD> and <TH> is
a) <Table>
b) <Group>
c) <data>
d) All of these
Ans. a
130. The body tag usually used after
a) Title tag
b) head tag
c) EM tag
d) Form tag
Ans. b
131. Symbol used at the beginning of the HREF text is
a) #
b) $
c) &
d) ^
Ans. a
132. Which of the following is a valid Name?
a) <_person>
b) <123 person>
c) Both A and B
d) None of these
Ans. a
133. Who is making the web standard?
a) The world wide web consortium
b) Mozilla
c) Google
d) Microsoft
Ans. a
134. Choose the correct HTML element to define important text
a) <br>
b) <strong>
c) <i>
d) <important>
Ans. b
135. Choose the correct HTML element to define emphasized text
a) <em>
b) <italic>
c) <i>
d) <b>
Ans. a
136. Which doctype is correct for HTML5?
a) <!DOCTYPE html>
b) <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 5.0 “https://www.myheetson.blogspot.com>
c) <!DOCTYPE HTML5>
d) <!doctype html5.0>
Ans. a
137. Which html element is used to specify a footer for a document or section?
a) <footer>
b) <section>
c) <bottom>
d) <head>
Ans. a
138. What is the correct html element for playing video files?
a) <video>
b) <media>
c) <movie>
d) <mp4>
Ans. a
139. What is the correct HTML element for playing audio files?
a) <audio>
b) <sound>
c) <mp3>
d)<music>
Ans. a
140. The HTML global attribute, “contenteditable” is used to:
a) Specify whether the content of an element should be editable or not
b) Return the position of the first found occurrence of content inside a string
c) Update content from the server
d) Specifies a context menu for an element
Ans. a
141. In HTML, onblur and onfocus are:
a) Event attributes
b) html elements
c) style attributes
d) blur image
Ans. a
142. The HTML <canvas> element is used to:
a) draw graphics
b) create draggable elements
c) manipulate data in MySQL
d) display database records
Ans. a
143. In HTML, which attribute is used to specify that an input field must be filled out?
a) formvalidate
b) validate
c) required
d) placeholder
Ans. c
144. Which input type defines a slider control?
a) range
b) slider
c) search
d) controls
Ans. a
145. Which HTML element is used to display a scalar measurement within a rang?
a) <measure>
b) <range>
c) <gauge>
d) <meter>
Ans. d
146. Which HTML element defines navigation links?
a) <nav>
b) <navigation>
c) <navigate>
d) <direction>
Ans. a
147. In HTML, what does the <aside> element define?
a) Content aside from the page content
b) The ASCII character-set; to send information between computers on the internet
c) A navigation list to be shown at the left side of the page
d) All of these
Ans. a
148. HTML uses
a) User defined tags
b) Pre-specified tags
c) Fixed tags defined by the language
d) Tags only for linking
Ans. c
149. The year in which HTML was developed in _____
a) 1990
b) 1980
c) 2000
d) 1995
Ans. a
150. Fundamental HTML Block is known as _____
a) HTML body
b) HTML tag
c) HTML Attribute
d) HTML Element
Ans. b
151. Apart from <b> tag, what other tag may text bold?
a) <fat>
b) <strong>
c) <black>
d) <emp>
Ans. b
152. HTML web pages can be read and rendered by______
a) Compiler
b) Server
c) Web Browser
d) Interpreter
Ans. c
153. Tags and texts that are not directly displayed on the page are written in ______ section.
a) <head>
b) <title>
c) <body>
d) <html>
Ans. a
154. Which of the following is not an attribute of <form> tag
a) action
b) method
c) name
d) url
Ans. d
155. Choose the correct HTML tag to make a text italic
a) ⁢italic>
b) ⁢it>
c) <i>
d) <il>
Ans. c
156. To start a list using circles, use
a) <ul type= “circle”>
b) <ul Type= “round”
c) <ul = “round”>
d) <ul “round”>
Ans. d
157. HTML was created by _____.
(a) Brian Kernighan
(b) Tim Berners-Lee
(c) Dennis Ritchie
(d) James Gosling
Ans. B
158. Which HTML Tag is used to define a client-side script such as the javaScript?
a) <unscript>
b) <script>
c) Both A and B
d) None of these
Ans. b
159. Which html attribute is used to provide an advisory text about an element or its contents.
a) Dir
b) Title
c) Tooltip
d) None of these
Ans. C
160. “.htm or .html” is extension of______.
a) Web page source text
b) image
c) video
d) pc application
Ans. a
161. Which are the Objects Used for storing Data on the client provided by The HTML Local Storage?
a) Window.localStorage
b) Windows.sessionStorage
c) Window.localSession
d) Both A and B
Ans. d
162. Which HTML Element is used to define the description data?
a) <dt>
b) <dd>
c) <li>
d) <dl>
Ans. b
163. Which of the following is a Declaration for an HTML Document?
a) <html>…..</html>
b) <!DOCTYPE html>
c) <body>..</body>
d) <p>….</p>
Ans. b
164. If you want to change the text colour to Red which of the following Tags will you use?
a) <body text =Red>
b) <body Bgcolor=Red>
c) <body Colour = Red>
d) None of these
Ans. a
165. HTML links are Defined with <a> Tag Address Is Specified By Attribute
a) Href
b) Hlink
c) Src
d) src-link
Ans. a
166. The first tag inside <Table> tag is
a) <head>
b) <caption>
c) <th>
d) <td>
Ans. b
167. Which program do you need to write HTML?
a) A graphics program
b) Any text editor
c) HTML development suite 4
d) All of these
Ans. b
168. In HTML, tags that include both on and off tag are called
a) comment tag
b) document tag
c) container tag
d) None of these
Ans. c
169. Which of the following is underline tag?
a) <pre>
b) <ul>
c) <u>
d) <hr>
Ans. c
170. Which tag can set the background color for your page?
a) <body>
b) <font>
c) <head>
d) <title>
Ans. a
171. HTML tags are surrounded by which type of brackets?
a) Curly
b) Round
c) Squart
d) Angle
Ans. d
172. To start a list using circles, use
a) <ul “round”>
b) <ul type = “circle”>
c) <ul type= “round”>
d) <ul = “round”>
Ans. b
173. The tag which allows some web server search engines to search your web page
a) <search>
b) <ISINDEX>
c) <HEAD>
d) <link>
Ans. b
174. The special formatting tag is
a) <p>
b) <tt>
c) <pre>
d) None of these
Ans. c
175. Which of the following will not be found in the <head> section?
a) <table>
b) <Metatags>
c) <Title>
d) None of these
Ans. a
176. If you create an HTML page in word processor
a) save it with binary file
b) save it with WMF file
c) save it with ASCII text file
d) All of these
Ans. c
177. What will be the added by using <td> and </td> tag?
a) rows
b) steps
c) cell
d) columns
Ans. d
178. Which property tells how many rows a cell should span?
a) colspan=n
b) rowspan=n
c) Both A and B
d) None of these
Ans. b
179. To set the font for a single link, where do you add the <font></font> tags?
a) In the <head> tag
b) Outside the <a> and </a> tags
c) Inside the <a> and </a> tags
d) None of these
Ans. c
180. which tag tells where a link starts?
a) <a>
b) <i>
c) <body>
d) none of these
Ans. a
181. What is the use of <iframe> tag in html?
a) Display a webpage inside a web page.
b) To make a photo frame
c) To make a photo border
d) To make an image clickable
Ans. a
182. The attribute used choose the type of font in HTML is?
a) Character
b) Face
c) Text-type
d) All of these
Ans. b
183. To start a list at the count of 3, use
a) <ol begin= “3”>
b) <ol list= “3”>
c) <ol start= “3”>
d) <ol num= “3”>
Ans. c
184. To change the size of an image in HTML, use
a) Pliers
b) Bigger and smaller
c) Top and Bottom
d) Height and width
Ans. d
185. All HTML documents will be basically
a) Graphs
b) Text
c) Pictures
d) None of these
Ans. b
186. Which of these is not a valid HTML?
a) <fontface= “verdana”>
b) <font face= “verdana”>
c) <font face = “verdant, arial”>
d) All of these
Ans. a
187. To create a list using lowercase letters, use
a) <ol “a”>
b) <ol = “a”>
c) <ol letter=”a”>
d) <ol type = “a”>
Ans. D
188. Defining clickable subareas on an image is called
a) image linking
b) multiple mapping
c) image mapping
d) none of these
Ans. c
189. The HTML tags are ______
a) in lower case
b) in upper case
c) case sensitive
d) not case sensitive
Ans. D
190. When images are used as links they get a blue border
. a) Always
b) Never
c) Unless border is set to zero
d) none of these
Ans. c
191. To start a numbered list with regular numerals, use
a) <ul type= “1”>
b) <ol type= “a”>
c) <ol typ
d) <ol type= “1”>
Ans. D
192. The format of the <base> tag is
a) <href = “ URL”> b) <base = “URL”>
c) <base URL =>
d) <base href = “https://www.myheetson.blogspot.com>
Ans. D
193. The default value of Border attribute is
a) 1 pixel
b) 2 pixel
c) pixel
d) 4 pixel
Ans. A
194. To set the color for table borders, use____
a) bgcolor= #003300
b) bgimage= #112233
c) bordercolor= #112233
d) tablecolor= # 003344
Ans. C
195. All normal webpages consists of
a) Top and bottom
b) Body and frameset
c) Head and Body
d) None of these
Ans. c
196. The most basic element of any html page is
a) ASCII text
b) text
c) BCD text
d) None of these
Ans. a
197. To separate single list, use
a) <ol> and </ol>
b) <ul> and </ul>
c) <li> and </li>
d) All of these
Ans. c
198. HTML is simple than
a) SGML
b) CTML
c) STML
d) None of these
Ans. A
199. Why should you specify a background color if you are using an image for the actual background of your page?
a) So the text shown up better
b) In case the image doesn‟t fit right
c) The background color will be shown until the image loads
d) None of these
Ans. C
200. Which attribute is used to name an element uniquely?
a) class
b) id
c) dot
d) all of these
Ans. b
201. Marquee is a tag in HTML to
a) Display text with scrolling effect
b) Mark the list of items to maintain inqueue
c) Mark the text so that it is hidden in browser
d) Display text with strikeout effect
Ans. A
202.The top portion of a HTML document containing many meta items and script functions is called
(a) < HTML > ::: < /HTML >
(b) < HEAD > ::: < /HEAD >
(c) < TITLE > ::: < /T ITLE >
(d) < BODY > ::: < /BODY >
Ans. B
203. The main portion of a HTML document is contained between____ tags.
(a) < HTML > ::: < /HTML >
(b) < HEAD > ::: < /HEAD >
(c) < TITLE > ::: < /T ITLE >
(d) < BODY > ::: < /BODY >
Ans. D
204. What is the full form of HTML?
a) Hyper text markup language
b) Higher text markup language
c) Higher text machine language
d) hyper text machine language
Ans. a
205. XHTML stands for
a) Extensible Hypertext markup language
b) Extensible hypertext marking language
c) Extensible hypertext marking line
d) None of these
Ans. A
206. What is the role of charset attribute?
It specifies
a) a scheme to be used to interpret the value of the content attribute
b) a name for the metadata
c) the character encoding for the HTML document
d) none of these
Ans. C
207. HTML document is contained inside a set of______ tags.
(a) < HTML > ::: < /HTML >
(b) < HEAD > ::: < =HEAD >
(c) < TITLE > ::: < =T ITLE >
(d) < BODY > ::: < =BODY >
Ans. a
DHTML
MCQ Questions:
PREPARED
BY PODMESWAR BORA
1. What is the full form of DHTML?
(a) Distinguished Hyper Text Makeup
language
(b) Distributed Hyper Transmission
Make-up logistics
(c) Dynamic Hyper Text Markup
Language
(d) None of the above
Answer: (c) Dynamic Hyper Text Markup
Language
2. What kind of term DHTML is?
(a) Collective term
(b)Informative term
(c) Umbrella term
(d) Financial term
Answer: (c) Umbrella term
3. Which kind of scripting language
is DHTML?
(a) Client side
(b) Server side
(c) Both (i) and (ii)
(d) None of the above
Answer: (a) Client side
4. DHTML consists of which two
components together?
(a) Java and HTML
(b) JavaScript and HTML
(c) XML and XHTML
(d) HTML and CSS
Answer: (b) JavaScript and HTML
5. What kind of pages gets created
from DHTML?
(a) Static
(b) Dynamic
(c) Hyper
(d) Global
Answer: (b) Dynamic
6. The attribute which is not
involved in <layer> is:-
(a) id
(b) tag
(c) align
(d) width
Answer: (c) align
7. DOM which is used in DHTML stands
for:
(a) Data object Manipulation
(b) Dynamic object method
(c) Document object mass
(d) Document object model
Answer: (d) Document object model
8. DHTML is not a standardized
language for which company?
(a) Microsoft
(b) Oracle
(c) W3schools
(d) Facebook
Answer: (b) Oracle
9. What is the event name which gets
triggered when the submit button is pressed on the form?
(a) onkeypress()
(b) onresume()
(c) onsubmit()
(d) onload()
Answer: (c) onsubmit()
10. Which elements JavaScript allows
to control in DHTML?
(a) XML elements
(b) HTML elements
(c) XHTML elements
(d) CSS elements
Answer: (b) HTML elements
Java
Basic:
1. Which of the following will produce a value of 22 if x=22.9:
(a) Ceil(x)
(b) Round(x)
(c) Rint(x)
(d) Abs(x)
Answer: (c) Rint(x)
2. If m and n are int type variables, what will be the result of the expression
'm % n' when m = -14 and n = -3?
(a) 4
(b) 2
(c) -2
(d) -4
Answer: (c) -2
3. Consider the following statements:
int x = 10, y = 15;
x = ((x < y) ? (y + x) : (y - x);
What will be the value of x after executing these statements?
(a) 25
(b) 15
(c) 5
(d) Error can't be executed.
Answer: (a) 25
4. Which of the following will produce a value of 10 if x = 9.7?
(a) floor(x)
(b) abs(x)
(c) rint(x)
(d) round(x)
Answer: (d) round(x)
5. Which of the following control expressions are valid for an if statement?
(a) an integer expression
(b) a Boolean expression
(c) either A or B
(d) Neither A or B
Answer: (b) a Boolean expression
6. Consider the following class definition.
Class Student extends String
{
}
What happens when we try to compile this class?
(a) Will not compile because class body is not defined
(b) Will not compile because class is not declared public
(c) Will compile successfully.
(d) Will not compile because String is abstract
Answer: (d) Will not compile because String is abstract
7. What is wrong in the following class definitions?
abstract class print {
abstract show();
}
class Display extends print {
}
(a) Nothing is wrong
(b) Wrong Method show() should have a return type
(c) Wrong Methods show() is not implemented in Display
(d) Wrong Display does not contain any members.
Answer: (c) Wrong Methods show() is not implemented in Display
8. What is error in the following class definitions?
abstract class xy {
abstract sum(int x, int y) {
}
}
(a) class header is not define properly
(b) constructor is no defined
(c) method is not defined properly
(d) no error
Answer: (c) method is not defined properly
9. Consider the following class definitions:
class maths {
student student1;
}
class student {
String name;
}
This code represents:
(a) an 'is a' relationship
(b) a 'has a' relationship
(c) both
(d) neither
Answer: (b) a 'has a' relationship
10. Which key word can protect a class in package from accessibility by the classes outside the package?
(a) private
(b) protected
(c) final
(d) don't use any keyword at all(make it default)
Answer: (d) don't use any keyword at all(make it default)
11. We would like to make a member of a class visible in all subclasses regardless of what package they are in. Which one of the
following keywords would achieve this?
(a) private
(b) protected
(c) public
(d) private protected
Answer: (d) private protected
12. The use of protected keyword to a member in a class will restrict its visibility as follows:
(a) Visibility only in the class and its subclasses in the same package.
(b) Visibility only inside the same package.
(c) Visibility in all classes in the same package and subclasses in other packages.
(d) Visibility only in the class where it is declared.
Answer: (c) Visibility in all classes in the same package and subclasses in other packages.
13. Which of the following are not keywords?
(a) NULL
(b) Implements
(c) Protected
(d) None of the above
Answer: (a) NULL
14. Which of the following are keywords?
(a) integer
(b) default
(c) Boolean
(d) Object
Answer: (b) default
15. Which of the following keywords are used to control access to a class member?
(a) default
(b) protected
(c) interface
(d) None of the above
Answer: (b) protected
16. The keywords reserved but not used in the initial version of Java re:
(a) Synchronized
(b) Boolean
(c) union
(d) goto
Answer: (d) goto
17. A package is a collection of
(a) classes
(b) interface
(c) editing tools
(d) classes and interfaces
Answer: (d) classes and interfaces
18. Which of the following statements are true?
(a) An abstract class may not have any final methods?
(b) A final class may not have any abstracts methods.
(c) Transient variables must be static.
(d) all of the above
Answer: (b) A final class may not have any abstracts methods.
19. The concept of multiple inheritance is implemented in Java by
(a) extending two or more classes
(b) extending one class and implementing one or more interfaces
(c) all the above
(d) None of the above
Answer: (b) extending one class and implementing one or more interfaces
20. Which of the following statements are valid array declarations?
(a) int number();
(b) float average[];
(c) double[] marks;
(d) counter int[];
Answer: (b) float average[];
21. Which of the following classes are available in the java.lang package?
(a) Random
(b) Stack
(c) String Buffer
(d) Vector
Answer: (a) Random
22. Which of the following are the wrapper classes?
(a) Random
(b) Vector
(c) Byte
(d) all of the above
Answer: (c) Byte
23. Which of the following methods belong to the String class?
(a) length()
(b) compareTo()
(c) substring()
(d) all of the them
Answer: (d) all of the them
24. Given the code
String s = new String("abc");
Which of the following calls are valid?
(a) s.toUpperCase()
(b) s.append("xyz")
(c) s.setCharAt(1<'A')
(d) all of the above
Answer: (a) s.toUpperCase()
25. The methods wait() and noify() are defined in
(a) java.lang.Thread
(b) java.lang.Runnable
(c) java.lang.Object
(d) java.lang.ThreadGroup
Answer: (c) java.lang.Object
26. When we invoke repaint () for a Component, the AWT invokes the method:
(a) draw()
(b) update()
(c) show()
(d) paint()
Answer: (b) update()
27. What does the following line of code do?
TextField text=new TextField(10);
(a) Creates text object that can hold 10 rows of text.
(b) Creates text object that can hold 10 columns of text.
(c) Creates the object text and initializes it with the value 10.
(d) The code is illegal.
Answer: (b) Creates text object that can hold 10 columns of text.
28. Which of the following methods can be used to draw the outline of a square?
(a) fillRect()
(b) drawLine()
(c) drawString()
(d) all of the above
Answer: (b) drawLine()
29. Which of the following methods can be used to change the size of a
size() *
resize()
(a) component
(b) dimension()
(c) setSize()
(d) size()
Answer: (c) setSize()
30. Which of the following methods can be used to remove a component from the display?
(a) remove()
(b) desappear()
(c) hide()
(d) move()
Answer: (c) hide()
No comments:
Post a Comment