MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

WEB TECHNOLOGY

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What is the datatype of a variable in VBScript?
A
String
B
Variant
C
It is the datatype specified when that variable is declared.
D
None of the above
Explanation: 

Detailed explanation-1: -A Variant is a special kind of data type that can contain different kinds of information, depending on how it’s used. Because Variant is the only data type in VBScript, it’s also the data type returned by all functions in VBScript. At its simplest, a Variant can contain either numeric or string information.

Detailed explanation-2: -The TypeName function returns the subtype of a specified variable. The TypeName function can return one of the following values: Byte-Indicates a byte value.

Detailed explanation-3: -This section provides a quick introduction of VBScript data type, Variant, a list of subtypes: byte, integer, long, single, double, currency, string, Boolean, date, object, error, empty, and null.

Detailed explanation-4: -Variables may be classified into two main categories: categorical and numeric. Each category is then classified in two subcategories: nominal or ordinal for categorical variables, discrete or continuous for numeric variables.

Detailed explanation-5: -Assigning Values to Variables in VBScript After the declaration of a variable, a value is assigned to it with the help of an Equal (=) Operator. Name of the Variable comes on the left and the value which is assigned to the Variable is on the Right Hand Side of the ‘=’ Operator.

There is 1 question to complete.