综合面试题

来源:互联网 发布:php7 mysql数据库 编辑:程序博客网 时间:2024/05/16 04:38
  
Directions for questions 1 to 3,refer to the data below.
A fruit vendor purchases 200 oranges,300 apples,and 100 mangoes.The cost per
fruit of mangoes,apples,oranges iS in the ratio 4:2:1.During the day he selllS
100 oranges,150 apples,and 45 mangoes at a profit of 50% over their unit costs.
Further,he sells a second lot of 80 oranges,125 apples,and 50 mangoUs at a
profit of 25% over their unit costs.At the end of the day,as a special sale,he sells
all the remaining fruits at Rs.1.50 per fruit.He makes a total profit of Rs.180 on oranges.
 
1. What is the vendor’s cost price per orange?
a] Rs.1.5    b] Rs.3    C] Rs.2 d] Rs.4.5
 
2. What is the total profit earned by the vendor on mangoes?
a] Rs.300    b] Rs.367.5    C] Rs.310  d] Rs.307.5
 
3. What is the total cost of all the fruits for the vendor?
a] Rs.3, 600    b] Rs.4, 000    C] Rs.4, 200    d] Rs.5, 000
 
4. Find out the missing digits in 8765432112345678xy to make it divisible by both 9
and 10.The four alternative solutions are represented by S 1,S2,S3 and S4.
 
S1-->x=5,y=0;    S2-->x=0,y=0;       S3—->x=9,y=0;     S4-->x=7,y=0;
 
a]Only S1       b]S2 and S3    C]Only S2 d]S1,S2,and S3
 
 
5.As the auto ferry pulls away from its pier, some of its passengers are on deck,
while the others are in their cars.If one-third of the passengers on deck had
returned to their cars,then those in their cars would have outnumbered those
remaining on deck by 14.If, however, one—third of those in their cars at present
had gone on deck,then those on deck would have equaled the number present
inside their Cars initially.What are the respective present numbers of passengers
in their Cars and on deck?
a]Car=12,deck=18    b]Car=18,deck=12     c]Car=15,deck=12     d]Car=21,deck=15
 
6.A battalion of 1100 people has provision for 8 weeks at 2.25 kg per day per man.
How many men must leave SO that the same provisions last 12 weeks at 1.65 kg
per day per man?
A] 50
b] 100
c] 150
d] 200
 
7. Five year's ago Mrs..Shy was 5 times older than her daughter.Today she is 3 times
as old as her daughter.How old Mrs..Shy will be 5 years from now? 
a] 35 years    b] 40 years    c] 45 years   d] 50 years
 
 
8. A train 250 M long overtakes another train which is traveling at 90 Kmph.If the
speed of the faster train is 108 Kmph and it takes 100 seconds to pass the slower
train completely.Find out the length of the train?
a] 200 M    b] 225 M    c] 250 M   d] 500M
 
9. What is the smallest number, which when decreased by 5 is divisible by 21, 27, 33, and 35?
a] 1,490   b] 10,400   c] 15,490   d] none of these
 
10.Two successive discounts of x percent and y percent are given. When is the net discount highest given x+y=k (k=constant)?
 
a】k>x>y    b】x<y<k    c】x=y    d]x=k, y=0 or y=k, x=0
 
11. In a race Guninder was not first. Joginder came in after Harinder; Inderjeet was not ahead of Maninder. Guninder was not in front of Joginder. Inderjeet was not fourth or fifth. Maninder was not first. Who finished first and second in the race?
a]Harinder followed by Maninder    b]Harinder followed by Joginder
c]Harinder followed by Guninder    d]Cannot be determined from the clues
 
12. A child is solving a jigsaw puzzle with 306 pieces. Each day that he fits pieces together, there are fewer pieces left to sort. So he is able to fit an extra piece as each day goes by. On the first day he fits 30 pieces. How many days does it take him to complete the puzzle?
a]10 days    b]9 days    c]8 days    d]None 0f these
 
13. In three colored boxes-Red, Green and Blue-108 balls are placed. There are twice as many in the Green and Red boxes combined as there are in the Blue box and twice as many in the Blue box as they are in the Red box. How many balls are there in the Green box?
a】18    b】36    c】45   d】None of these
 
14. The Athenians on the whole were peaceful and prosperous; they had___to sit at home and think about the universe and dispute with Socrates, or to travel abroad and___the world.
a】 leisure, explore    b】time,ignore    c】 ability, suffer d】temerity,understand
 
 
 
15. Find the sum of all the three-digit numbers divisible by 7.
a】10,048      b】70,336      c】10,153       d】71,071
 
 
 
 
16.面向对象的特征有哪些方面
 
答:    ____, 继承 ,____,多态性
 
 
17. 1.重写Overriding是父类与子类之间多态性的一种表现,
2.重载Overloading是一个类中多态性的一种表现      
 
A.1和2都正确
B.1和2都错误
C.1对2错
D.1错2对.
 
 
 
 
18.下面输出字符'A'的方法中,_______是错误的.
A.cout<<put('A');                    B. cout<<'A';
C. cout.put('A');                       D.char A='A';cout<<A
 
 
19.关于getline()函数的下列描述中,________是错误的.
     A.该函数是用来从键盘上读取字符串的
     B.该函数读取的字符串长度是受限制的
     C.该函数读取字符串时,遇到终止符时便停止
     D.该函数中所使用的终止符只能是换行符
 
 
20.关于read()函数的下列描述中,_______是对的.
     A.该函数是用来从键盘输入中获取字符串
     B.该函数所获取的字符的多少是不受限制的
     C.该函数只能用于文本文件的操作中
     D.该函数只能按规定读取所指定的字符数
 
 
 
21.当使用ifstream流类定义一个流对象并打开一个磁盘文件时,文件的隐含打开方式是______.
    A. ios::in                       B.ios::out
    C. ios::trunc                    D. ios::binary
 
22.下列函数中,________是对文件进行写操作的.
     A. get( )                       B. read( )
     C. seekg( )                     D.put( )
23.对定义重载函数的下列要求中,_______ 是错误的.
A.要求参数的个数不同
B.要求参数中至少有一个类型不同
C.要求参数个数相同时,参数类型不同
D.要求函数的返回值不同
 
 
24.有关类和对象的说法不正确的是______.
     A.对象是类的一个实例
     B.任何一个对象只能属于一个具体的类
     C.一个类只能有一个对象
     D.类与对象的关系和数据类型和变量的关系相似
 
25.有关构造函数的说法不正确的是________.
     A.构造函数名字和类的名字一样
     B.构造函数在说明类变量时自动执行
     C.构造函数无任何函数类型
     D.构造函数有且只有一个
 
 
26.下列的各类函数中,________不是类的成员函数.
    A.构造函数            B.析构函数
C.友元函数            D.拷贝初始化构造函数
 
 
 
 
27.下述静态数据成员的特性中,________是错误的.
      A.说明静态数据成员时前边要加修饰符static
      B.静态数据成员要在类体外进行初始化
      c.引用静态数据成员时,要在静态数据成员名前加<类名>和作用域运算符
      D.静态数据成员不是所有对象所共用的
 
 
28.设int a=2,b=2;则++a+b的结果是_______.
A.2           B. 3              C. 4           D. 5
 
29.下列关于switch语句的描述中,______是正确的.
      A.switch语句中default子句可以没有,也可有一个
      B.switch 语句中每个语句序列中必须有break语句
      C.switch语句中default子句只能放在最后
      D.switch语句中case子句后面的表达式只能是整型表达式。
 
 
30.下述关于break语句的描述中,______是不正确的.
     A. break语句可用于循环体内,它将退出重循环
B. break语句可用于是switch语句中,它将退出switch语句
C. break语句可用于if体内,它将退出if语句
D. break语句在一个循环体内可以出现多次
 
 
31 有以下类的说明,请指出错误的地方.
class CSample
{
    int a=2.5            (A)
     CSample( )          (B)
     Public:
         CSample(int val);     (C)
         ~CSample ( );       (D)
 
 
32.对于Java接口,以下哪个描述是错误的.
a.接口中不能定义属性
b.接口可以多重继承
c.接口中的方法都是public
d.java使用interface声明接口
 
33.关于Java线程,以下哪个操作是不被推荐的.
a.Sleep()
b.Wait()
c.Start()
d.Destroy()
 
34.Java语言中哪个关键字声明常量.
a.const
b.finally
c.final
d.finalize
 
 
35.如何实现override.
a.在类中定义同名方法
b.在类中定义同名方法,而且参数必须一致
c.在子类中定义和父类同名的方法,并且方法返回值和参数必须一致
d.在类中定义final方法
 
 
 
36.以下哪个异常不是系统异常.
a.NullPointException
b.ClassCastException
c.IllegalStateException
d.UserException
 
 
37.判断程序执行的结果.
String str=null;
try
{
System.out.print(str.length());
}
catch(NullPointException err)
{
       System.out.print(“err”);
       return;
}
finally
{
       System.out.print(“finally”);
}
a.err
b.0
c.finally
d.errfinally
 
38.protected修饰符在什么情况下和public的作用相同.
a.同一个包
b.不同包
c.子类
d.final类
 
39.char类型占几个字节.
a.1
b.2
c.8
d.16
 
40.Java中的事件机制使用什么技术实现.
a.overload
b.delegate
c.interface
d.以上都不是
41.JDBC编程中Class.forName起什么作用.
a.连接数据库
b.动态载入JDBC驱动程序
c.实例化驱动程序管理器
d.实例化查询对象
 
42.XML解析中哪种解析方法需要把整个XML文档载入内存.
a.Document
b.SAX
c.DOM
d.Writer
 
43.J2EE是什么.
a.是sun的一个服务器
b.是java扩展语言
c.是基于java的操作系统
d.是一个框架,包含各种规范和服务
 
44.GC是什么?
 
答: GC是__________________.
 
 
45.Math.round(11.5)等於多少?
 Math.round(-11.5)等於多少?
 
答:
Math.round(11.5)==_______;
Math.round(-11.5)==_______;
 
 
46.启动一个线程是用run()还是start()?
答:启动一个线程是调用________.
 
 
47.构造器Constructor是否可被override?
答: _________;
 
48.请说出你所知道的线程同步的方法。
答: Wait ();_______;Allnotity();_________.
 
 
49.什么情况下调用doGet()和doPost()?
答:Jsp页面中的form标签里的method属性为get时调用______
为post时调用________.
 
 
50.________接口定义了业务方法,用于EJB客户端调用业务方法.
________接口是EJB工厂用于创建和移除查找EJB实例.
 
 
51.EJB的几种类型
答: ________;________;消息驱动的(Message Driven Bean).
 
 
52.JNDI是什么?
答: JNDI是_______________________.
 
 
53.在JAVA中,如何跳出当前的多重嵌套循环?
答: 用_____, ______方法。
 
 
 
 
 
 
 
 
 
 
 
 
原创粉丝点击