Ibm
Ibm
BM i
nter
viewpr
ocedur
e
i
bm apt
it
udequest
ions
1.I
n1978,
akgofpaperwassol
datRs25/
-.
Ift
hepaper
r
atei
ncr
easesat1.
5%mor
ethant
hei
nfl
ati
onr
atewhi
ch
i
s6.
5%ay
ear
,thenwhatwi
lbet
hecostofakgofpaper
af
ter2y
ear
s?
(
a)29.
12
(
b)29.
72
(
c)30.
12
(
d)32.
65
(
e)noneoft
hese
2.I
nA,
B,Car
ehav
ingsomemar
bleswi
theachoft
hem.A
hasgi
venBandCt
hesamenumberofmar
bleseachoft
hem
al
readyhav
e.Then,
Bgav
eCandAt
hesamenumberof
mar
blest
heyal
readyhav
e.ThenCgav
eAandBt
hesame
numberofmar
blest
heyal
readyhav
e.Att
heendA,
B,andC
hav
eequal
numberofmar
bles.
(
i)I
fx,
y,
zar
ethemar
blesi
nit
ial
l
ywi
thA,
B,C
r
espect
ivel
y.
�
�
�
Thent
henumberofmar
blesBhav
eatt
heend
(
a)2(
x-y
-z)
(
b)4(
x-y
-z)
(
c)2(
3y-
x-z)
(
d)�
x+y
-z
Ans.(
c)
(
ii
)Ift
het
otal
numberofmar
blesar
e72,
thent
henumber
ofmar
bleswi
thAatt
hest
art
ing
(
a)20
(
b)30
(
c)32
(
d)39
Ans.(
d)
3.I
facarst
art
sfr
om At
owar
dsBwi
thsomev
eloci
ty.
Due
t
osomepr
obl
em i
ntheengi
neaf
tert
rav
ell
i
ng30km,
the
cargoeswi
th4/
5thofi
tsact
ual
vel
oci
ty.
Thecarr
eaches
B45mi
nlat
ert
otheact
ual
time.
Ift
hecarengi
nef
ail
s
of
tert
rav
ell
i
ng45km,
thecarr
eachest
hedest
inat
ionB36
mi
nlat
etot
heact
ual
time.
Whati
sthei
nit
ial
vel
oci
tyof
carandwhati
sthedi
stancebet
weenAandBi
nkm
Ans.20&130.
4.Aper
sonhasRs100/
-inhi
spocket
,hecanas25
penci
l
sor15books.
Hekept15%oft
hemoneyf
ort
rav
ell
i
ng
expensesandpur
chased5penci
l
s.Sohowmanybookshecan
pur
chasewi
tht
her
emai
ningmoney
.
5.Tenquest
ionsonanal
ogi
es.
eg:
chi
ef:
tri
be:
:gov
erner:
stat
e
�
�
�
�
epaul
ett
e:shoul
der:
:ti
ara:
head
�
�
�
�
gut
tur
al:
thr
oat:
:gast
ri
c:st
omach
�
�
�
�
inept:
clev
er:
:l
angui
d:act
ive
�
�
�
�
kni
fe:
but
cher:
:
�
�
�
�
hammer:
car
pent
er:
:
�
�
�
6.Thev
aluesofshar
es(
inRs)
.ofA,
BandCf
rom Januar
y
t
oJunear
easf
oll
ows.
Mont
h
A
Januar
y
30
60
80
Febr
uar
y
35
65
85
Mar
ch
45
75
65
Apr
il
40
75
82
May
55
75
85
June
50
75
80
i
)Dur
ingt
hisper
iodwhi
chshar
ehasunder
gonemaxi
mium
f
luct
uat
ion?
i
i
)Inwhi
chmont
hiti
spossi
blet
obuyBandCsel
l
ingA?
i
i
i)I
nwhi
chmont
htheshar
eval
uesar
ever
ylow?
i
v)Bypur
chasi
ngoneshar
eofAand4eachofBandCi
n
t
hebegi
nni
ngoft
heper
iod,
whenshoul
dthesebesol
dto
getmaxi
mum pr
ofi
t?
7.I
nacomput
eri
nst
it
ute9l
anguagescanbet
aught
.The
modul
eisof6mont
hsdur
ati
onandoft
hesi
xlanguages
onl
yonecanbet
aughteachmont
h.I
naddi
ti
ont
othatBASI
C
i
sal
way
staughtandshoul
dbei
nfi
rstmont
hit
sel
f.
·WORDPERFECTi
stobet
aughti
nthepr
eceedi
ng
weekofWORDSTAR.
·FORTRANcannotbet
aughtunt
ilCOBALi
staught
pr
iort
othat
.
·BI
NO,
FIFOcannev
erbet
aughti
nsi
ngl
emodul
e.
Languagesar
eBASI
C,WORDSTAR,
WORDPERFECT,
FORTRAN,
COBAL,
BINO,
FIFO,
LOTUS,
C.
i
)Ifwor
dst
ari
sin3r
dmont
h,whatcoul
dbei
n6t
h
mont
h.
i
i
)IfCOBALi
sint
he2ndmont
handBI
NOi
n6t
hmont
h.
FORTRANwi
l
lbet
aughti
nwhi
chmont
h.
8.I
nacl
ass,
except18al
lar
eabov
e50y
ear
s.15ar
e
bel
ow50y
ear
sofage.Howmanypeopl
ear
ether
e?
(
a)30
(
b)33
(
c)36
(
d)noneoft
hese.
Ans.(
d)
9.Asquar
epl
ateofsomesi
zei
scutatf
ourcor
ner
s.
Equal
squar
esoft
hesamesi
zear
ecutandi
sfor
medas
openbox.
Ift
hisopenboxcar
ri
es128ml
ofoi
l
.Whati
s
t
hesi
zeoft
hesi
deoft
hepl
ate?
(
a)17
(
b)14
(
c)13
(
d)Noneoft
hese
10.I
nasquar
e,al
lthemi
dpoi
ntsar
ejoi
ned.Thei
nner
squar
eisshaded.
I
fthear
eaoft
hesquar
eisA,
whati
sthear
eaof
t
heshadedar
ea?
11.Twoquest
ionsonbasi
cangl
esi
.egi
venaci
rcl
e,af
ew
chor
dsordi
amet
eri
sdr
awnet
c.
12.I
fthef
oll
woi
ngst
atement
sar
egi
ven
·@(
a,b)
=(a+b)
/2
·/
(a,
b)=a/
b
·*
(a,
b)=ab
I
fa=1,
b=2t
henf
ind
i
)/(
a,(
@(a,
b),
*(
a,b)
))
i
i
)*/
(a,
@(*
(a,
b))
)
UNI
Xquest
ions
16.I
nUNI
Xaf
il
esi
-node.
..
..
.?
Ans.I
sadat
ast
ruct
uret
hatdef
inesal
lspeci
fi
cat
ionsof
af
il
eli
ket
hef
il
esi
ze,
numberofl
i
nest
oaf
il
e,
per
missi
onset
c.
17.TheUNI
Xshel
l.
..
.
a)doesnotcomewi
tht
her
estoft
hesy
stem
b)f
ormst
hei
nter
facebet
weent
heuserandt
heker
nal
c)doesnotgi
veanyscopef
orpr
ogr
ammi
ng
d)deosnotal
l
owcal
l
ingonepr
ogr
am f
rom wi
thi
nanot
her
e)al
loft
heabov
e
Ans.(
b)
18.enum number{a=-
1,b=4,
c,
d,
e}
�
�
�
�
�
Whati
sthev
alueofe?
(
a)7
(
b)4
(
c)5
(
d)15
(
e)3
19.Thev
eryf
ir
stpr
ocesscr
eat
edbyt
heker
nal
thatr
uns
t
il
ltheker
nal
processi
shal
tsi
s
a)i
nit
b)get
ty
c)bot
h(a)and(
b)
d)noneoft
hese
Ans.(
a)
Ct
estquest
ionsI
BM
20.Out
putoft
hef
oll
owi
ngpr
ogr
am i
s
mai
n()
{
inti
=0;
f
or(
i=0;
i
<20;
i
++)
{
swi
tch(
i)
case0:
i
+=5;
case1:
i
+=2;
case5:
i
+=5;
def
aul
ti+=4;
br
eak;
}
pr
int
f("
%d,
",
i
);
a)0,
5,
9,
13,
17
b)5,
9,
13,
17
c)12,
17,
22
d)16,
21
e)Sy
ntaxer
ror
Ans.(
d)
21.Whati
stheoupt
uti
nthef
oll
owi
ngpr
ogr
am?
mai
n()
{
charc=-
64;
i
nti
=-32
unsi
gnedi
ntu=-
16;
i
f(
c>i
)
{
pri
ntf
("pass1,
")
;
i
f(
c<u)
pr
int
f("
pass2"
);
el
se
pr
int
f("
Fai
l
2")
;
el
se
pr
int
f("
Fai
l
1);
i
f(
i<u)
pr
int
f("
pass2"
);
el
se
pr
int
f("
Fai
l
2")
a)Pass1,
Pass2
b)Pass1,
Fai
l
2
c)Fai
l
1,Pass2
d)Fai
l
1,Fai
l
2
e)Noneoft
hese
Ans.(
c)
22.I
nthepr
ocesst
abl
eent
ryf
ort
heker
nel
process,
the
pr
ocessi
dval
uei
s
(
a)0
(
b)1
(
c)2
(
d)255
(
e)i
tdoesnothav
eapr
ocesst
abl
eent
ry
Ans.(
a)
23.Whi
choft
hef
oll
owi
ngAPIi
susedt
ohi
deawi
ndow
a)ShowWi
ndow
b)Enabl
eWi
ndow
c)Mov
eWi
ndow
d)Set
WindowPl
acement
e)Noneoft
heabov
e
Ans.(
a)
24.Whatwi
l
lthef
oll
owi
ngpr
ogr
am do?
v
oidmai
n()
i
nti
;
chara[
]="
Str
ing"
;
char*
p="
NewSr
ing"
;
char*
Temp;
Temp=a;
a=mal
l
oc(
str
len(
p)+1)
;
st
rcpy
(a,
p);
//Li
nenumber
:9/
/
p=mal
l
oc(
str
len(
Temp)+1)
;
st
rcpy
(p,
Temp)
;
pr
int
f("
(%s,
%s)
",
a,
p);
f
ree(
p);
f
ree(
a);
}/
/Li
nenumber15/
/
a)Swapcont
ent
sofp&aandpr
int
:(
Newst
ri
ng,
str
ing)
b)Gener
atecompi
l
ati
oner
rori
nli
nenumber8
c)Gener
atecompi
l
ati
oner
rori
nli
nenumber5
d)Gener
atecompi
l
ati
oner
rori
nli
nenumber7
e)Gener
atecompi
l
ati
oner
rori
nli
nenumber1
Ans.(
b)
25.I
nthef
oll
owi
ngcodesegmentwhatwi
l
lbet
her
esul
t
oft
hef
unct
ion,
val
ueofx,
val
ueofy
{
unsi
gnedi
ntx=-
1;
i
nty
;
y=~0;
i
f(
x==y
)
pr
int
f("
same"
);
el
se
pr
int
f("
notsame"
);
a)same,
MAXI
NT,
-1
b)notsame,
MAXI
NT,
-MAXI
NT
c)same,
MAXUNI
T,-
1
d)same,
MAXUNI
T,MAXUNI
T
e)notsame,
MAXI
NT,
MAXUNI
T
Ans.(
a)
26.PATH=/
bin:
/usr:
/your
home
�
�
�
�
�
Thef
il
e/bi
n/cal
enderhast
hef
oll
owi
ngl
i
nei
nit
cal
101997
Thef
il
e/y
our
home/
cal
enderhast
hef
oll
owi
ngl
i
nei
nit
cal
51997
I
fthecur
rentdi
rect
oryi
s/y
our
homeandcal
enderi
s
execut
ed
a)Thecal
endarf
orMay1997wi
l
lbepr
int
edonscr
een
b)Thecal
endarf
orOct1997wi
l
lbepr
int
edonscr
een
c)Thecal
endarf
ort
hecur
rentmont
h(what
everi
tis)wi
l
l
bepr
int
ed
d)Not
hingwi
l
lgetpr
int
edonscr
een
e)Aner
rormassagewi
l
lbepr
int
ed
27.Whatwi
l
lbet
her
esul
toft
hef
oll
owi
ngpr
ogr
am ?
char*
gxxx(
)
{
stat
iccharxxx[
1024]
;
r
etur
nxxx;
mai
n()
{
char*
g="
str
ing"
;
st
rcpy
(gxxx(
),
g);
g=gxxx(
);
st
rcpy
(g,
"ol
dst
ri
ng"
);
pr
int
f("
Thest
ri
ngi
s:%s"
,gxxx(
));
a)Thest
ri
ngi
s:st
ri
ng
b)Thest
ri
ngi
s:Ol
dst
ri
ng
c)Runt
imeer
ror
/Cor
edump
d)Sy
ntaxer
rordur
ingcompi
l
ati
on
e)Noneoft
hese
Ans.(
b)
28.Whatwi
l
lber
esul
toft
hef
oll
owi
ngpr
ogr
am?
v
oidmy
all
oc(
char*
x,i
ntn)
{
x=(
char*
)mal
l
oc(
n*si
zeof
(char
));
memset
(x,
\0,
n*si
zeof
(char
));
mai
n()
{
char*
g="
Str
ing"
;
my
all
oc(
g,20)
;
st
rcpy
(g,
"Ol
dst
ri
ng"
);
pr
int
f("
Thest
ri
ngi
s%s"
,g)
;
a)Thest
ri
ngi
s:St
ri
ng
b)Runt
imeer
ror
/Cor
edump
c)Thest
ri
ngi
s:Ol
dst
ri
ng
d)Sy
ntaxer
rordur
ingcompi
l
ati
on
e)Noneoft
hese
29.Whi
choft
hef
oll
owi
ngf
unct
ioni
susedt
orepai
nta
wi
ndowi
mmedi
atel
y
a)Sendmessage(
hWnd,
WM_
PAI
Nt,
.
..
..
.)
b)I
nval
i
dat
eRect
(.
..
..
..
)
c)Mov
eWi
ndow
d)WM_
COPY
e)None
30.Whi
chf
unct
ioni
stheent
rypoi
ntf
oraDLLi
nMS
Wi
ndows3.
1
a)Mai
n
b)Wi
nmai
n
c)Dl
l
mai
n
d)Li
bmai
n
e)None
Ans.(
b)
31.Thest
andar
dsour
cef
orst
andar
dinput
,st
andar
dout
put
andst
andar
der
rori
s
a)t
het
ermi
nal
b)/
dev
/nul
l
c)/
usr
/you/
input
,/usr
/you/
out
put
/,/
usr
/you/
err
or
r
espect
ivel
y
d)None
Ans.(
a)
32.Whatwi
l
lbet
her
esul
toft
hef
oll
owi
ngpr
ogr
am?
mai
n()
{
charp[
]="
Str
ing"
;
i
ntx=0;
i
f(
p=="
Str
ing"
)
{
pri
ntf
("Pass1"
);
i
f(
p[si
zeof
(p)
-2]
=='
g'
)
pr
int
f("
Pass2"
);
el
se
pr
int
f("
Fai
l2"
);
el
se
pr
int
f("
Fai
l1"
);
i
f(
p[si
zeof
(p)
-2]
=='
g'
)
pr
int
f("
Pass2"
);
el
se
pr
int
f("
Fai
l2"
);
a)Pass1,
Pass2
b)Fai
l1,
Fai
l2
c)Pass1,
Fai
l2
d)Fai
l1,
Pass2
e)sy
ntaxer
rordur
ingcompi
l
ati
on
33.Whi
choft
hechoi
cesi
str
uef
ort
hement
ioned
decl
arat
ion?
constchar*
p;
and
char*constp;
a)Youcan'
tchanget
hechar
act
eri
nbot
h
b)Fi
rst:
Youcan'
tchanget
hechar
act
err&Second:
You
can;
tchanget
hepoi
nter
c)Youcan'
tchanget
hepoi
nteri
nbot
h
d)Fi
rst:
Youcan'
tchanget
hepoi
nter&Second:
You
can'
tchanaget
hechar
act
er
e)None
34.Ther
edi
rect
ionoper
ator
s>and»
a)dot
hesamef
unct
ion
b)di
ff
er:
>ov
erwr
it
es,
whi
l
e»appends
c)di
ff
er:
>isusedf
ori
nputwhi
l
e»i
susedf
orout
put
d)di
ff
er:
>wr
it
etoanyf
il
ewhi
l
e»wr
it
eonl
yto
st
andar
dout
put
e)Noneoft
hese
Ans.(
b)
35.Thecommandgr
epf
ir
stsecondt
hir
d/usr
/you/
myf
il
e
a)pr
int
sli
nescont
aini
ngt
hewor
dsf
ir
st,
secondort
hir
d
f
rom t
hef
il
e/usr
/you/
myf
il
e
b)sear
chesf
orl
i
nescont
aini
ngt
hepat
ter
nfi
rsti
nthe
f
il
es
second,
thi
rd,
and/
usr
/you/
myf
il
eandpr
int
sthem
c)sear
chest
hef
il
es/
usr
/you/
myf
iel
andt
hir
dforl
i
nes
cont
aini
ngt
hewor
dsf
ir
storsecondandpr
int
sthem
d)r
epl
acest
hewor
dfi
rstwi
tht
hewor
dsecondi
nthe
f
il
est
hir
dand/
usr
/you/
myf
il
e
e)Noneoft
heabov
e
Ans.(
b)
I
BM Pl
acementPaper
s|I
BM Techni
cal
TestQuest
ions|
IBM
Apt
it
udeQuest
ions|
IBM I
nter
viewPr
ocedur
e|I
BM
I
nter
viewQuest
ions