Wednesday, April 6, 2016

Upwork LAMP Test 2016

1. Which of the following are correct regarding Linux devices?
Answers:
  1. The character devices work with data streams
  2. The sockets are special-purpose I/O files offering a type of network interface
  3. A block device’s total size varies and a program has random access to any block in the device
  4. A named pipe is like a character device, but there is another process at the other end of the I/O stream instead of a kernel driver
2. Which of the following are correct regarding the .htaccess file in an Apache server?
Answers:
  1. The name ‘.htaccess’ is universally acceptable
  2. Any text editor can be used to create or make the changes to the .htaccess files
  3. An .htaccess file is simply a text file containing Apache directives
  4. Directives residing in the .htaccess file apply to the documents in the directory where the .htaccess file is located
3. Which of the following are correct with regard to indexes in MySql?
Answers:
  1. With clustered indexes, the primary key and the record itself are “clustered” together
  2. When your data is almost always searched through via its primary key, clustered indexes can make lookups drastically slow
  3. With separate indexes on first_name and last_name, MySQL can eliminate rows based on both fields
  4. Indexes are not always used to locate matching rows for a query
4. Which of the following statements are incorrect regarding referential integrity?
Answers:
  1. A foreign key can refer to a primary key
  2. A foreign key can refer to a unique key
  3. The on delete cascade clause will work only if there is a reference to a primary key
  4. The referred key can either be in the same table or in some other table
  5. A foreign key can be composite
  6. Referential integrity can only be applied while creating the table
5. Mike Johnson is running Apache on an extremely busy server where hundreds of requests per second is a requirement. He might have to change the default hard limits set in the MPM module. Which of the following hard limits should he change?
Answers:
  1. HARD_SERVER_LIMIT
  2. HARD_THREAD_LIMIT
  3. HARD_MPM_LIMIT
  4. HARD_PROCESS_LIMIT
6. Which of the following MySQL field names are correct?
Answers:
  1. EmpNo
  2. 25Block
  3. #AccountID
  4. _CustomerName
  5. Product.Name
7. The include directive inserts the text of a document into the SSI document being processed. Which of the following statements has the correct syntax for the include directive?
Answers:
  1. include file=”path”
  2. include virtual=”URL”
  3. include directive=”path”
  4. All of the above
8. Refer to the small php script given below:
<?php
class person{
function getSal()
{
. . .
. . .
}
}
class emp extends person{
function getSal()
{
???
}
}
?>
The getSal() of emp has to behave exactly as getSal() of person. Which of the following lines of code would you use to replace the ‘???’
Answers:
  1. parent::getSal();
  2. person::getSal();
  3. parent::getSal;
  4. person::getSal;
9. Which of the following statements are correct with respect to the get_browser function of PHP?
Answers:
  1. It is used to extract the client’s browser information
  2. It requires the browscap.ini to be placed on the server
  3. It requires the browscap.ini to be placed on the client
  4. None of the above is correct
10. Which of the following are the valid operations that MySQL performs simultaneously when a table is dropped?
Answers:
  1. It removes all the rows from the table
  2. It drops all the table’s indexes
  3. It removes all dependent views
  4. It removes all dependent procedures
11. Sometimes it is necessary to create a temporary file to collect output for use by a later command. While creating such a file, you must make sure that the filename is unique enough so that no other programs accidentally write on the temporary file. Which of the following are correct with regard to creation of temporary files?
Answers:
  1. mktemp command can be used to create temporary filenames
  2. The $$ special variable can be used to construct a temporary filename based on the process ID
  3. All Linux flavors come with mktemp
  4. You must use exit in the handler to explicitly end script execution
12. The architecture of MySql sets it apart from nearly every other database server. Which of the following are correct about different layers of MySql?
Answers:
  1. The topmost layer is composed of the services that are not unique to MySQL
  2. The second layer is made up of storage engines
  3. The third layer is made up of storage engines
  4. The interface between the second and the third layers is a single API not specific to any given storage engine
13. Which of the following statements are correct with respect to PHP connections?
Answers:
  1. mysql_pconnect keeps the connection open across multiple requests
  2. mysql_connect keeps the connection open across multiple requests
  3. mysql_pconnect opens up a database connection for each page load
  4. mysql_connect opens up a database connection for each page load
14. Which of the following can be used to implement data validation while creating a table in MySql?
Answers:
  1. Checking constraint with specified values
  2. Referential constraint by creating a foreign key for another table
  3. Default value of a column
  4. Null constraint
15. You have just installed a Linux system. You have upgraded the kernel and packages to the latest versions and you have turned off all unnecessary services and daemons. What else should you do to enhance security on the system?
Answers:
  1. Change the root password
  2. Set up a telnet session
  3. Audit your log files
  4. Turn off network card
16. During heavy INSERT, UPDATE, and DELETE activity, indexes slow down the performance. Which of the following setting controls this behavior?
Answers:
  1. compound index
  2. index_timer
  3. delay_key_write
  4. None of the above
17. Which of the following ways of creation of a virtual web site is not supported by Apache?
Answers:
  1. Name-based
  2. IP-based
  3. Multiple main servers
  4. None of the above
18. Which of the following is correct with regard to the statements given below?
Statement 1: If the internal network uses nonroutable IP addresses for either security or cost reasons, you can use a proxy server to provide Internet resources to hosts that normally cannot access the Internet.
Statement 2: Using a caching proxy such as Apache (with mod_perl), you can provide seemingly faster access to Internet resources to the local users.
Answers:
  1. Statement 1 is true but statement 2 is false
  2. Statement 1 is false but statement 2 is true
  3. Both the statements are true
  4. Both the statements are false
19. Which of the following is the standard authentication module, which implements Basic HTTP authentication?
Answers:
  1. mod_auth
  2. mod_auth_dbm
  3. mod_auth_digest
  4. mod_access
  5. None of the above
20. What do you infer from the following code?
<?php
$str = ‘Dear Customer,nThanks for your query. We will reply very soon.?n Regards.n Customer Service Agent’;
print $str;
?>
Answers:
  1. Only the first “n” character will be recognized and the new line will be inserted
  2. The last “n” character will not be recognized and only the first two parts will come in the new lines
  3. All the “n” characters will work and the text will be printed on the respective new lines
  4. All will be printed on one line irrespective of the “n” characters
21. You have a table phone_book with 2 billion rows in it. Adding an index on last_name will require a lot of space. If the average last_name is 8 bytes long, you are looking at roughly 16 GB of space for the data portion of the index. Which of the following will help in reducing the size of index space?
Answers:
  1. Indexing only the first 4 bytes
  2. Indexing on partition
  3. Keeping the index in more than one file
  4. None of the above
22. Which of the following helps to keep an eye on the existing number of objects of a given class without introducing a non-class member variable?
Answers:
  1. Addition of a member variable that gets incremented in the default constructor and decremented in the destructor
  2. Addition of a local variable that gets incremented in each constructor and decremented in the destructor
  3. Addition of a static member variable that gets incremented in each constructor and decremented in the destructor
  4. This cannot be accomplished since the creation of objects is being done dynamically via “new”
23. Which of the following is the correct way to check whether the cookie is set or not before retrieving the value from “LoginCookie”?
Answers:
  1. isset($COOKIE[‘LoginCookie’])
  2. isset($_COOKIE[‘LoginCookie’])
  3. isCookieSet(‘$LoginCookie’)
  4. isCookieSet([‘$LoginCookie’])
24. How would you convert the date set in the following format into a PHP timestamp?
$date = “Monday, July 28, 2008 @ 12:15 am”;
Answers:
  1. $date = replace(“@ “,””,$date); $date = strtotimestamp($date);
  2. $date = replace(“@ “,””,$date); $date = strtotime($date);
  3. $date = str_replace(“@ “,””,$date); $date = strtotime($date);
  4. $date = str_replace(“@ “,””,$date); $date = strtotimestamp($date);
25. Refer to the code given below and select the while condition from the following options:
$db = mysql_connect(“localhost”,”root”);
mysql_select_db(“mydb”,$db);
$result = mysql_query(“select state_id, state_text from states”);
if ($result)
{
echo “<SELECT NAME=’state_id’>”;
while (…condition…)
{
echo “<OPTION VALUE=””.$myrow[“state_id”].””>”.
$myrow[“state_text”].” </OPTION> “;
}
echo “</SELECT>”;
}
Answers:
  1. $myrow = mysql_fetch_array()
  2. $myrow
  3. $myrow = mysql_fetch_array($result)
  4. $myrow = fetch_array($result)
26. The Manager and Office classes are as follows:
<?php
class Manager{
function printName() {
echo “Manager”;
}
}
class Office{
function getManager() {
return new Manager();
}
}
$ofc = new Office();
???
?>
Which of the following should replace ‘???’ to obtain the value of printName() function?
Answers:
  1. $ofc->getManager()->printName();
  2. new Office()->getManager()->printName();
  3. $ofc->getManager->printName;
  4. Office::getManager()::printName();
27. Which of the following is correct with regard to the statements given below?
Statement 1: When you set up Apache on an Internet host it can respond to an HTTP request for that host.
Statement 2: Apache does not allow virtual hosts to inherit configuration from the main server, which makes the virtual host configuration quite manageable in large installations.
Answers:
  1. Statement 1 is true but statement 2 is false
  2. Statement 1 is false but statement 2 is true
  3. Both the statements are true
  4. Both the statements are false
28. rpm -Uvh filename- 1.2-2.i386.rpm can be used to install an RPM package. What functions does it perform?
Answers:
  1. It installs with additional information and hash marks
  2. It upgrades with additional information and hash marks
  3. It does not upgrade if an older package is not already installed. If the older package exists, then it upgrades with additional
  4. information and hash marks
  5. It installs the package with additional information and hash marks, then removes the old packages
29. You want to see the block and character devices for which your system currently has drivers. Which of the following commands should you use in this scenario?
Answers:
  1. list /proc/devices
  2. show /proc/devices
  3. find /proc/devices
  4. cat /proc/devices
  5. None of the above
30. ‘Perfect Services’ provides financial services worldwide. You want to display data from the table pers for joining_date from #1/1/2005# to #31/12/2005# and the job should either be of an analyst, a clerk or a salesman. Which of the following is correct?
Answers:
  1. select * from Pers where joining_date from #1/1/2005# to #31/12/2005#, job=Analyst or clerk or salesman
  2. select * from Pers where joining_date between #1/1/2005# to #31/12/2005#, job=Analyst or job=clerk or job=salesman
  3. select * from Pers where joining_date between #1/1/2005# and #31/12/2005# and (job=Analyst or clerk or salesman)
  4. None of the above
31. Based on the code given below, what will be the value of $num if mytable contains 12 records?
$result=mysql_query(“DELETE from mytable”);
$num=mysql_affected_rows();
Answers:
  1. 0
  2. 1
  3. 12
  4. undefined
32. Refer to the following declarations of the php variables:
$company = ‘ABS Ltd’;
$$company = ‘, Sydney’;
?>
Which of the following is not a correct way of printing ‘ABS Ltd , Sydney’?
Answers:
  1. echo “$company $$company”;
  2. echo “$company ${$company}”;
  3. echo “$company ${‘ABS Ltd’}”;
  4. echo “$company {$$company}”;
33. When Apache receives a URL request, it processes the request by serving the file to the client (the Web browser). It provides you with a flexible mechanism for rewriting the requested URL to a new one using custom URL rewrite rules. Which of the following is an incorrect server variable for URL Rewrite rules?
Answers:
  1. SERVER_PROTOCOL
  2. SERVER_SOFTWARE
  3. HTTP_REFERER
  4. REMOTE_FORWARD
  5. REMOTE_ADDR
34. What will be the output of the following code?
$Rent = 250;
function Expenses($Other)
{
$Rent = 250 + $Other;
return $Rent;
}
Expenses(50);
echo $Rent;
Answers:
  1. 300
  2. 250
  3. 200
  4. The program will not compile
35. Whenever you create a table, MySQL stores the table definition in a file with the same name as the table. Which of the following is the extension of the table definition file?
Answers:
  1. .tab
  2. .frm
  3. .tbk
  4. .str
  5. None of the above
36. To start the MySql server in Linux, you type the following from the command line:
bin/safe_mysqld &
What does the ‘&’ mean in the command mentioned above?
Answers:
  1. It forces Mysql to ask the password
  2. It forces Mysql to run in the background
  3. It logins with windows login credentials
  4. None of the above
37. Which of the following statements are true with regard to comparisons in PHP5?
Answers:
  1. With the “= =” operator, two object instances are equal if they have the same attributes and values, and are instances of different classes
  2. With the “= =” operator, two object instances are equal if they have the same attributes and values, and are instances of the same class
  3. With the (===) operator, object variables are identical if and only if they refer to the same instance of the same class
  4. With the (===) operator, object variables are identical if and only if they refer to a different instance of the same class
38. Which of the following queries will correctly retrieve the ages and addresses of those students who have been studying in the school for the last 2 years?
Answers:
  1. $SQL_QUERY=”select age,address from student where regdate =”; $SQL_QUERY .= “DATE_SUB(CURRENT_DATE,Interval 2 YEAR)”;
  2. $SQL_QUERY=”select age,address from student where regdate =”; $SQL_QUERY .= “DATE_SUB(CURRENT_DATE,Interval 2)”;
  3. $SQL_QUERY=”select age,address from student where regdate =”; $SQL_QUERY .= “CURRENT_DATE-2”;
  4. $SQL_QUERY=”select age,address from student where regdate =”; $SQL_QUERY .= “Year(CURRENT_DATE)-Year(CURRENT_DATE-2)”;
39. Check the structure of the following tables:
Employee
———
Empno
Employeename
Salary
Deptno
Department
———
Deptno
Departname
Mike wants to see the departments that have more than 100 employees. Which of the following queries returns the required result?
Answers:
  1. Select departname from department where deptno in (select deptno from employee group by deptno having count(*) > 100);
  2. Select departname from department where deptno in (select count(*) from employee group by deptno where count(*) > 100);
  3. Select departname from department where count(deptno) > 100;
  4. Select departname from department where deptno in (select count(*) from employee where count(*) > 100);
40. Refer to the statements given below and identify which of the following is correct.
Statement 1: Without any indexes, the database uses a lot of disk I/O and can effectively pollute the disk cache.
Statement 2: Some extra disk space and a bit of CPU overhead is sacrificed on each INSERT, UPDATE, and DELETE query while using indexes.
Answers:
  1. Statement 1 is true but statement 2 is false
  2. Statement 1 is false but statement 2 is true
  3. Both the statements are true
  4. Both the statements are false
41. Which of the following subdirectory of the root directory provides system statistics through a directory-and-file interface which you can browse with standard Unix tools?
Answers:
  1. etc
  2. sbin
  3. proc
  4. lib
  5. None of the above
42. State whether true or false:
By allowing the use of .htaccess files in user (or customer or client) directories, you are essentially extending a bit of your Webmaster privileges to anyone who can edit those files.
Answers:
  1. True
  2. False
43. Which of the following statements are true?
Statement 1: mysql_fetch_object – Returns an object with properties that correspond to the fetched row, or FALSE if there are no more rows
Statement 2: mysql_fetch_row- Returns a positive MySQL result resource to the query result, or FALSE on error.
Answers:
  1. All the statements are true
  2. All the statements are false
  3. Only Statement 1 is true
  4. Only statement 2 is true
44. Based on the code given below, what will be the value of, $num, if mytable contains 20 records out of which 10 have myprice=19, 5 have myprice=20 and 5 have myprice=2, before running the mysql_query?
$resultSet=mysql_query(“UPDATE mytable set myprice = 20 where myprice < 20”);
$num=mysql_affected_rows();
Answers:
  1. 0
  2. 1
  3. 5
  4. 10
  5. 15
  6. 20
45. You want to enable SSI for a directory called ‘/www/mysite/htdocs/parsed’. Which of the following is the correct configuration to be added in httpd.conf?
Answers:
  1. <Directory “/www/mysite/htdocs/parsed”> Options +Includes SetFilter INCLUDES </Directory>
  2. <Directory “/www/mysite/htdocs/parsed”> SetOutputFilter INCLUDES </Directory>
  3. <Directory “/www/mysite/htdocs/parsed”> Options Included </Directory>
  4. <Directory “/www/mysite/htdocs/parsed”> Options +Includes SetOutputFilter INCLUDES </Directory>
  5. None of the above
46. Which of the following is introduced in PHP5?
Answers:
  1. __construct
  2. __construct and __destruct
  3. __constructor and __destructor
  4. __constructor
47. ‘Web Logic’, a web hosting company, has two system administrators, and one of them has just been terminated from his position. What is the first thing that the current administrator should do to enhance security?
Answers:
  1. Change the employee’s account password
  2. Set an expiration date on the employee’s account
  3. Disable the employee’s account
  4. Change the root password
48. A user is trying to set a new password for his account. He wants to use the name of the company “MNC” as his password. Why would the system not allow this password?
Answers:
  1. The minimum length of a password should be at least six characters
  2. The characters cannot be in alphabetical order
  3. Capital letters in a password cannot be used
  4. The password is already in use by another user
49. The Apache source distribution comes with a script called configure that allows you to configure the source tree before you compile and install the binaries. Which of the following is an incorrect option for the configure script?
Answers:
  1. –cache-file=file
  2. –help-file
  3. –exec-prefix=eprefix
  4. –libexecdir=dir
  5. None of the above
50. Which sequence will run successfully for the code given below?
<?php
function Expenses()
{
function Salary()
{
}
function Loan()
{
function Balance()
{ }
}
}
?>
Answers:
  1. Expenses();Salary();Loan();Balance();
  2. Salary();Expenses();Loan();Balance();
  3. Expenses();Salary();Balance();Loan();
  4. Balance();Loan();Salary();Expenses();
51. Which of the following is correct for specifying the default value?
Answers:
  1. function GetDiscount($Type = “Special”) { . . . }
  2. function GetDiscount(Type := “Special”) { . . . }
  3. function GetDiscount($Type := “Special”) { . . . }
  4. function GetDiscount($Type : “Special”) { . . . }
52. What will be the output of the following code?
$var1=”a”;
$$var1=”b”;
echo “$var1 $a”;
Answers:
  1. a b
  2. $var1 $a
  3. Error: $a is undefined
  4. Error: Parse error in line 2 ($$var1 = “b”)
53. Which of the following commands will you use if you need to strip the extension off of a filename or get rid of the directories in a full pathname?
Answers:
  1. relativename
  2. basename
  3. firstname
  4. None of the above
54. One of your PHP pages is very heavy and loading it takes about two minutes. But before it loads, a browser timeout occurs. Which of the following will help solve this problem?
Answers:
  1. set_time_limit(60);
  2. set_time_out(60);
  3. set_time_limit(150);
  4. set_time_out(150);
55. Food Cart Accounting System (FOCAS) is maintaining products in the products table, and wants to see the products which are 50 or more than 50 short of the minimum stock limit. The structure of the Products table is:
ProductID
ProductName
CurrentStock
MinimumStock
Two possible queries are:
Query 1:select * from products where currentStock>MinimumStock+50
Query 2:select * from products where currentStock-50>MinimumStock
Which of the following is correct?
Answers:
  1. Query 1 is true but Query 2 is false
  2. Query 1 is false but Query 2 is true
  3. Both the queries are true
  4. Both the queries are false
56. Indexes are known to speed up the search but they have some limitations also. Which of the following queries take much time despite having indexes on table?
Answers:
  1. select * from articles (body) match against (‘database’)
  2. select * from pages where page_text like “%buffy%”
  3. select last_name from phone_book where last_name rlike “(son|ith)$”
  4. select * from articles where body = “%database%”
  5. All of the above
57. Read the following code snippet:
1. for filename in *; do
2. if [ -f $filename ]; then
3. ls -l $filename
4. file $filename
5. else
6. echo $filename is not a regular file.
7. fi
8. done
What does ‘-f’ in line 2 mean?
Answers:
  1. It stores a file name in the memory
  2. It tests all the items in the current file
  3. It tests all the items in the current working directory
  4. None of the above
58. What is the function of the ‘swapon’ command while installing Linux in the command line interface mode?
Answers:
  1. It creates a swap area in RAM
  2. It activates a created swap partition
  3. It creates a swap partition
  4. It creates and activates a swap partition
59. What is the condition indicated if only the LI appears while attempting to boot a Linux system with LILO?
Answers:
  1. Primary boot loader has been started
  2. Secondary boot loader has been loaded
  3. Tertiary boot loader has been loaded
  4. Secondary boot loader signals it has been loaded
60. What will happen if the following code is executed?
$resultSet = mysql_query(“SELECT fname, lname FROM customers”)
for ($nIndex = 0; $nIndex < mysql_num_rows($resultSet) ; $nIndex++)
{
if (!mysql_data_seek($resultSet, $nIndex))
{
echo “Cannot seek to row $nIndexn”;
continue;
}
if(!($row = mysql_fetch_object($resultSet)))
continue;
echo “$row->fname $row->lname<br />n”;
}
Answers:
  1. The fnames and lnames of all the customers will be printed
  2. The lnames and fnames of all the customers will be printed
  3. The fnames and lnames of all the customers will be printed in the reverse order
  4. Only the fname and lname of the first customer will be printed
  5. Only the fname and lname of the last customer will be printed
61. Which of the following are correct with regard to the sbin subdirectory of the root directory in Linux?
Answers:
  1. It is the place to find system executables
  2. Programs in sbin directories pertain to system management
  3. Regular users usually do not have sbin components in their command paths
  4. All of the above
62. You are facing a low key buffer problem. You want to increase the size of the key buffer from what it was set to at the startup. Which of the following is the correct syntax to perform this?
Answers:
  1. mysql> SET buffer=50M;
  2. mysql> SET key_buffer=50M;
  3. mysql> SET GLOBAL key_buffer=50M;
  4. mysql> SET DEFAULT key_buffer=50M;
  5. None of the above
63. Which of the following is correct with regard to the statements given below?
Statement 1: The current implementation of the optional proxy module does not support reverse proxy or the latest HTTP 1.1 protocol.
Statement 2: Apache can be turned into a caching (forward) proxy server.
Answers:
  1. Statement 1 is true but statement 2 is false
  2. Statement 1 is false but statement 2 is true
  3. Both the statements are true
  4. Both the statements are false
64. You have defined three variables $to, $subject, and $body to send an email. Which of the following methods would you use to send an email?
Answers:
  1. mail($to,$subject,$body)
  2. sendmail($to,$subject,$body)
  3. mail(to,subject,body)
  4. sendmail(to,subject,body)
65. You have to upload a file named “SalesFile” using the form post method mentioned below. What should be the code in line 3 to accomplish the same?
1 <input type=”hidden” name=”MAX_FILE_SIZE” value=”30000″ />
2 Send this file:
3
4 <input type=”submit” value=”Send File” />
Answers:
  1. <input name=”SalesFile” type=”file” />
  2. <input name=”SalesFile” Upload=”true” />
  3. <input filename=”SalesFile” type=”Upload” />
  4. <input filename=”SalesFile” Upload=”true” />
66. Where would you install LILO to allow a dual bootable system on a ‘system’ which already has Microsoft Windows NT 4.0 with an installed NTFS partition?
Answers:
  1. Master Boot Region
  2. First sector of the NTFS partition
  3. Last sector of the boot partition
  4. First sector of the boot partition
67. Which permission setting allows a user to run an executable with the permission of the owner of that file?
Answers:
  1. Read
  2. SUID
  3. Write
  4. SSH
68. Which of the following lines of the class mentioned below should be commented to execute the code without errors?
1 class Insurance
2 {
3 function clsName()
4 {
5 echo get_class($this);
6 }
7 }
8 $cl = new Insurance();
9 $cl->clsName();
10 Insurance::clsName();
Answers:
  1. Line 8 and 9
  2. Line 10
  3. Line 9 and 10
  4. All the three lines 8,9, and 10 should be left as it is
69. Consider the following sample code:
$x = 0xFFFE;
$y = 2;
$z = $x && $y;
What will be the value of $z?
Answers:
  1. 0
  2. 1
  3. 2
  4. 3
  5. 4
70. You are building Apache from the source distribution. Which of the following is a mandatory requirement for Apache installation?
Answers:
  1. ANSI C Compiler
  2. Perl 5 Interpreter
  3. Dynamic Shared Object support
  4. None of the above
71. Refer to the classes that are defined as follows:
abstract class BaseCls{
protected abstract function getName();
}
class ChildCls extends BaseCls{
}
Which of the following implementations of getName() is invalid in ChildCls?
Answers:
  1. protected function getName(){}
  2. function getName(){}
  3. private function getName(){}
  4. public function getName(){}
72. You want to open a file in the PHP application and you also want this application to issue a warning and continue execution, in case the file is not found. Which of the following idea functions would you use in this scenario?
Answers:
  1. include()
  2. require()
  3. nowarn()
  4. getFile(false)
73. You need to allow only selected users from the users file into a particular area and you do not want to keep the username information in your .htaccess files. Which of the following is a correct statement to allow a group of users?
Answers:
  1. require usergroup <group name>
  2. require group <group name>
  3. require users <group name>
  4. require <group name>
74. You have an HTML file called mypage.html and you want to store meta headers of this html page. Which of the following directives specifies the filename extension for metainformation files?
Answers:
  1. MetaExt
  2. MetaFileType
  3. MetaExtension
  4. MetaSuffix
75. John Mark, an administrator, wants to set the Web server so that it will not show a directory listing if a user requests a page which is a directory. Which modification should he set up in the httpd.conf?
Answers:
  1. User
  2. ServerName
  3. Remove indexes from configuration file
  4. DocumentRoot
76. Which of the following special variables of a shell script holds the number of arguments passed onto the script?
Answers:
  1. $~
  2. $*
  3. $#
  4. $@
77. When a Unix program finishes, it leaves an exit code for the parent process that started the program. The exit code is a number. Which of the following numbers is returned if the program ran without problems?
Answers:
  1. 0
  2. 1
  3. 13
  4. 108
  5. None of the above
78. Which of the following is correct regarding the statements given below?
Statement 1: Before the server can send the page to the browser it must send the http headers.
Statement 2: session_start() is used to send some headers.
Answers:
  1. Statement 1 is true but statement 2 is false
  2. Statement 1 is false but statement 2 is true
  3. Both the statements are true
  4. Both the statements are false
79. Which program automatically determines the number of blocks in a device and sets some reasonable defaults?
Answers:
  1. mkbds4
  2. mke2fs
  3. mksdef
  4. mkcntd
  5. None of the above
80. Which of the following statements is incorrect with regard to PHP interfaces?
Answers:
  1. A class can implement multiple interfaces
  2. An abstract class cannot implement multiple interfaces
  3. An interface can extend multiple interfaces
  4. Methods with the same name, arguments and sequence can exist in the different interfaces implemented by a class
81. A construction company is working on three projects: mall construction, residential construction and building business towers. A civil engineer can work only on one type of construction project but more than one civil engineer can work on one project whereas a sales person can handle any type of projects and any number of sales people can work on one project. Define the nature of the relationship between (civil engineer and projects) and (sales person and projects)?
Answers:
  1. one to many, one to one
  2. one to one, one to many
  3. many to one, many to many
  4. many to one, many to one
82. A production house has two sale outlets. Both the outlets are maintaining their data separately in servers A and B. The MD wants to see the sale of both the outlets in one report. Both the outlets use the same structure of the Sales table. Which of the following methods will you adopt to create this report?
Answers:
  1. Select * from A.Sales join B.Sales
  2. Select * from A.Sales union all B.Sales
  3. select * from A.Sales,B.Sales
  4. None of the above
83. Refer to the following statement:
Select CustomerName, AccountNumber from Customers where AccountNumber in(select AccountNumber from Transactions where TransactionDate=#12/12/2005#)
Which of the following is correct?
Answers:
  1. In the sub query, * should be used instead of AccountNumber
  2. The sub query can return only one row, so “in” should be replaced with “=in” the prime query
  3. The sub query should be used first
  4. None of the above

No comments:

Post a Comment