Web Programming 2

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

What character concatenates strings in PHP? a. b. c. d.RIGHT Select one: a. ; b. & c. * d. .

d. .

True or False: Apache is called httpd on a Linux server. Select one: True False

True

True or False: Drupal can be used at small organizations. Select one: True False

True

True or False: Drupal can store files, which are then available to visitors for download. Select one: True False

True

True or False: Most of the web sites today are Web 2.0. Select one: True False

True

True or False: Server-side programming allows users to login to web sites and generate content each time the page is visited. Select one: True False

True

All variables in PHP start with which symbol? Select one: a. & b. $ c. ! d. --

b. $

Web 2.0 applications promote: Select one: a. Data manipulation b. Collaboration c. FTP transfer d. Read-only access

b. Collaboration

Given the PHP code: $row=mysql_fetch_array($r); What type of variable is $row ? Select one: a. string b. array() c. integer d. boolean

b. array()

Which PHP function issues a command or query to the database? Select one: a. my_query() b. mysql_query() c. mysql_query_db() d. sqli_query()

b. mysql_query()

What is the advantage of caching? Select one: a. double-checking the data for accuracy b. temporary storage of calculated data makes delivery faster c. making the system highly available d. speeding up of incoming requests

b. temporary storage of calculated data makes delivery faster

What feature of Drupal makes the look of the system flexible? Select one: a. artwork b. themes c. graphics d. design

b. themes

What parameters are needed to connect to a database? Select all that apply. Select one or more: a. db version b. host name c. user d. database name

both b. host name c. user

Which one is NOT a valid PHP comparison operator? Select one: a. != b. <> c. !< d. ===

c. !<

True or False: osCommerce integrates with PayPal. Select one: True False

True

True or False: osCommerce web site offers an online demo of the software. Select one: True False

True

True or False:The PHP syntax is similar to many languages including C++ and Java, which makes it easy to learn for programmers: Select one: True False

True

What command extracts a tarball archive file? Select one: a. tar -xzvf b. tar -czvf c. tar -out d. tar -v

a. tar -xzvf

What file types is Drupal distributed in? Check all that apply. Select one or more: a. php b. .tgz c. .zip d. .txt

both b. .tgz c. .zip

What is the correct way to add 1 to the $count variable? Select one: a. $count =+1 b. ++count c. $count++; d. count++;

c. $count++;

How do you join strings in PHP? Select one: a. $m = "aa" + "bb"; b. $m = "aa" join "bb"; c. $m = "aa"."bb"; d. $m = join("aa","bb");

c. $m = "aa"."bb";

How can comments be implemented in PHP? Select one: a. // commented code to the end of the line b. /* commented code can be on multiple lines */ c. # commented code to the end of the line d. All of the above

d. All of the above

True or False: Drupal cannot be used for large organizations. Select one: True False

False

True or False: Drupal modules cannot be abandoned by their creators. Select one: True False

False

True or False: PHP can not generate images, which are different each time a user visits the page. Select one: True False

False

True or False: When using the POST method, variables are displayed in the URL. Select one: True False

False

What is a good example of static Internet content? Select one: a. CNN news page b. Yahoo home page c. Facebook Wall d. None of the above

d. None of the above

What is the valid way to start a PHP function? Select one: a. function test{} b. function test[] c. def function test{} d. function test()

d. function test()

What will be printed? $var = true; if ($var) { echo 'true'; } else { echo 'false'; } Select one: a. false b. error c. warning d. true

d. true

What will the value of $x be at the end of this script? <?PHP $x=0; $x=$x+1; echo $x." value"; $x++; ?> Select one: a. 1 b. 2 c. 3 d. There will be an error

b. 2

PHP server scripts are surrounded by what delimiters? a. <&></&> b. <?PHP ?> c. <?PHP > </?> d. <scrypt></scrypt> (had to spell it wrong to save)

b. <?PHP ?>

What language is Drupal written in? Select one: a. ASP b. PHP c. C++ d. Java

b. PHP

Which of the following is a valid way to start a for loop in PHP that would print out the numbers 0 through 4? Select one: a. for($i < 5; $i = 0;) b. for($i = 0; $i < 5; $i++) c. for($i < 5;) d. for( $i < 5; $i = 0; $i++)

b. for($i = 0; $i < 5; $i++)

PHP variables are weekly typed, which means that: Select one: a. you can't store data in them for a long time b. you do not have to define their type before you initialize them c. strongly typed languages like Java are better d. strongly typed languages do not require variable definitions

b. you do not have to define their type before you initialize them

PHP script can perform the following functions: Select one: a. Generate an email to many recipients b. Change data in a database c. Change data in server files d. All of the above

d. All of the above

When installing online applications on a PHP server, what information is needed? Select one: a. database username b. database password c. database host name d. All of the above

d. All of the above

What will be printed? $var='a'; $VAR='b'; echo "$var$VAR"; Select one: a. aA b. aa c. bB d. ab

d. ab

When users upload images to your Drupal CMS, what will improve the performance of the system? Select one: a. make sure to use height and width parameters in the tag b. convert images to .bmp c. convert images to .tiff d. resize the images with a server-side function

d. resize the images with a server-side function

osCommerce can be installed on your own server, which means it is: Select one: a. hosted b. online c. cloud hosted d. self-hosted

d. self-hosted

What function can you use to get the position of a string or character inside a string? Select one: a. string_position() b. length() c. len() d. strrpos()

d. strrpos()

What will be the value of $var? $var = 1 / 2; Select one: a. 0 b. 0.5 c. 1 d. 2

b. 0.5

Static content on the Internet can be updated by: Select one: a. Logging in and updating a page b. Posting a comment online c. Sending files via File Transfer Protocol d. Pressing the save button

c. Sending files via File Transfer Protocol

What will this code display? <?php $a = 1; function Test() { echo "a = $a"; } Test(); ?> Select one: a. 1 b. 3 c. Warning or no value d. An error

c. Warning or no value

What is an example of an open source shopping cart PHP application? Select one: a. Amazon b. Facebook c. osCommerce d. ShopNow

c. osCommerce

What is a current version of Drupal? Select one: a. 4.x b. 5.x c. 6.x d. 7.x

d. 7.x

Each PHP statement ends with a specific character: Select one: a. ^ b. & c. * d. ;

d. ;

What command can be used to edit a text file on a Linux server? Select one: a. ls b. cat c. nano d. edit

nano

Drupal supports what kind of modules? Check all that apply. Select one: a. Visible b. Contributed c. Custom d. Text

BOTH b. Contributed c. Custom

What commands can be used on a Linux server? Select one or more: a. putty.exe b. ls c. make d. Click on Start button

BOTH b. ls c. make

What is a good example of static Internet content? Select one: a. CNN news page b. Yahoo home page c. Facebook Wall d. None of the above

None of the above

PHP can generate PDF files based on database data, which is useful in creating reports. Select one: True False

True

True or False: Boost is a Drupal module that caches all of the pages. Select one: True False

True

True or False: Drupal allows multilingual support. Select one: True False

True

True or False: Drupal modules support collaboration over competition. Select one: True False

True

True or False: In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings. Select one: True False

True

True or False: PHP generated PDF files can use custom fonts. Select one: True False

True

True or False: Software can be compiled at the command prompt. Select one: True False

True

What program can be used on a Windows computer to access a command prompt on a Unix/Linux server? Select one: a. putty.exe b. SQL Server c. cmd d. Internet Explorer

a. putty.exe

Identify a valid PHP variable: Select one: a. x b. x$ c. $x d. $x$

c. $x

Social networks are part of which Internet era? Select one: a. Web 1.0 b. ARPA c. Web 2.0 d. Web 3.0

c. Web 2.0

What command installs compiled code? Select one: a. make complete b. make c. make install d. install

c. make install

What does PHP stand for? Select one: a. PHP: Hypertext Preprocessor b. Private Home Page c. Personal Home Page d. Personal Hypertext Processor

a. PHP: Hypertext Preprocessor

What is a correct way to add a comment in PHP? Select one: a. <comment> </comment> b. <!-- --> c. *\ *\ d. /* */

d. /* */

What are advantages of scripted applications over compiled applications? Choose all that apply. Select one or more: a. performance b. readability c. maintainability d. functionality

BOTH b. readability c. maintainability

What technology allows caching of PHP scripts? Check all that apply. Select one or more: a. Page file cache b. APC (Alternative PHP Cache) c. Memcache Correct d. database cache

BOTH b. APC (Alternative PHP Cache) c. Memcache

What are examples of a scripted language? Choose all that apply. Select one or more: a. C++ b. PHP c. Perl d. Objective-C

Both b. PHP c. Perl

True or False: After installation osCommerce automatically runs on SSL or https. Select one: True False

False

True or False: Drupal can use filters to compress JS, CSS, and BMP files. Select one: True False

False

True or False: Source code can be executed. Select one: True False

False

Select an example of a server-side programming language: Select one: a. JavaScript b. Perl c. HTML d. CSS

Perl

True or False: A Content Delivery Network, CDN, is used to distribute static assets such as images, documents, CSS and JavaScript across many locations. Select one: True False

True

True or False: Server-side programming uses some of the same languages as client-side (workstation) programming. Select one: True False

True

How do you get information from a form that is submitted using the "get" method? Select one: a. $_GET[]; b. Request.Form; c. Request.QueryString; d. .getParameter();

a. $_GET[];

What systems allow efficient web site management? Select one: a. CMS b. LMS c. ERP d. CRM

a. CMS

The speed of writing server code is increased when: Select one: a. The developer receives immediate feedback upon making changes b. The software is compiled before it is executed c. The developer uses discussion forums to debug code d. The software interpreted and error reporting is turned off

a. The developer receives immediate feedback upon making changes

What is the name given to Internet technologies supporting user collaboration and data exchange? Select one: a. Web 2.0 b. SQL Server c. Mobile technology d. Android

a. Web 2.0

The basic Drupal element is: Select one: a. a node b. a template c. user permissions d. data

a. a node

Basic Authentication is a module in Apache, which allows administrators to require a password on a specific URL. Where should this module be used? Select one: a. administrator section of an application b. user login process c. customer login process d. on the entire web site

a. administrator section of an application

What is the risk in performance of an Internet system? Select one: a. customers will not use a slow performing system b. customers will wait for pages to load and buy fewer items c. customers will come back later d. customers will try a different computer

a. customers will not use a slow performing system

The first step in the installation of osCommerce is: Select one: a. download the source files b. unzip the files into htdocs directory c. follow the installation URL in your browser d. configure the web store by providing database connectivity and other details

a. download the source files

Given that a database table has a field called FirstName, which code displays an element or field from the database record? Select one: a. echo $row['FirstName']; b. show $row['name']; c. echo $row[name]; d. echo $row(name);

a. echo $row['FirstName'];

What feature of Drupal allows administrators to customize the system and make it do new things? Select one: a. modules b. plugins c. PHP development d. coDrupal

a. modules

What PHP function allows a connection to MySQL database: Select one: a. mysql_connect(); b. get_connection(); c. connect() d. mysql_db_connection()

a. mysql_connect();

The full name of the e-commerce shop installed during our lab is: Select one: a. osCommerce Online Merchant v2.3 b. osCommerce c. Drupal d. v2.3.4 Full Package

a. osCommerce Online Merchant v2.3

What is the most common extension for a source code package? Select one: a. .zip b. .tgz c. .txt d. .os

b. .tgz

Drupal API stands for: Select one: a. At Program Interface b. Application Programming Interface c. All Programming Initiatives d. Application Primary Incentive

b. Application Programming Interface

What section of the osCommerce web site helps you to find reported problems in the software? Select one: a. GitHub b. Bug Reports c. Live Shops d. Add-Ons

b. Bug Reports

Drupal supports what kind of modules? Select one: a. Simple b. Core c. Basic d. Template

b. Core

What license is expected for contributed modules? Select one: a. Apache b. GPL c. PHP d. Commercial

b. GPL

You can download the development version of osCommerce from: Select one or more: a. sf.net b. GitHub c. osCommerce.org d. apache.org

b. GitHub

Which database in the list is Open Source? Select one: a. SQL Server b. MySQL c. Oracle d. Apache

b. MySQL

Which system is an example of an Open Source database? Select one: a. SQL Server b. MySQL c. Oracle d. Apache

b. MySQL

The server requirements for osCommerce v2.3.4 are: Select one: a. PHP v3+ and MySQL v3+ b. PHP v4+ and MySQL v3+ c. PHP v5+ and MySQL v5+ d. PHP v7+ and MySQL v5+

b. PHP v4+ and MySQL v3+

The PHP syntax is most similar to: Select one: a. JavaScript b. Perl and C c. HTML d. CSS

b. Perl and C

What is an example of anonymous users reverse proxy cache? Select one: a. Blueprints b. Varnish c. SelectCache d. Apache

b. Varnish

SSL is required when accepting credit card transactions on your web site, because: Select one: a. credit card module will not work without SSL b. credit card companies implemented PCI c. users are more comfortable when they see https d. it is more secure

b. credit card companies implemented PCI

How do you write "Hello World" in PHP? Select one: a. Document.Write("Hello World"); b. echo "Hello World"; c. "Hello World" d. system.out.println("Hello World");

b. echo "Hello World";

What is the correct way to create a function in PHP? Select one: a. new_function myFunction() b. function myFunction() c. create myFunction() d. create myFunction(function)

b. function myFunction()

What directory contains configuration files in osCommerce? Select one: a. config b. includes c. admin d. catalog

b. includes

What command compiles the source code? Select one: a. compile b. make c. go d. ls

b. make

What PHP function sets the database name to be used out of all the databases installed on the given server? Select one: a. mysql_get_db() b. mysql_select_db() c. mysql_set_db() d. mysql_select( )

b. mysql_select_db()

What major organization runs Drupal as their CMS? Select one: a. facebook.com b. whitehouse.gov c. amazon.com d. oracle.com

b. whitehouse.gov

What configuration parameter determines the location of the new software? Select one: a. --with-port=8080 b. --enable-so c. --with-so d. --prefix=$HOME/apache

d. --prefix=$HOME/apache

What is the correct way to end a PHP statement? Select one: a. </php> b. : c. . d. ;

d. ;

PHP script can perform the following functions: Select one: a. Generate an email to one or more recipients. b. Insert data into a database c. Display data from a database d. All of the above

d. All of the above

What does the "cd" command do? Select one: a. Displays current directory b. Lists the contents of a directory c. Opens the CD ROM d. Changes current directory

d. Changes current directory

Dynamic content on the Internet means: Select one: a. Playing a video online b. Changing a background on a page c. Blinking text d. Changing information per visit

d. Changing information per visit

What will be displayed by this code? <?php FUNCTION TEST() { ECHO "HELLO WORLD!\n"; } test(); ?> Select one: a. Nothing b. test() c. Blinking text d. HELLO WORLD!

d. HELLO WORLD!

What is the most common protocol on the Internet? Select one: a. UDP b. FTP c. HTTP d. Internet Protocol

d. Internet Protocol

What is the correct way to add 1 to the $count variable? Select one: a. $count =+1 b. ++count c. count+; d. None of the above

d. None of the above

What feature allows users to modify content in Drupal? Select one: a. interoperability b. integration c. integer d. authentication

d. authentication

What parameters are required in the PHP function, which issues a command or query to the database? Select one: a. number b. boolean c. integer d. string

d. string

What Linux command downloads source code? Select one: a. mput b. get c. Internet Explorer d. wget

d. wget


Ensembles d'études connexes

Chapter 6 (slide terms) FINAnnuity

View Set

CS 4306 Algorithm Analysis - Final Study Guide

View Set

Surgical Technology-Pharmacology Chapter 5 Antibiotics

View Set

WPC 480- Chapter 3: External Analysis

View Set

Human Resource Management chapters 2 & 3

View Set

Chapter 15: Postpartum Adaptations

View Set

Chapter 7 The Skeletal System: The Axial Skeleton

View Set

EMBEDDED SYSTEMS MIDTERM QUIZZES REVIEW (except for ESSAY)

View Set