17uca5c10 - Scripting Languages

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Subject Code: 17UCA5C10

JAMAL MOHAMED COLLEGE


TIRUCHIRAPPALLI-620 020
Objective Type Questions
Department of Information Technology
Semester: V UG / PG: UG

Title of the Paper:SCRIPTING LANGUAGES

1. JavaScript is language
a. Scripting b. Object Oriented program
c. Programming d. Application

2. JavaScript is created by
a. Microsoft Corporation b. Netscape
c. Firebox d. Google Chrome

3. JavaScript is designed for following purpose


a. To Style HTML Pages
b. To add interactivity to HTML Pages.
c. To Perform Server Side Scripting Operation
d. To Execute Query Related to DB on Server
4. keyword is used to declare variables in JavaScript.
a. Var b. Dim
c. String d. None of the above

5. What should appear at the very end of your JavaScript?

The <script LANGUAGE="JavaScript">tag


a. The </script> b. The <script>
c. The END statement d. None of the above

6. Which format is used for conditional operator?

a. (condition) value1; value 2 b. a. (condition)? value1; value 2


c. (condition)? value1: value 2 d. None of these

7. "Add and Assignment" operator is shown by this symbol.

a. +== b. += c. ==+ d.=+

8. Which of the following is not a logical operator?

1
a. && b.|| c.! d.|

9. Which of the following operator is used to concatenate two strings.

a.Dot b.Arrow c.Comma d.Plus

10. "++" can operate only on .


a.Constants b. Variables c. Text d. None of these
11. What will be the output of the following script?

<!DOCTYPE html>
<html>
<body>
<script>
var x = 5;
document.write(x === "5");
</script>
</body>
</html>
a. 5 b. true c. 1 d. false
12. How would one declare a string variable?

a. All of these b. var fName = “Mary”;


c. var names = “7”; d. var fName = new String(“Mary”);

13. The “if” statement is used to:

a. Deal with logic that should execute only when a condition is false
b. Convert an integer value to a boolean
c. Create a loop that runs as long as a condition is true
d. Deal with logic that should execute only when a condition is true

14. What is the value of the following expression: 8 % 3

a. 5 b. 2 c. 24 d. Other/Error

15. How do you define a function called “fName”?

a. function fName: { } b. func fName = function () {}


c. function fName() { } d. new fName = { }

2
16. Which of the following is not a reserved word?

a. throw b. void c. program d. return

17. What is the value of (“Jamal”.length)?

a. 4 b. 5 c. 0 d. 6
18. In an array object, what is the key of the first value?

a. 0 b. $ c. 1 d. -1
19. What does the “break” statement do?

a. Cancels the current event. b. Aborts the current function.


c. Aborts the current loop or switch statement. d. Simulates a JavaScript crash.

20. What character ends a javascript statement?

a. An exclamation mark “!”. b. A semicolon “;”.


c. A period “.”. d. A colon “:”.

21. The function definition in javascript begins with

a. Identifier and Parantheses b. Return type and Identifier


c. Return type, Function keyword, Identifier and Parantheses
d. Identifier and Return type

22. What is the purpose of return statement in a function?

a. Returns the value and continues executing rest of the statements, if any
b. Returns the value and stops the program
c. Returns the value and stops executing the function
d. Stops executing the function and returns the value
23. A ............................ mostly used to take users choice on any option and displays a

dialog box with two buttons Ok and Cancel.


a. Alert dialog box b. Information dialog box
c. Prompt dialog box d. Conformation dialog box
24. box is used to display warning information in the web page
a. Alert dialog box b. Information dialog box
c. Prompt dialog box d. Conformation dialog box
25. DOM expands

a. Document Object Model b. Distributed Object Method


c. Document Oriented Model d. None of these

3
26. What is the correct JavaScript syntax to write "Hello World"?

a. System.out.println("Hello World") b. println ("Hello World")


c. document.write("Hello World") d. response.write("Hello World")
27. The syntax of a blur method in a button object is

a. Blur() b. Blur(contrast)
c. Blur(value) d. Blur(depth)
28. <script type="text/javascript">

x=4+"4";
document.write(x);
</script>
a. 44 b. 8 c. 4 d. Error output
29. What is mean by "this" keyword in JavaScript?

a. It refers current object b. It refers previous object


c. It is variable which contains value d. None of the above
30. The setTimeout() belongs to which object?

a. Element b. Window
c. Location d. None of the mentioned
31. In general, event handler is nothing but

a. function b. interface c. event d. handler


32. Which event is fired when a document and all of its external resources are fully loaded

and displayed to the user?


a. Window b. Load c. Element d. Handler
33. When are the mouse events generated?

a. When user clicks the mouse over a document


b. When user moves over a document
c. All of the mentioned
d. None of the mentioned
34. Which are the events that have default actions that can be cancelled by event handlers?

a. Submit and form-related events b. Reset and form-related events


c. Submit and reset events d. None of the mentioned
35. When are the keyboard events fired?

a. When user manually calls the button


b. When user clicks a key
c. When the user calls the modifier
d. All of the mentioned

36. Which is not included the event handlers

4
a. onClick c. onMouse
b. onReset d. onResize

37. Find out the ODD one

a. TextArea c. TextField
b. Clear d. Reset

38. is an array of all plug-ins supported by a browser.


a. Forms Array c. Plugins Array
b. Anchor Array d. Applet Array

39. The is used to access information about the browser that is executing
the current script.
a. Window c. Navigator
b. History d. Event

40. Which syntax is used to reference the method

a. Objet_Name.method_name c. Method_name . Object_Name


b. Method_Name d. None of these

41. Form which tag descriptive list start?

a. <LL> b)<DD> c) <DL> d) <DS>

42. WWW is based on which model?


a. Local – server b) Client – server c) 3 – Tier d) None of these

43. Web pages starts with which of the following tag?


a. <Body> b)<Title> c)<HTML> d)<Form>

44. Java Script enables to embed small program code in which page?
a. DHTML b) HTML c) XML d) XHTML

45. Java Script also provides objects that encapsulate various in a script?
a.. Properties b) String (or) Boolean
c) Object and Methods d) Attributes and methods

46 ---------------------------Java Script is also called client-side Java Script?


a. Microsoft b) Navigator c)Like wire d) Native

47. Choose the Server – Side Java Script object?


a. File upload b)Function c) File d) Date

48. Java Script is interpreted by


a. Client b) Server c) Object d)None of the Above
5
49. Choose the client-side Java Script object:
a. Database b) Cursor c) Client d) File upload

50. Java Script is.


a. Subjective b) Objective c) Evil d) Object based

51. The .................................... attribute of an object specifies whether the value of the
property can be set.
a. Readable b) Writable c) Enumerable d) Configurable

52. A ................................ object is any object created by the execution of JavaScript code.
a.) Native b) Host C) User defined d) Remote

53. Object .................................... is the process of converting an object’s state to a string


from which it can later be restored.

a. Prototype b) Class c) Extensible d. Serialization

54. Cookies were originally designed for


a. Client – Side b) Server–side programming
c )Both a and b d) None of the above

55. The Cookie manipulation is done using which property?


a). cookie b) cookies c) manipulate d) None of these

56. Which is not a primitive data type in java Script?


a. Boolean b) Number c) String d) Character

57. Which of the following is not a reserved word?


a. Throw b) void c) Program d) return

58. Which keyboard character represents the assignment operator?


a. ! b)? c) # d) =

59. Which of the following defines the Cookie visibility?


a. Document Path b)LocalStorage c)SessionStorage d)All of the above

60. Which of the following is a Boolean cookie attribute?


a. Bool b)Secure C) Lookup d) Domain

61. Which of the following function of VBScript converts a given number of any variant

subtype to Single?
a) CDbl b) CInt c) CLng d) CSng

62. How will you compare two strings in VBScript?

a) Using StrComp function b) Using Compare function


c) Using InStr function d) Using InStrRev function

6
63. What is the datatype of a variable in VBScript?

a) String b)Variant c) CLng d) CSng

64. What is the purpose of the Set keyword in VBScript?


a) Assign a value to any variable b) Assign a value to an object variable
c) Declare an array d) Configure the VBScript program

65. Which VBScript function can compare two strings?

a) StringCompare b)Compare c) StrComp d) StrCompare

66. VBScript is provided by


a) IBM b) Sun Microsystem c) Microsoft d) Google

67. Visual Basic is a tool that allows you to develop application in

a) Real time b) Graphical User Interface c) Menu Drivend) None of the These

68. IDE stands for

a) InternetDevelopmentEnvironment
b) IntegratedDualEnvironment
c) IntegratedDevelopmentEnvironment
d) Integrated Desktop Environment

69. Which of the following windows is the central to the development of Visual Basic

applications.
a) Project Window b)Form Window
c) Properties Window d)All of the above

70. In window we can write code


a) Immediate window b) Local window c) Code
editor window d) None of these

71. control is used to provide an identifiable grouping for other controls


a) Frame b) Label c) List box d) command button
72. Control is used to display text, but user cannot change it directly.
a) Textbox b) Labelbox c) List box d) command button

73. The default data type Visual Basic is

a) Integer b) Boolean c) Variant d) String

7
74. VB script was launched in.
a)1994 b)1996 c)1993 d)1999

75. The variable does not change the value during execution of program is.
a) Numeric b) Constant c) String d) None of the above

76. Visual Basic tool that allows you to develop application is.
a) Real time b) Character User Interface
c) Graphical User Interface d) None of these

77. is used for finding about objects,properties and methods.


a) Object Browser b) Form.Layout.Window
c) Code d) Editor

78. The Function, which returns the current system date


a) CDate b) Date c) Day d) Date.add

79. The Function, which returns the current system time


a) Second b) Time c) Hour d) Minute

80. Which returns the time for the specific input of hour,minute and second.
a) Second b) Timer c) Timevalue d) TimeSerial

81. Script runs when a mouse click.


a) Click b) One Click c) onclick d) Double Click

82. The Form is submitted by clicking on Submit button ------------ box appears.
a) Validate b) Event c) Circle d) Message

83. Script runs when the element changes.


a) onsubmit b)onchange c) onkeyup d)onblur

84. Each event can be handled by writing some


a) Code b)Case c) Control d)Context

85. The ActiveX objects are identified by


a) Programid b)Clsid c) Class d) Controlid

86. Easily change the properties of an


a)ActiveX control b)Directive c) Massive d)Passive

87. Script runs when key is pressed and released


a) onmousemove b) onkeyup c) onclick d) onkeypress

88. Script runs when mouse button is pressed


a) onmousedown b) onemouse c) click d) onfocus

89. Microsoft VBScript runtime Object doesn't support


a) property or method b) property c) method d) variables

90. Script runs when mouse button is released


a)onkeyup b) onkey
c) onmouseup d) onmouseout

8
91. Microsoft COM is a standard for defining API object
a) Component Object Model b) Component
c) Component Model d) Compont

92. VBScript to access the which object model


a) WSH b) WAH c) WDD d) WAS

93. Each scripting language is a


a) separate component b) component
c) Compare d) Console

94. Placing VBScript Code Within an ----------- Document -


a) XML b) HTML c) DHTML d) XHTML

95. Select the control and move it with the ARROW keys
a) ARROW b)CIRCLE c)PASSIVE d) ACTIVE

96. Although server-side VBScript can be ---------


a) Server b) browser-independent
c) Client d) Data – independent

97. Active Scripting language is developed by


a) Microsoft b) IBM c) Oracle d) Infosys

98. Docklight Scripting also comes with a number of ----------- scripts.


a) Compare b) Sample c) Simple d) Collective

99. Converts an expression to a variant of subtype Boolean


a) CBool b) CCur c) CDate d) Asc.

100. Converts the specified ANSI code to a Character


a) Clnt b) Chr c) CLng d) Cbyte

Answer:

1. a. Scripting
2. b. Netscape
3. b. To add interactivity to HTML Pages.
4. a.var
5. a.The </script>
6. c. (condition)? value1: value 2
7. b. +=
8. d. |
9. d. Plus

9
10. b. Variables
11. d. false
12. a. All of these
13. d. Deal with logic that should execute only when a condition is true
14. c. 2
15. c. function fName() { }
16. c. program
17. b. 5
18. a. 0
19. c. Aborts the current loop or switch statement.
20. b. A semicolon “;”.
21. a. Identifier and Parantheses
22. d. Stops executing the function and returns the value
23. d. Conformation dialog box
24. a. Alert dialog box
25. a. Document Object Model
26. c. document.write("Hello World")
27. a. Blur()
28. a. 44
29. a. It refers current object
30. b. Window
31. a. function
32. b. Load
33. a. When user clicks the mouse over a document
34. c. Submit and reset events
35. b. When user clicks a key
36. c. onMouse
37. b. Clear
38. c. Plugins Array
39. b. History
40. a. Objet_Name.method_name
41. c) <DL>
42. b) Client – server
43. c) <HTML>
44. b) HTML
45. d) Attributes and methods

10
46. b) Navigator
47. c) File
48. a) Client
49. d) File upload
50. d) Object based
51. b) Writable
52. c) User defined
53. d) Serialization
54. b) Server – side Programming
55. a) cookie
56. b) Number
57. c) Program
58. d) =
59. d)All of the above
60. b) Secure
61. d) CSng
62. a) Using StrComp function
63. b) Variant
64. b) Assign a value to an object variable
65. c) StrComp
66. c) Microsoft
67. b) Graphical User Interface
68. c)IntegratedDevelopmentEnvironment
69. b) Form Window
70. c) Code editor window
71. a) Frame
72. b) Labelbox
73. c) Variant
74. b)1996
75. b) Constant
76. c) Graphical User Interface
77. a) Object Browser
78. b) Date
79. b) Time
80. d) TimeSerial
81. c) onclick

11
82. d) Message
83. b) onchange
84. a) Code
85. b) Clsid
86. a) ActiveX control
87. d) onkeypress
88. a) onmousedown
89. a) property or method
90. c) onmouseup
91. a) Component Object Model
92. a) WSH
93. a) separate component
94. b) HTML
95. a) ARROW
96. b) browser-independent
97. a) Microsoft
98. b) Sample
99. a) CBool
100. b) Chr

12

You might also like