Thursday, August 4, 2022

Web Systems Technologies

 IT6303 - Web Systems Technologies


In naming a variable in PHP what is the required Special Character?

$ (Dollar Sign)

Which of the following is not a commenting style?

%            %

This is the command to display the value stored in the variable.

Echo

This are statements that make decision.

Conditional Statement

This are statement that performs preset of tasks.

Functions

Which of the following is not recommended feature in choosing a script editor?

None of the Choices

Which of the following does not belong to the group?

\\AMA-PC1\user

How will you end a statement in PHP?

by putting a semicolon (;)

Which of the following is a Free PHP Editor?

Komodo Edit

This are statements that performs repetitive tasks.

Loops

It holds multiple values.

Arrays

It is a server side scripting language that is designed to be embedded because it is mixed in the HTML Markup. This Language can process and email contact forms, upload & file from online forms, generate thumbnails for large images, watermark images, read and write files and communicate with a database.

PHP

Which of the following is the open and closing tags of PHP?

<?php    ?>

This are made up of both prescribed pattern to structure and organize your code and pre-built, pre-tested components that you can use to shorten your development time and to aid in code organization.

Framework

This are meandering code that does a lot of different things in one single place.

Spaghetti Code

Which of the following is not a framework concepts?

Controller

This is a framework that is backed by a french company Sensio Labs and distributed with the MIT license.

Symfony 2

This is the command line interface of the Symfony 2.

AppConsole

JavaScript is _________.

Object based

What is the original name of JavaScript?

Mocha

Who developed the JavaScript?

None of the choices

When would it be a good idea to use an external JavaScript file?

When the script is very long or needs to be placed in more than one HTML document

Is JavaScript code case sensitive?

No

Which of the following language is used to program the behavior of web pages?

None of the choices

JavaScript is a language that must be compiled while Java is a language that must be interpreted.

False

Which of the following is something you should have to use the JavaScript?

Web browser

Why should you use the type attribute in the opening script tag?

To be sure the browser does not interpret your JavaScript as another scripting language and to ensure the Web page validates in XHTML

The script tag's attribute that tells the browser the language of the script.

type

The _______ signals the end of a JavaScript statement.

None of the choices

Part of the browser that understands JavaScript.

JavaScript Interpreter

Active scripting is not a programing language instead it is a plain text interpreted to make a dynamic and interactive web pages.

False

JavaScript is a _________ language that doesn't require a program to be compiled before it is run.

scripting

What is the purpose of the <script> and </script> tags?

To tell the browser where a script begins and ends

An external JavaScript file commonly uses a filename extension of _______.

.js

Which of the following correctly points to an external JavaScript file named yourfile.js?

<script type= "text/javascript" src="yourfile.js"></script>

The choice of a Web browser is up to you, as long it's compatible with _________.

JavaScript

Part of the web browser that understands HTML and CSS.

Rendering Engine

The _______ signals the end of a JavaScript statement.

None of the choices

JavaScript has similarities to other programming and scripting languages.

True

If str = "Jose, Enrique, Vicente" and res = str.slice(15,22), what will be the resulting value of res?

Vicente

It is the command used to incorporate an external page into your html.

include

Which of the following will correctly access the fifth element of an array named "age"?

age[4];

What does an assignment operator do?

Assigns a new value to a variable

What does a comparison operator do?

Compares two values or statements, and returns a value of true or false

Is use to change the color of the web page to blue.

window.bgcolor = blue

Which of the following declares a variable named pagenumber and gives it a value of 240?

var pagenumber=240;

What does the following code do? var s_list= new Array()

None of the choices

Which of the following would be valid as the first line of an if/else statement?

None of the choices

Which of the following indicates that a single line of commentary will follow it within JavaScript code?

//

Which of the following correctly points to an external JavaScript file named yourfile.js?

<script type= "text/javascript" src="yourfile.js"></script>

Which of the following statements would be valid in JavaScript?

document.write("John said, \"Hi!\"");

To declare a function, you use the reserved word ________.

function

Which of the following statements will return false?

(4>=4)&&(5<=2)

What do you use to enclose the blocks of code in conditionals and loops?

Curly brackets

What symbol is used as the assignment operator in JavaScript?

None of the choices

An event handler is a predefined JavaScript property of an object that is used to handle an event on a Web page.

True

Which of the following is not a JavaScript operator?

None of the choices

This are statement that performs preset of tasks.

Functions

Variable names are not case sensitive.

True

Which of the following is not a JavaScript object?

None of the choices

It is named value pairs that are stored in the browser and they're sent to the web server with each page request.

Cookies

Which of the following correctly calls a function named major_alert() inside the onfocus event handler?

<input type=“text” onFocus=‘major_alert()”>

The keydown event occurs when a viewer presses down a key on the keyboard.

True

JavaScript is a language that must be compiled while Java is a language that must be interpreted.

False

Which of the following is a valid use of the window.alert() method?

None of the choices

What property of the Array object will return the numeric value of the length of an array?

The length property

Which of the following correctly assigns the result of a function named get_something () to a variable named shopping?

var shopping=get_something ();

This are statements that performs repetitive tasks.

Loops

Refers to an array of all objects of a particular type.

object collection

Which of the following comparisons will return true?

4!=3

What is the result of the script below?

<script>

var x = 0;

var e = "gsbatingggl.x";

var domain = "";

for(var ctr = 0; ctr < e.length; ctr++)

{

if(e[ctr] == "@")

{

domain = e.substring(ctr);

if((domain == "@yahoo.com.ph") ||

(domain == "@yahoo.com") ||

(domain == "@edu.gov"))

{

x++1;

}

}

}

document.write(x);

</script>

0

Which of the following is not an include statement?

<?php include_all 'include/external.php' ?>

Which of the following correctly codes an alert on the click event?

<input type=“button” onClick=“window.alert(‘Hey there!”);”>

The mousedown event uses what keyword as its event handler?

None of the choices

Which of the following correctly assigns the day of the week for an instance of the Date object named rightnow to a variable named weekday?

None of the above

Which of the following language is used to program the behavior of web pages?

None of the choices

Which of the following does not correctly create an array?

var if= new Array[10];

What are two of the benefits of using variables?

They can save you time in writing and updating your scripts, and they can make the purpose of your code clearer

What are two reasons why a function can be useful?

They provide a way to organize the various parts of the script into the different tasks that must be accomplished, and they can be reused.

JavaScript is _________.

Object based

Which of the following string declarations is invalid?

None of the choices

All object collections are supported by all browsers or browser versions.

False

The external JavaScript file must contain the

False

The getMonth() method returns the same number as the number that represents the current month (for example, returns 1 if the current month is January).

True

Which of the following would correctly generate a random number between 0 and 7?

var rand_int= Math.floor(Math.random()*7);

Which of the following would correctly write the value of pi on a Web page?

document.write(Math.PI);

What is the output of the script below?

<script> var text1 = "Hello"; var text2 = "World!";

document.write(text1.concat(" ",text2));

None of the choices

If a = 5 and b = a++ + 10 * 3, what is the value of y?

None of the choices

What is the output of the script below?

<script>

var str = "HELLO WORLD";

document.write(str.charAt(1));

</script>

E

Which of the following comparisons will return false?

4<=3

What do the properties and methods of the Math object enable you to do?

Perform mathematical calculations

How do you write "Hello World" in an alert box?

alert(“Hello World”)

Which of the following statements will return true?

!(17>=20)

What is the result of the script below?

<script>

var greeting;

var time = 10;

if (time < 10) {

greeting = "Good morning";

} else if (time < 20) {

greeting = "Good day";

} else {

greeting = "Good evening";

}

document.write(greeting);

</script>

Good day

Which of the following is a valid name for an array?

soap

How many times can you nest a code block within another?

As many times as you like (though enough nesting could run the browser out of memory)

Which of these would be valid as the first line of a for loop?

for (x=1;x<6;x+=1)

What is the result of the script below?

<script>

var n = ["Maria", "Isabella", "Georgina"];

var new_n = n.pop();

document.write(new_n);

</script>

Georgina

What is the result of the script below?

<script>

var n = ["Maria", "Isabella", "Georgina"];

n.shift();

n.unshift("Maria");

document.write ;

</script>

Maria,Isabela,Georgina

Rather than executing every single line of code within the script, a conditional statement allows certain sections of the script to be executed only when a particular condition is met.

True

Is a property use to display document within the frame.

document

It is a function in the PHP that get the date of the server.

date()

It is a function that display the content of the array.

print_r($Flowers);

It is a function in the PHP that check whether the variable has been set.

isset()

Which of the following variable declarations uses a variable with a valid variable name in JavaScript?

None of the choices

In JavaScript, you access object properties through the use of the

None of the choices

Which of the following is not the file to access if you want to change your server's time?

index.php

Which of the following successfully prints a variable named name by adding it to a set of strings?

None of the choices

Each object in JavaScript has properties associated with it.

True

It is a PHP function wherein the data will be transmitted to the server in the http header when the form is submitted for processing.

$_POST

It is a function in the PHP that converts the string into Upper case.

strtoupper()

You should avoid using JavaScript reserved words as variable names.

True

Which of the following successfully prints a variable named myhobby by adding it to a set of strings?

document.write("I like to " +myhobby+ " every weekend");

Is an object collection for all internal frames in the document.

document.frames

To write a string of text on a Web page, the _________ method is used.

document.print()

Web Applications are built with multi-tier architecture.

True

Web browser such as IE/Chrome/Safari/Opera is part of the client tier. This renders HTML, Images and CSS. It also executes client-side codes such as javascripts and plugins.

True

Server Stack is composed of server based software that runs together such as HTTP Server, Application Server and Database Server.

True

The fastest way to install your AMP Stack is to use either WAMP Server or the MAMP Server.

True

PHP and ASP.net are example of Application Server.

True

In installing individual components for Windows, you download all components from vendors.

True

For Linux installation of the individual components, you have to use the Apt-Get which is a GUI based program installed in Linux.

True

OSX has Apache and PHP included in its Operating System.

True

It is a collection of individual data items that are stored in a highly structured way that represetnts a model of reality.

Database

A system of tools that package up all three components into a single application so that we can develop within

Database Management System


2 comments:

  1. i couldnt paste the prelim exam here
    contact me so i could share it
    oki

    ReplyDelete
  2. Question 1
    Correct
    Mark 1.00 out of 1.00
    What will be the output if we compare "ten" and 10 with less then comparison operator("ten"
    <10)?
    a. A. True
    b. C. undefined
    c. D. error
    d. B. False
    Your answer is correct.
    Question 2
    Incorrect
    Mark 0.00 out of 1.00
    Question 3
    Correct
    Mark 1.00 out of 1.00
    What will be the output of below code?
    const event = new Date(Date.UTC(2012, 11, 20, 3, 0, 0));
    console.log (event.toLocaleString('en-IN', { timeZone: 'UTC' }));
    a. D. 2012/12/20, 3:00:00 am
    b. C. 20/12/2012, 3:00:00 am
    c. A. 20/12/2012, 3:00:00 
    d. B. 12/20/2012, 3:00:00
    Your answer is incorrect.
    Variables are declared with the _______ keyword.
    a. D. new
    b. C. var
    c. B. int
    d. A. this
    Your answer is correct.
    Question 4
    Incorrect
    Mark 0.00 out of 1.00
    What is the output for code A and B?
    Code A:
    var x = 10;
    y = --x + 1;
    alert(y);
    Code B:
    var x = 10;
    y = x-- + 1;
    alert(y);
    a. D. 11,11 
    b. C. 11,10
    c. B. 10,11
    d. A. 10,10
    Your answer is incorrect.
    Question 5
    Correct
    Mark 1.00 out of 1.00
    ______method evaluates a string of JavaScript code in the context of the specified object.
    a. C ParseFloat
    b. A Eval

    c. B ParseInt
    d. D Efloat
    Your answer is correct.
    Question 6
    Correct
    Mark 1.00 out of 1.00
    What will be the output of the following JavaScript program?
    function sanfoundry(javascript)
    {
    return (javascript ? “yes” : “no”);
    }
    bool ans=true;
    console.log(sanfoundry(ans));
    a. a Compilation error
    b. d No
    c. b Runtime error
    d. c Yes
    Your answer is correct.
    Question 7
    Incorrect
    Mark 0.00 out of 1.00
    Which of the following are javaScript reserved words?
    a. A. enum 
    b. B. long
    c. C. finally
    d. D. All of the above
    Your answer is incorrect.
    Question 8
    Correct
    Mark 1.00 out of 1.00
    How does JavaScript store dates in a date object?
    a. B The number of days since January 1st, 1900
    b. A The number of milliseconds since January 1st, 1970

    c. D None of the above
    d. C The number of seconds since Netscape’s public stock offering.
    Your answer is correct.
    Question 9
    Correct
    Mark 1.00 out of 1.00
    What will be the output of the below code?
    num1=5;
    function cal() {
    num1=10;
    num2=5;
    num3=num2*num1;
    console.log(num3);
    }
    cal();
    a. D. Error cannot have more than one variable with same name
    b. B. 50
    c. A. 25
    d. C. 100
    Your answer is correct.
    Question 10
    Correct
    Mark 1.00 out of 1.00
    A programming language can be called object-oriented if it provides ________ basic capabilities to developers
    a. C. 3
    b. D. 4

    c. a. 1
    d. B. 2
    Your answer is correct.
    Question 11
    Correct
    Mark 1.00 out of 1.00
    Which operator outputs the remainder of an integer division?
    a. B. Subtraction
    b. D. Increment
    c. A. Add
    d. C. Modulus
    Your answer is correct.
    Question 12
    Correct
    Mark 1.00 out of 1.00
    Question 13
    Correct
    Mark 1.00 out of 1.00
    JavaScript counts positions from?
    a. D Can not say
    b. C -1
    c. B 1
    d. A 0

    Your answer is correct.
    Storing a value in a variable is called ?
    a. B. variable destroyed
    b. C. variable store
    c. D. variable initialization
    d. A. variable declaration
    Your answer is correct.
    Question 14
    Correct
    Mark 1.00 out of 1.00
    Which operator will return false if two value are equal?
    a. A. !
    b. D. All of the above
    c. B. !=
    d. C. !==
    Your answer is correct.
    Question 15
    Correct
    Mark 1.00 out of 1.00
    Some browsers do not allow spaces behind the character.
    a. A Yes
    b. B No
    c. C Can be yes or no
    d. D Can not say
    Your answer is correct.

    ReplyDelete