VBScript Multiple choices


Total available count: 25
Subject - Scripting Languages
Subsubject - VBScript

What is the use of the Chr() function in VBScript?


 

 

 

 



B


Solution:-

The Chr function:
The Chr function converts the specified ANSI character code to a character. 

Note: The numbers from 0 to 31 represent nonprintable ASCII codes, i.e. Chr(10) will return a linefeed character.

The Chr function Syntax is as below:
Chr(charcode)

charcode    -    A number that identifies a character and it is Required. 

The Chr function Examples are as follows:
Example-1

<%

response.write(Chr(97) & "<br />")
response.write(Chr(98) & "<br />")
response.write(Chr(99) & "<br />")
response.write(Chr(65) & "<br />")
response.write(Chr(66) & "<br />")
response.write(Chr(67) & "<br />")

%>

The output of the above code will be as below:

a
b
c
A
B
C

Example-2

<%

response.write(Chr(34) & "<br />")
response.write(Chr(35) & "<br />")
response.write(Chr(36) & "<br />")
response.write(Chr(37) & "<br />")

%>

The output of the above code will be as below:

"
#
$
%




Next 5 multiple choice(s)

1

What is the use of the Asc() function in VBScript?

2

What is the use of the Len() function in VBScript?

3

What is the use of Mid() function in VBScript?

4

What is the use of Spaces() function in VBScript?

5

What is the use of the Trim() function in VBScript?

Comments