Monday, June 9, 2008

paper 5

14).flow chart ans:a
15
1.R=22.J=R*R-R3.R=R+14.K=R*R-R5.print K-J6.let J=K7.if R.8 then stop8.go to 3
the result of the above logic is(a)4,9,16,25.... (b)4,6,8,10.... (c)4,4,4,4.... (d)none
ans (b)(check)
16>flow chart is remainder of
N=66---->D=N/2--->N=D+1------> N/2=0 ------>stop
^ !
no
! ; - ---------------
after how much iteration will the above logic
terminate
(a)8 (b)6 (c)7 (d) none ans.(d) check
**17.
1.T=1
2.T1=T*1000
3.T2=T+1
4.T3=T2*100
5.T4=T2+1
6.T5=T4*10
7.T6=T4+1
8.T7=T1+T3+T6+T5
9.print T7
10.T=T+1
11.if T<8 then 2
12.stop
which of the following value will not ptinted by above
logic
(a)6789 (b)7890 (c)7900 (d) none
ans (b) 7890

q18))
ans:c is j>10 hint: k=3,j=2......

Q19)
flowchart
ans:a)200

Q20)
flowchart
ans:a)21

Q21)
flowchart
ans:a)10 (confirm the question)

q22)
flowchart
ans:c(4x+8y)

q23)
ans:c)4-6-5-1-3-2

q24)flowchart
ans:b(17)

q25)a person distribute his pen among four friends in
the ratio
1/3,1/4,1/5,1/6.....

ans:b(minimum he should have)

Q26)
1.let the value of N be 10
2.divide N by 10 to give quotient (Q) remainder(R)
3.diff=R-Q
4.if diff=1 then 6
5.go to step 7
6.display the value of N
7.add 1 to N
8.if N <100 go to step 2
the above logic will produce
(a)11,12,13,,14..(b)12,23,34,.....(C)21,32,4,354......(d)none

ans:d(none)

Q27)flowchart
ans:b(36,45,25)

Q28)flowchart
ans:b(375)

Q29)a man has Rs. 128 in currency of one rupee........
ans:a(24)

Q30)when A is devided by B,it is reqd tro round of the
result to the
nereast whole no,the logic is giv en below .give the
correct sequence
1. divide A by B giving correct s! equence
2.substract INTERGER(A/B) from C and store theresult
in D
3.if reminder (A/B) is 0 then stop
4.print INTERGER (A/B)
5.if D>.49,increase the value of INTRGER (A/B) by 1
(A)1,3,2,5,4(B)1,3,2,4,5(C)1,2,3,5,4(D) none

ans:a(1,3,2,5,4)

Q31)A cistren is filled by 9 hours.......
ans:a)90 hours

Q32)
ans:c(42)

Q33)
flowchart
ans:d(none)

**34>
When madan said that he was burn on 31-9-83,everybody
laughed.the
logical sequence of steps involved in reduculing
madan's statement r
given
below

1.if the day of birth is >Y(month of birth)then wrong
2.since 1983 is not a leap year february has 28 days
3. store 31,28,31,....31 in an array y(12)
4.month of birth is not less than 1 and not greater
than 12,
therefore
month of birth is valid

the right sequence of steps is
a)3-1-4-2
b)3-2-4-1
c)3-2-1-4
d)none
ans:b(check)

35).
the logic to! convert a 3 digit number to a word is
given, Ex 123
should
be written as One Two Three

1. accept the number N
2. if N <> 999 go to step 1
3. Split N into hundreds(H), Tens (T), & Units(U)
4. Store words zero,one,two,....... in array W(10)
5. print W(H),W(T),W(U)
6. Stop
The above logic is
a) incomplete b) complete c) complete but inefficient
d)none
ans: b

No comments: