Baidu 2016 R & D Engineer simulated pen test, 2016 R & D Engineer Test

Source: Internet
Author: User

Baidu 2016 R & D Engineer simulated pen test, 2016 R & D Engineer Test

1. What is the output result 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. Set the C # statement: int a = 5, B = 4;
Which of the following statements indicates that the value of the condition expression is 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.you can
The command used is

A. find.-name "*. txt"

B. ls *. txt

C. find. ". txt"

D. ls -d.txt

4. Assuming that all variables are correctly defined, the value of x after the following program segment 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. Print all records with loop line breaks

6. Run the following program segment and the output result is ()
<? Php
$ Arr = array (3,5, 7,9, 6 );
Echo $ arr [3];
?>

A.7

B .9

C.3

D.5

7. Assume that the constructor of A class is a (int aa, int bb) {a = aa --; B = A * bb;}, then execute
A x (); after the statement, the values of x. a and x. B are ()

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 running of the current thread?

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

B. When an exception is thrown

C. When this thread calls the sleep () method

D. When creating a new thread

2. Multiple answer questions (three questions in total, each question has 5 points)

1. The following JSP code defines a variable. How do I 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

3. What installation methods does Redhat 9 support?

A. network installation through HTTP

B. network installation through Telnet

C. network installation through NFS

D. Install from a local hard drive

This test is reproduced from: Baidu 2016 R & D engineers can simulate the test online. After answering the questions, you can view the analysis results. However, it seems that the webmaster has set a copy prohibition function. If you reprint the function, make sure the famous source is used. Thank you!

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.