CBSE Important Questions

CBSE Guess > Papers > Important Questions > Class XII > 2013 > Multimedia & Web Technology > Multimedia & Web Technology - by Mr. Amrit Chhetri

CBSE CLASS XII

Multimedia & Web Technology

Previous Index Next

Q. 10. Write the ASP code that will read the text file called TextFiles.txt, and counts the number of spaces inside the file.

ANSWER-Q5.10:

<%
dim FS, RS, words, count
Set FS = Server.CreateObject("Scripting.FileSystemObject")
Set RS = FS.OpenTextFile(Server.MapPath("TextFiles") & "\TextFile.txt",1)
while not RS.atendofstream
words= RS.read(1)
if words = “ “ then
count = count + 1
end if
wend
response.write(“total number of space=” , count)
myfile.close
%>

SECTION-6 ( WEB DEVELOPMENT-HTML AND VBSCRIPTS (IV) -10/40 MARKS) :-

Q. 1. What are the differences between Local and Global Variables?

ANSWER-Q6.1:
The difference between Local and Global Variables are give below:

Local variable Global
It is declared inside a procedure. It is declared outside a procedure.
It can be accessed only inside a particular procedure. It is valid for all the procedure function.

Q. 2. Differentiate between Client-Scripts and Server-Side Scripts:

ANSWER-Q6.2:
The Client Side Scripts are the scripts that are executed in a browser environment and responsible for sending the requests to the web server where as Server-Side Scripts are those scripts which are executed inside a web-server environment. VBScript is client side Script and ASP is the Server-Side Script.

Q. 3. Rewrite the following code using DO WHILE instead of FOR LOOP without affecting the output:

<SCRIPT LANGUAGE = "VBScript" >
DIM A, B, C, Count
A = 0
B = 1
FOR Count = 3 TO 10 STEP 2
C = A+B
Document.Write ("FOR" & C & " ")
A = B
B = C
NEXT
</SCRIPT>

ANSWER-Q6.3:

<SCRIPT LANGUAGE = "VBScript" >
DIM A, B, C, Count
A = 0
B = 1
Count = 3
DO WHILE Count < 10
C=A+B
Document. Write ("DO-WHILE"& C &" " )
A = B
B = C
Count=Count+2
LOOP
</SCRIPT>

 

Previous Index Next

Submitted By : Mr. Amrit Chhetri
Computer Science Trainer/Educator, Principal Business Consultant, Social Media Strategist
Mobile : +91-9911290373, +91-9717346736
Twitter : http://twitter.com/AmritChhetriB
Facebook : https://www.facebook.com/AmritChhetriB