2011 Siemens Placement Paper:

1.which of following operator can't be overloaded.
a)== b)++ c)?! d)<=

2.

#include<iostream.h>
main()
{
printf("Hello World");
}
the program prints Hello World without changing main() the o/p should be initialization Hello World Destruct the changes should be
a)iostream operator<<(iostream os, char*s) os<<'intialisation'<<(Hello World)<<Destruct
b) c) d)none of the above

3.CDPATH shell variable is in(c-shell)

a) b) c) d)

4. semaphore variable is different from ordinary variable by

5. swap(int x,y)
{
int temp;
temp=x;
x=y;
y=temp;
}
main()
{
int x=2;y=3;
swap(x,y);
}
after calling swap ,what are yhe values x&y?

6.

static variable will be visible in
a)fn. in which they are defined
b)module " " " "
c)all the program
d)none

7.

unix system is
a)multi processing
b)multi processing ,multiuser
c)multi processing ,multiuser,multitasking
d)multiuser,multitasking

8.

x.25 protocol encapsulates the follwing layers
a)network
b)datalink
c)physical
d)all of the above
e)none of the above

9.

TCP/IP can work on
a)ethernet
b)tokenring
c)a&b
d)none

10.

A node has the ip address 138.50.10.7 and 138.50.10.9.But it is transmitting data from node1 to node2only. The reason may be
a)a node cannot have more than one address
b)class A should have second octet different
c)classB " " " " "
d)a,b,c

11.

for an application which exceeds 64k the memory model should be
a)medium
b)huge
c)large
d)none

12.

The condition required for dead lock in unix sustem is

13.

set-user-id is related to (in unix)

14.

wrong statement about c++
a)code removably
b)encapsulation of data and code
c)program easy maintenance
d)program runs faster

15.

struct base
{
int a,b;
base();
int virtual function1();
}
struct derv1:base{
int b,c,d;
derv1()
int virtual function1();
}
struct derv2 : base
{int a,e;
}
base::base()
{
a=2;b=3;
}
derv1::derv1(){
b=5;
c=10;d=11;}
base::function1()
{return(100);
}
derv1::function1()
{
return(200);
}
main()
base ba;
derv1 d1,d2;
printf("%d %d",d1.a,d1.b)
o/p is
a)a=2;b=3;
b)a=3; b=2;
c)a=5; b=10;
d)none

16.

for the above program answer the following q's
main()
base da;
derv1 d1;
derv2 d2;
printf("%d %d %d",da.function1(),d1.function1(),d2.function1());
o/p is
a)100,200,200;
b)200,100,200;
c)200,200,100;
d)none
17.

struct {
int x;
int y;
}abc;
you can not access x by the following
1)abc-->x;
2)abc[0]-->x;
abc.x;
(abc)-->x;
a)1,2,3
b)2&3
c)1&2
d)1,3,4

18.

automatic variables are destroyed after fn. ends because
a)stored in swap
b)stored in stack and poped out after fn. returns
c)stored in data area
d)stored in disk
19.

variable DESTDIR in make program is accessed as
a) $(DESTDIR)
b) ${DESTDIR}
c) DESTDIR
d) DESTDIR
20.



The keystroke mouse entrie are interpreted in ms windows as
a) interrupt
b) message
c) event
d) none of the above