Questions 1 -5 are reference to the followig psedo code
{
input m,n,z
TEST:if ((m+n)/3>5)z=z+1 else z =z-1
printf m,n,z
{
(m-m+1;n=n-3)
if (m+n+2)>14 then goto test
print m,n,z
end
}
1. what is the final output of the if the input is 2,14,12 (m,n,z)
a)1,8,4 b)1,4,8 c)4,8,1 d)8,4,2
ans=C.
2. what is the final output if the input is 1,18,2? (m,n,z)
ans) 5,6,2 i.e ans =c.
3. How many times is TEST execute ed if the input is 2,14,1?
ans) twice ans=c.
4) How many times the TEST exected if the input is 1,18,2?
ans)four times
5) what are the values taken by Z when input being 8,24,1?
a)only 5 b)only 6 c)neither 5 or 6 d)both 5 and 6
ans)D.
6) the function f(x) is defined as follows
if x=0 then f(x) =1
if x>0 then if ((x>10)then f(x) =x-10 else f(x) =x+1))
if x<0 then if (x**2 <100) then f(x) =f(-x+1) else f(x) =f(-(x+1))
6) the above of f(2) +f(-3) is
ans=8.
7) the value of f(8)+f(9) is
ans=20
8) the value of f(1)+f(2)+f(3).............+f(10) is
ans=65
9) the value of f(-10)+f(-9)+f(-8) is
a) 33 b)25 c)-27 d)27
11. 1997 haeadecimal is
a)7cb b)7cd c)7cf d)7ca
ans-c
12. the remainder when 9FA (hexa) is divided by 8 is added to the
12(to base ten) to get x.then x has the binary opertion
ans=1110
13. the remainder when 1221 (in hexa) is diveded by 17(decimal) in (hexa)is
ans=0
14. The binary number 100010011 will the hexa representation
ans=113
15. The binary number 10011001 will the octal representation
ans=463
16 Find the odd man out
16 a) Intel b)motorola c)nec d)Ibm
ans =nec
17. a)BIt b)byte c)nibble d)field
ans= field
18 a)Tree b)Root c)Log d)leaf
ans=log
19. a)ROM b)PROM c)EPROM d)EEPROM
ans=ROM
20. a)MOVE b)DEL c)COPY d)REN
ans=DEL
No comments:
Post a Comment