1.There were three clocks they gave alarm after 24secs, 12secs and 36 secs.if they rang simultaneously at 8:20, then at what time they again rang simultaneously? (something like this but numbers may differ). ans. 8:27:12
2. If the following statements are given
@(a,b)= (a+b)/2
/(a,b)= a/b
*(a,b)= ab
If a=1, b=2 then find
i) /(a,(@(a,b),*(a,b)))
ii) */(a,@(*(a,b)))
3. If the following statements are given
(x#y) = x + y- xy
(x*y) = (x + y)/2
i) Find the values of x, y will satisfy this equation (x#y)#(x*y) < (x#y)
ii) Find the values of x, y will satisfy this equation (a*b)#(b*c)< (a#b)*(b*c)
4. Export PS1 results in(PS1 pwd)
a) primary prompt being your current directory
b) primary prompt and secondary prompts being the current directory
c) primary prompt prompt being your home directory
d) primary prompt and secondary prompts being the home directory
e) None of the above.
5. If you type in the command nohup sort employees > list 2 > error out & and log off ,the next time you log in, the output will be
a) in a file called list and the error will de typed in a file error out
b) there will be no file called list or error out
c) error will be logged in a file called list and o/p will be in error out
d) you will not be allowed to log in
e) none of the above
6. In UNIX a files i-node ......?
Ans. Is a data structure that defines all specifications of a file like the file size,
number of lines to a file, permissions etc.
7. The UNIX shell ....
a) does not come with the rest of the system
b) forms the interface between the user and the kernal
c) does not give any scope for programming
d) deos not allow calling one program from with in another
e) all of the above
Ans. (b)
8. enum number { a= -1, b= 4,c,d,e}
What is the value of e ?
(a) 7
(b) 4
(c) 5
(d) 15
(e) 3
9. The very first process created by the kernal that runs till the kernal process is halts is
a) init
b) getty
c) both (a) and (b)
d) none of these
Ans. (a)
9. Output of the following program is
main()
{int i=0;
for(i=0;i<20;i++)
{switch(i)
case 0:i+=5;
case 1:i+=2;
case 5:i+=5;
default i+=4;
break;}
printf("%d,",i);
}
}
a) 0,5,9,13,17
b) 5,9,13,17
c) 12,17,22
d) 16,21
e) Syntax error
Ans. (d
10. What is the output in the following program
main()
{char c=-64;
int i=-32
unsigned int u =-16;
if(c>i)
{printf("pass1,");
if(c
printf("pass2");
else
printf("Fail2");
}
else
printf("Fail1);
if(i
printf("pass2");
else
printf("Fail2")
}
a) Pass1,Pass2
b) Pass1,Fail2
c) Fail1,Pass2
d) Fail1,Fail2
e) None of these
Ans. (c)
11.the number of multiplications done in square matrix of order n?
12.If 1st Jan is a Sunday then find the number of Sundays in that year?
13.If there r 20 black and 20 white socks, then find the number of chances which will help to collect three pair of socks?
14.There r 180 coins totally comprising of 10p and 25p coins. contributing to 36.90 rs. Find the number of 10p coins?
15.there r three persons A,B,C.out of which one says always the truth. other 2 always speaks false. each one makes a statement?
1.i am not A
2.I am not B.
3.I am C.
16.int c
while(c!=getchar()!=#)
putchar();
} if the input is ABCD# ,what will b the output?
17.Inline function is used for?
18.comment:
{
float a,b,c;
if(b*b-4*a*c)=0.0printf(“the roots r equal”);
}
19.
int x=14,y=10,z=3;
x*=y+1+z;
printf(“%d”,x);
}what is the value of x
20. If A can do a particular work in 8 days. B can do the work in 6 days. By C joining with them, they can finish the work in 3 days. If Rs.540 was paid to them, what is the share of C?
21. What is the order of Hashing time:
a) 0(1)
b) 0(n2)
22. Given that:
s -> s + s ; s -> s * s ; s -> a
Find the no of parse trees for a+a*a+a
a) 4
b) 5
c) 6
d) 7
23. Order of deleting a node from a linked list. (pointer is to an arbitrary node)
a)0(1)
b)0(n)
24. A chocolate of size nXn is given and is to be made into pices of size 1x1. At a time both horizontal and a vertical cut is done. Find the order of complexity
a) O(n2)
b) O(nlogn)
c) O(logn)
25. A directed graph is represented by adjacency list. To find the complexity of in degree of the node. e - edge n- vertices
26. No of leaf nodes given. find the no of nodes with degree 2.
27. AX = B. A is mXn and B is mX1
a) there is a unique solution if rank of A is same as rank of augumented matrix [A b]
b) there are multiple solutions
28. LXI sp,2099h
LXI b, 2012h
PUSH b
29. A and B are sets.
A's cardinality is m and B's is n where m < n .How many one to one mappings can be obtained.
a) n ^ m
b) npm
c) mpn
d) mcn
30. In scheduling algorithms which are logically executed but suspended
a) preemptive
b) SJF
c) non preemptive
d) all the above
31. In TCP/IP header, checksum contains
a) sum of all the words
b) ones complement of the data
c) ones complement of the sum of all the words
d) ones complement of the sum in ones complement
32. What is the maximum number of acknowledgements for a 4 bit sequence number in a sliding window protocol.
33. Which is a good way of representing variables in recursion
a) local variables
b) static variables
c) global variables
34. Given the following c program
func()
{
static int i = 10;
printf("%d",i);
i++;
}
What is the value of i if the function is called twice ?
35. Given the following c program
func(int *i, int*j)
{*i=*i * *i;
*j=*j* *j;
}
main()
{ int i = 5, j = 2;
func(&i,&j);
printf("%d %d", i, j);}
What is the output?
36. Given page table, page size and offset find the corresponding physical address ?
37. In a memory chip 4k size and 16bit words are to be stored. No of address and data lines required is:
38. Identify in which pass of the 2 pass compiler are the following compiled
1) literals
2) address resolution
3) listing
39. Object code does not require
a) relocation bits
b) external names and place where they are located
c) absolute adress
d) all the object codes
40. ARP is in reference to
a) MAC to IP
b) IP to MAC
2. If the following statements are given
@(a,b)= (a+b)/2
/(a,b)= a/b
*(a,b)= ab
If a=1, b=2 then find
i) /(a,(@(a,b),*(a,b)))
ii) */(a,@(*(a,b)))
3. If the following statements are given
(x#y) = x + y- xy
(x*y) = (x + y)/2
i) Find the values of x, y will satisfy this equation (x#y)#(x*y) < (x#y)
ii) Find the values of x, y will satisfy this equation (a*b)#(b*c)< (a#b)*(b*c)
4. Export PS1 results in(PS1 pwd)
a) primary prompt being your current directory
b) primary prompt and secondary prompts being the current directory
c) primary prompt prompt being your home directory
d) primary prompt and secondary prompts being the home directory
e) None of the above.
5. If you type in the command nohup sort employees > list 2 > error out & and log off ,the next time you log in, the output will be
a) in a file called list and the error will de typed in a file error out
b) there will be no file called list or error out
c) error will be logged in a file called list and o/p will be in error out
d) you will not be allowed to log in
e) none of the above
6. In UNIX a files i-node ......?
Ans. Is a data structure that defines all specifications of a file like the file size,
number of lines to a file, permissions etc.
7. The UNIX shell ....
a) does not come with the rest of the system
b) forms the interface between the user and the kernal
c) does not give any scope for programming
d) deos not allow calling one program from with in another
e) all of the above
Ans. (b)
8. enum number { a= -1, b= 4,c,d,e}
What is the value of e ?
(a) 7
(b) 4
(c) 5
(d) 15
(e) 3
9. The very first process created by the kernal that runs till the kernal process is halts is
a) init
b) getty
c) both (a) and (b)
d) none of these
Ans. (a)
9. Output of the following program is
main()
{int i=0;
for(i=0;i<20;i++)
{switch(i)
case 0:i+=5;
case 1:i+=2;
case 5:i+=5;
default i+=4;
break;}
printf("%d,",i);
}
}
a) 0,5,9,13,17
b) 5,9,13,17
c) 12,17,22
d) 16,21
e) Syntax error
Ans. (d
10. What is the output in the following program
main()
{char c=-64;
int i=-32
unsigned int u =-16;
if(c>i)
{printf("pass1,");
if(c
printf("pass2");
else
printf("Fail2");
}
else
printf("Fail1);
if(i
printf("pass2");
else
printf("Fail2")
}
a) Pass1,Pass2
b) Pass1,Fail2
c) Fail1,Pass2
d) Fail1,Fail2
e) None of these
Ans. (c)
11.the number of multiplications done in square matrix of order n?
12.If 1st Jan is a Sunday then find the number of Sundays in that year?
13.If there r 20 black and 20 white socks, then find the number of chances which will help to collect three pair of socks?
14.There r 180 coins totally comprising of 10p and 25p coins. contributing to 36.90 rs. Find the number of 10p coins?
15.there r three persons A,B,C.out of which one says always the truth. other 2 always speaks false. each one makes a statement?
1.i am not A
2.I am not B.
3.I am C.
16.int c
while(c!=getchar()!=#)
putchar();
} if the input is ABCD# ,what will b the output?
17.Inline function is used for?
18.comment:
{
float a,b,c;
if(b*b-4*a*c)=0.0printf(“the roots r equal”);
}
19.
int x=14,y=10,z=3;
x*=y+1+z;
printf(“%d”,x);
}what is the value of x
20. If A can do a particular work in 8 days. B can do the work in 6 days. By C joining with them, they can finish the work in 3 days. If Rs.540 was paid to them, what is the share of C?
21. What is the order of Hashing time:
a) 0(1)
b) 0(n2)
22. Given that:
s -> s + s ; s -> s * s ; s -> a
Find the no of parse trees for a+a*a+a
a) 4
b) 5
c) 6
d) 7
23. Order of deleting a node from a linked list. (pointer is to an arbitrary node)
a)0(1)
b)0(n)
24. A chocolate of size nXn is given and is to be made into pices of size 1x1. At a time both horizontal and a vertical cut is done. Find the order of complexity
a) O(n2)
b) O(nlogn)
c) O(logn)
25. A directed graph is represented by adjacency list. To find the complexity of in degree of the node. e - edge n- vertices
26. No of leaf nodes given. find the no of nodes with degree 2.
27. AX = B. A is mXn and B is mX1
a) there is a unique solution if rank of A is same as rank of augumented matrix [A b]
b) there are multiple solutions
28. LXI sp,2099h
LXI b, 2012h
PUSH b
29. A and B are sets.
A's cardinality is m and B's is n where m < n .How many one to one mappings can be obtained.
a) n ^ m
b) npm
c) mpn
d) mcn
30. In scheduling algorithms which are logically executed but suspended
a) preemptive
b) SJF
c) non preemptive
d) all the above
31. In TCP/IP header, checksum contains
a) sum of all the words
b) ones complement of the data
c) ones complement of the sum of all the words
d) ones complement of the sum in ones complement
32. What is the maximum number of acknowledgements for a 4 bit sequence number in a sliding window protocol.
33. Which is a good way of representing variables in recursion
a) local variables
b) static variables
c) global variables
34. Given the following c program
func()
{
static int i = 10;
printf("%d",i);
i++;
}
What is the value of i if the function is called twice ?
35. Given the following c program
func(int *i, int*j)
{*i=*i * *i;
*j=*j* *j;
}
main()
{ int i = 5, j = 2;
func(&i,&j);
printf("%d %d", i, j);}
What is the output?
36. Given page table, page size and offset find the corresponding physical address ?
37. In a memory chip 4k size and 16bit words are to be stored. No of address and data lines required is:
38. Identify in which pass of the 2 pass compiler are the following compiled
1) literals
2) address resolution
3) listing
39. Object code does not require
a) relocation bits
b) external names and place where they are located
c) absolute adress
d) all the object codes
40. ARP is in reference to
a) MAC to IP
b) IP to MAC
For Further Reading,
0 comments:
Post a Comment