0% found this document useful (0 votes)
102 views7 pages

Department of Computer Science and Engineering: Unit II - MCQ Bank

This document contains 30 multiple choice questions about various topics related to internet programming including: 1. JavaScript data validation constructs 2. JavaScript code portability across operating systems 3. Ways to call JavaScript code 4. Attributes used to include external JavaScript code in HTML 5. Characteristics of a proper scripting language The questions cover topics like JavaScript expressions, variables, operators, loops, exceptions, JSON, and SQL including concepts like data types, constraints, and operations for deleting or truncating database tables.

Uploaded by

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

Department of Computer Science and Engineering: Unit II - MCQ Bank

This document contains 30 multiple choice questions about various topics related to internet programming including: 1. JavaScript data validation constructs 2. JavaScript code portability across operating systems 3. Ways to call JavaScript code 4. Attributes used to include external JavaScript code in HTML 5. Characteristics of a proper scripting language The questions cover topics like JavaScript expressions, variables, operators, loops, exceptions, JSON, and SQL including concepts like data types, constraints, and operations for deleting or truncating database tables.

Uploaded by

Ramesh Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

ChettinadTech Dept of CSE

Department of Computer Science and Engineering


CS8651 – INTERNET PROGRAMMING
Unit II - MCQ Bank
1. The web development environment (JavaScript) offers which standard construct for data
validation of the input entered by the user.
a) Controlled loop constructs
b) Server page access
c) Client side Event
d) Permit server-side
Answer: a
2. A JavaScript program developed on a Unix Machine ________
a) will throw errors and exceptions
b) must be restricted to a Unix Machine only
c) will work perfectly well on a Windows Machine
d) will be displayed as a JavaScript text on the browser
Answer: c
3. JavaScript Code can be called by using ____________
a) RMI
b) Triggering Event
c) Preprocessor
d) Function/Method
Answer: d
4. Which of the following Attribute is used to include External JS code inside your HTML
Document?
a) src
b) ext
CS8651 – INTERNET PROGRAMMING Page 1
ChettinadTech Dept of CSE

c) script
d) link
Answer: a
5. A proper scripting language is a __________
a) High level programming language
b) Assembly level programming language
c) Machine level programming language
d) Low level programming language
Answer: a
6. The property of a primary expression is ____________
a) stand-alone expressions
b) basic expressions containing all necessary functions
c) contains variable references alone
d) contains only keywords
Answer: a
7. “An expression that can legally appear on the left side of an assignment expression.” is a well
known explanation for variables, properties of objects, and elements of arrays. They are called
a) Properties
b) Prototypes
c) Lvalue
d) Definition
Answer: c
8. The type of a variable that is volatile is _______________
a) Volatile variable
b) Mutable variable
c) Immutable variable
d) Dynamic variable
Answer: b
9. The generalised syntax for a real number representation is __________

CS8651 – INTERNET PROGRAMMING Page 2


ChettinadTech Dept of CSE

a) [digits][.digits][(E|e)[(+|-)]digits]
b) [digits][+digits][(E|e)[(+|-)]digits]
c) [digits][(E|e)[(+|-)]digits]
d) [.digits][digits][(E|e)[(+|-)]digits]
Answer: a
10. JavaScript _________ when there is an indefinite or an infinite value during an arithmetic
computation.
a) Prints an exception error
b) Prints an overflow error
c) Displays “Infinity”
d) Prints the value as such
Answer: c
11. The statement a===b refers to _________
a) Both a and b are equal in value, type and reference address
b) Both a and b are equal in value
c) Both a and b are equal in value and type
d) There is no such statement
Answer: c
12. Assume that we have to convert “false” that is a non-string to string. The command that we use
is (without invoking the “new” operator).
a) false.toString()
b) String(false)
c) String newvariable=”false”
d) Both false.toString() and String(false)
Answer: d
13. A conditional expression is also called a _______________
a) Alternative to if-else
b) Immediate if
c) If-then-else statement

CS8651 – INTERNET PROGRAMMING Page 3


ChettinadTech Dept of CSE

d) Switch statement
Answer: b
14. The “var” and “function” are __________
a) Keywords
b) Declaration statements
c) Data types
d) Prototypes
Answer: b
15. The enumeration order becomes implementation dependent and non-interoperable if_____
a) If the object inherits enumerable properties
b) The object does not have the properties present in the integer array indices
c) The delete keyword is never used
d) Object.defineProperty() is not used
Answer: a
16. What are the three important manipulations done in a for loop on a loop variable?
a) Updation, Incrementation, Initialization
b) Initialization,Testing, Updation
c) Testing, Updation, Testing
d) Initialization,Testing, Incrementation
Answer: b
17. What will be the step of the interpreter in a jump statement when an exception is thrown?
a) The interpreter stops its work
b) The interpreter throws another exception
c) The interpreter jumps to the nearest enclosing exception handler
d) The interpreter throws an error
Answer: c
18. The object has three object attributes namely ________
a) Class, parameters, object’s extensible flag
b) Prototype, class, objects’ parameters

CS8651 – INTERNET PROGRAMMING Page 4


ChettinadTech Dept of CSE

c) Prototype, class, object’s extensible flag


d) Native object, Classes and Interfaces and Object’s extensible flag
Answer: c
19. To determine whether one object is the prototype of (or is part of the prototype chain of) another
object, one should use the ____________
a) isPrototypeOf() method
b) equals() method
c) === operator
d) ==operator
Answer: a
20. The basic purpose of the toLocaleString() is to _________
a) return a localised object representation
b) return a parsed string
c) return a local time in the string format
d) return a localized string representation of the object
Answer: d
21. If you have a function f and an object o, you can define a method named m of o with ________
a) o.m=m.f;
b) o.m=f;
c) o=f.m;
d) o=f;
Answer: b
22. JSON Stands for _____________
a) Java Standard Output Network
b) JavaScript Object Notation
c) JavaScript Output Name
d) Java Source Open Network
Answer: a
23. Which of the following is not a type in JSON?

CS8651 – INTERNET PROGRAMMING Page 5


ChettinadTech Dept of CSE

a) date
b) Object
c) Array
d) String
Answer: a
24. Which of following statement is false about the space parameter in JSON.stringify()?
a) It controls spacing in the resulting JSON string
b) It is an optional parameter
c) It removes whitespace
d) All are false
Answer: c
25. Can you use a double quote inside a JSON string?
a) No, you should use single quotes
b) Yes, if you use the ascii code.
c) Yes, if it is escaped like ( \" )
d) Yes, you can use it without any special treatment
Answer: c
26. The MIME type of JSON is____________
a) application/json
b) application/x-json
c) application/javascript
d) text/json
Answer: a
27. What is the full form of SQL?
a) Structured Query List
b) Structure Query Language
c) Sample Query Language
d) None of these.
Answer: b

CS8651 – INTERNET PROGRAMMING Page 6


ChettinadTech Dept of CSE

28. Which statement is used to delete all rows in a table without having the action logged?
a) DELETE
b) REMOVE
c) DROP
d) TRUNCATE
Answer: d
29. Which of the following is not Constraint in SQL?
a) Primary Key
b) Not Null
c) Check
d) Union
Answer: d
30. Which of the following statement is true?
a) TRUNCATE free the table space while DELETE does not.
b) Both TRUNCATE and DELETE statements free the table's space.
c) Both TRUNCATE and DELETE statement does not free the table's space.
d) DELETE free the table space while TRUNCATE does not.
Answer: a

CS8651 – INTERNET PROGRAMMING Page 7

You might also like