其他分享
首页 > 其他分享> > 多测师肖老师___分享杭州面试题

多测师肖老师___分享杭州面试题

作者:互联网

 

<2>程序题(10’*3)(四选三)

  1. 请写出以下脚本的alert结果。

<script type='text/javascript'>        

 

User = function() {

    this.name = "Damingsoft"

    this.speak = function () {

        return "Nice to meet you!"

    }

}

UserA = function() {

  this.speak = function() {

    return "Welcome!"

  }

}

UserA.prototype = new User();

 

myUser = new UserA();

alert('The User named ' + myUser.name +

      ' says ' + myUser.speak());

      </script>

 结果:

 'The User named '   Damingsoft  
      ' says '  Welcome!

 

  1. 输出以下程序的结果。

 

    char str[] = "world"; cout << sizeof(str) << ": ";

char *p = str; cout << sizeof(p) << ": ";

char i = 10; cout << sizeof(i) << ": ";

void *pp = malloc(10); cout << sizeof(p) << endl;

 答案:

6:4:1:4

 

 

 

  1. 输出以下程序的结果。

 

def fun1(n):
    for index in range(0, n):
        print(sum(range(0,n)))

fun1(10)

 

 结果:

45
45
45
45
45
45
45
45
45
45

 

 

 

<4> 数据库(10*2)

 

 

  1. 参考如下table:tblDynamicWebTWAIN:

 

 

请写出把第三条记录的strImageName 修改成 test.jpg的sql 语句。

 

(1)update tblDynamicWebTWAIN set strlmageName=test.jpg where ilmagelID=3

 

 (2)Select  strUserName  from   tblUser a , tblCheckout b , tblItem  c  from a.iUserID =b.iUserID and  b.biltemID=C.biltemID and  strlTNME=App.config

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  1. 参考如下三张表格:

 

Table:tblUser

 

 

Table:tblCheckout

 

 

Table:tblItem

 

 

请写出查询App.config 对应的checkout username 的sql 语句。

Select a.biltemID from tblItem a where strlTNME=App.config

 

标签:function,10,面试题,cout,biltemID,多测,师肖,char,User
来源: https://www.cnblogs.com/xiaolehua/p/15713920.html