Baidu 2016 research engineer simulation Pen test

Source: Internet
Author: User

1. What are the output results of the following program?
#include <iostream.h>
void Main () {
int n[][3]={10,20,30,40,50,60};
int (*p) [3];
P=n;
cout<<p[0][0]<< "," <<* (p[0]+1) << "," << (*p) [2]<<endl;
}

a.10,30,60

b.10,30,50

c.10,20,30

d.20,40,60

2. With C # statement: int a=5,b=4;
The following expression that represents the condition has a value of "false" ()

A. (b>=0) && (a<=b? A+b:a-b) >0

B. (a>b) && (b>0&&a>0)

C. (a<=0) | | (a%b>0)

d.a>0&&! (b>0)

3. If you want to list the current directory and all files with the extension ". txt" in the subdirectory, you can
The command to use is

A.find. -name "*.txt"

B.ls *.txt

C.find. ". txt"

D.ls-d.txt

4. Assuming that all variables are correctly defined, the following program segment runs after the value of X is ()
a=b=c=0;x=35;
if (!a) x--;
else if (b);
if (c) x=3;
else x=4;

A.3

B.4

c.35

d.34


5. The result of the following code execution is ()
<?php
mysql_connect ("localhost", "root", "" ")
$result =mysql_query ("Select Id,namefrom tb1");
while ($row =mysql_fetch_array ($result, MYSQL_ASSOC))
{echo "ID;", $row [0], "Name;", $row [];
?>

A. Print only the first record

B. Error

C. No results

D. Loop wrap Print all records

6. Run the following program segment with the output as ()
<?php
$arr = Array (3,5,7,9,6);
Echo $arr [3];
?>

A.7

B.9

C.3

D.5

7. Assume that the constructor for a class is a (int aa,int bb) {A=AA--;B=A*BB;}, then Execute
A x (4,5); After the statement, the values of X.A and x.b are respectively ()

A.20 and 5

B.3 and 15

C.5 and 4

D.4 and 20

8. Which of the following conditions can terminate the current thread's operation?

A. When a high-priority thread enters the ready state

B. When an exception is thrown

C. When the thread calls the sleep () method

D. When a new thread is created

Second, multi-choice (a total of 3 questions, 5 points per question)

1. The following JSP code defines a variable, how to output the value of this variable?
<bean:define id= "Stringbean" value= "HelloWorld"/>

A.<bean:write name= "HelloWorld"/>

B.<%=stringbean%>

C.<bean:write name= "Stringbean"/>

D.<%string mybean= (String) pagecontext.getattribute ("Stringbean", Pagecontext.page_scope);%>
<%=myBean%>

2. What is the command to unmount the CD/DEV/HDC?

A.umount/mnt/cdrom/dev/hdc

B.unmount/dev/hdc

C.umount/dev/hdc

D.unmount/mnt/cdrom/dev/hdc

How is the 3.Redhat 9 supported installation?

A. Network installation via HTTP

B. Network installation via Telnet

C. Network Installation via NFS

D. Installing from a local hard drive

The test paper reprinted from: Baidu 2016 research and development Engineers online simulation test, can be online simulation tests, after the end of the answer can be viewed analysis. But webmaster seems to set up a ban copy, if reproduced please be famous source, thank you!

Baidu 2016 research engineer simulation Pen test

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.