山东高速笔试题
昨天参加了山东高速信联支付的笔试,凭记忆向大家分享一下,如有记错的地方,望大家谅解。我投递的是软件开发岗,主要是关于数据库、C,Java,计算机网络方面的基本知识。题目类型分选择题,填空题,简答题和编程题。具体如下:
一 选择题(20题):
1、数据库概念设计的E-R方法中,不包括下列哪种图形(C)
A.菱形 B.矩形 C.圆形 D.椭圆形
2、下列哪种语句可以改变数据表结构()
A、update B、Insert C、Delete D、Alter
3、C语言程序总是从( A )开始执行
A、main( )函数 BCD忘记啦
4、
二 填空题:
1、数据库的三级模式结构包括 (内模式)、(模式)、(外模式)。
2、设一个关系A具有a1个属性和a2个元组,关系B具有b1个属性和b2个元组,则关系A×B具有(a1+b1)个属性和( a2 x b2) 个元组。
3、数据库关系模型的完整性包括 (实体完整性、参照完整性、用户定义完整性)。
4、OSI七层模型从下至上依次为:物理层、(数据链路层)、网络层、传输层、会话层、(表示层)、应用层。
三 简答题(4题):
1、简述数据库管理系统的作用?
2、网络管理的含义?网络管理的作用。
3、关系数据库中,“关系”的性质?
4、网桥的含义,它的作用;路由器的含义及作用?
四 编程题(2题):
1、用Java编程,启动并新建一线程,实现1至100中偶数的和。
本人不会Java,所以用C#做的这道题。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace e1
{
public class MyThread
{
public static void Main()
{
Thread thread1=null;
thread1 = new Thread(new ThreadStart(fun));
thread1.Start();
}
public static void fun()
{
int sum=0;
for (int i = 1; i <= 100; i++)
{
if (i % 2 == 0)
sum += i;
}
Console.WriteLine(sum);
}
}
}
2.编程列出所有的水仙花数。所谓水仙花数是指一个三位数,其各个位置上的立方和等于该三位数,比如153=13+53+33,那么153是水仙花数。
个人编程解答(C#):
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace e1
{
public class MainClass
{
public static void Main()
{
Console.WriteLine("所有的水仙花数:");
for (int i = 100; i < 999; i++)
{
if (Foo(i))
Console.WriteLine(i);
}
}
public static bool Foo(int j)
{
int temp = j;
int[] arr = new int[3];
int tp=0;
while (j > 0)
{
arr[tp++] = j % 10;
j = j / 10;
}
long sum = arr[0] * arr[0] * arr[0] + arr[1] * arr[1] * arr[1] + arr[2] * arr[2] * arr[2];
if (sum == temp)
return true;
else
return false;
}
}
}

浙公网安备 33010602011771号