Friday, June 14, 2019

Data structures

1. The expression  E+(A+B)*D)-C can be written in reverse polish notation
Step 1: Reverse polish notation is as sames as post fix notation
Ans = EAB+D*+C-

2. the average worst case performance of a quick sort algorithm is
Ans 𝚯(nlogn)

3. The mo of edges in a regular graph of degree d and n vertices is
Ans. nd/2

4.The depth of binary tree is
Ans. log n+1

5.Post fix notation of ((A+B)*C-D-E)ᐁ(F+G)
Hint: convert the options into infix and try to get the question
Ans: AB-C*DE--FG+Aᐁ

6.Merge sort is uses divide and conquer

7. which data structure  allows deleting data elements from front and inserting at rear?
 KERALA PSC
A. Stacks
B. Queue
C. De ques
D. Binary Search Tree
Ans:Queue
Explanation: Queue is line like a  ticket counter . first in first out. delete from front and insertion on other end
On De ques insertion and deletion takes place in both ends
On stacks LIFO

8. Which of the following data structure is linear type ?
 KERALA PSC
A. Strings
B. Lists
C. Queues
D. All of the above

Ans:All of the above

9. Which data structure can be used to efficiently implement Dijkstra's algorithm?

Kerala PSC System analyst Post 2019

A. Double Ended Queue
B. Priority Queue
C. Stack
D. Binary Search Tree

Ans: Priority Queue

Explanation:  Dijkstra's algorithm

To find shortest path.
Main application in computer networks when a message sent from the receiver.
if there is many host in computer networks it finds the destination by using Dijkstra's algorithm



Dijkstra’s Shortest Path Algorithm 

Find shortest path of each node



NODE
SHORTEST PATH
0
0
1
4
2
12
3
19
4
21
5
11
6
9
7
8
8
14



 For node 4 there is 2 way



from node 0 to 4

that is 8+1+2+10=21

another path is 4+8+7+9=28

here shortest path is 21



10. The height of a tree is the length of the largest root to leaf in it.
      The maximum and minimum number of nodes in a binary tree of height 5 is
      To find maximum number of nodes (2h+1-1)

Ans: Here h=5
     ∴ 25+1-1
      26-1=64-1
       =63
    To find minimum number of nodes =h+1

           5+1 =6
         ∴ Maximum and minimum number of nodes are 63,6 



11. A Euler Graph one which
Ans) All vertices are of even degree
12. A graph in which all nodes are of equal degree is known as
Ans) Regular graph













Tuesday, June 11, 2019

Operating System Questions

1. The Bankers Algorithm is used
A. To prevent deadlock in operating system
B. To detect deadlock in operating system
C. To avoid deadlock in operating system
D. Number of segment faults are less
Ans : To avoid deadlock in operating system
Explanation : The Bankers Algorithm is used: To avoid deadlock in operating system
Question asked for Kerala PSC System Analyst Post 2019
2. Interrupt of Latency time in real time OS should be
A.Maximum
B.Zero
C.Minimal
D.None of the above
Ans : Minimal
Explanation: Real time system example is Railway ticket system there latency is minimal.
Question asked for Kerala PSC System Analyst Post 2019

Saturday, June 8, 2019

Computer Networking questions from Kerala Psc System analyst, Programmer & HSST computer Science

1. Among the following IP Address classes, which one provides maximum of only 254 host addresses per network ID?
A.Class A
B.Class B
C.Class C
D.Class D
Ans is Class C
Explanation: For Class C The network id is 24 bits long and host id is 8 bits long
2^8-2=254 host address is maximum for class C.

2. Which device can use logical addressing system?
A.Hub
B.Switch
C.Router
D.
Ans is Router

3. You have an IP Address  of 172.16.13.5 with a 255.255.255.128 sub net mask . what is your class of address, subnet address and broadcast address?

( KERALA PSC SYSTEM ANALYST 2019)

A.Class A , Subnet 172.16.13.0, Broadcast address 172.16.13.127
B.Class B , Subnet 172.16.13.0, Broadcast address 172.16.13.127
C.Class B , Subnet 172.16.13.0, Broadcast address 172.16.13.255
D.Class B , Subnet 172.16.13.0, Broadcast address 172.16.255.255
Ans is Class B
Explanation:
class A:0-126
class B:128-191
class C:192-224
The above IP address 172.16.13.0 belongs to  Class C

To find Broadcast address
IP : 172.16.13.5
Subnet Mask:255.255.255.128
If subnet mask is 255 replace it with IP address
Then it will be 172.16.13.
For the last octect find difference of subnet mask and 256
256-128=128
then compare with last octect of IP address 5
here 128>5
so 128-1=127
there fore last octect is 127
Broadcast address will be 172.16.13.127

Routers are component of                   layer in OSI reference model
  1. Physical Layer
  2. Network Layer
  3. Transport Layer
  4. Data Link Layer
Ans : is Network Layer

No Of layers in OSI Refference model
  1. Four
  2. Five
  3. Six
  4. Seven
  5. Ans is Seven

UGC NET 2018
Encrypt the message “HELLO MY DEARS” using Transposition cipher with
Key                        plain text 2 4 1 3
                            Cipher text 1 2 3 4


Split the message into 4 letters block key is 4
Then
HELL OMYD EARZ
Then as per key replace 2 to 1 ,4 to 2, 1 to 3, 3 to 4
Then it will be
ELHL MDOY AZER



Decrypt the message ‘WTAAD’ using the ceaser cipher with key=15
Ceaser cipher is shifting the message with key .
If it is encryption right shift with the key
If it is decryption left shif with the key .
Here it is decryption
Left shift of w with key 15 is H
For  T =E
A=L
A=O
Then ans will be HELLO



Bluetooth technology is the implementation of a protocol defined by the standard:
IEE 802.14

IDEA stands for:
Integrated Data Encryption Algorithm
Automatic repeat request error management mechanism is provided by:
A.      Logical link control sub layer
B.      Media Access Control sub layer
C.      Network interface Control Sub layer
D.      None of these
Which address is used in an internet employing the TCP/IP Protocols?
A.      Physical address and logical address
B.      Port address
C.      Specific Address
D.      All of the above
Multiplexing is used in:
A.      Packet Switching
B.      Circuit Switching
C.      Message Switching
D.      None of these
Commercial use domain name will normally use the following suffix in their website address
Junior System Officer Milma 2017
A.      .net
B.      .com
C.      .gov
D.      .org
Ans: .com (option B)
A network with bandwidth of 10 Mbps can pass only an average of 1200 frames per minute with each frame carrying an average of 10,000 bits . What is the throughput of this network .
HSST(2018).
=(1200*10Mbps)/60
=1200*1000000
=1200000000/60=2000000=2Mbps
A system using NRZ-1 to transfer 10Mbps data. What is the average signal rate? HSST(2018).
A)      500 Kbaud
B)      1000 MHz
C)      500 MHz
D)     1000 Kbaud
Ans is 500 Kbaud
What is the minimum required bandwidth to send data at 1 Mbps rate to Manchester Encoding?
HSST(2018).
A)     10 Mhz
B)      2 MHz
C)      5 MHz
D)     1 MHz
Ans is 1 MHz

To send 3 bits data at a time at a bitrate of 3 Mbps with a carrier frequency of 10 MHz calculate the baud rate and bandwidth
A)      10 Mbaud and 10 MHz
B)      2 Mbaud and 2 MHz
C)      1 Mbaud and 8 MHz
D)     None of these
Eight channels each with 100 KHz bandwidth are to be multiplexed together . What is the minimum bandwidth of the link if there is a need for guard band of 10 KHz between channels to prevent interface ?
For 8 chnanel we need at least 7 guards bands
This means that the required bandwidth is atleast \100*8=800
7*10=70
800+70=870 KHz
The disgital multiplexing technique forcombining several low rate channels to high rate one
A)     TDM
B)      FDM
C)      CDM
D)     None of these
Ans is TDM (Time Division Multiplexing )
FDM (Frequency Division Multiplexing )
CDM (Code Division Multiplexing )

RG 59 category cables is used for
A)     Telephone
B)      LAN
C)      Cable TV Network
D)     None of These
Ans is Cable TV Network



The bit oriented protocol for communicate over point to point and multipoint link is
A)    HDLC
B)     Stop and wait protocol
C)     PPP
D)    PAD
HDLC is also an ISO STD developed from the synchronous Data Link Protocol standard proposed by IBM. HDLC NRM  also known as SDLC . HDLS is bit oriented protocol. For communication over point to point and multipoint


The service not provided by PPP is
A)     N/W Address configuration
B)      Authentication
C)      Flow Control
D)     None of these

Encryption is done at
A)     Presentation Layer
B)      Application Layer
C)      Session Layer
D)     Transport Layer
Ans is Presentation Layer
One channel carries all transmission simultaneously is
A)     TDMA
B)      CDMA
C)      FDMA
D)     PDMA
The IEEE standard for wifi is
A)     802.4
B)      802.1
C)      802.2
D)     802.11
An example for cell switched network is
A)     SONET
B)      ATM
C)      CPSR
D)     None of these
GSM is a digital cellular phone system using
A)     TDMA AND PKT switching
B)      CDMS AND PKT switching
C)      TDMA AND FDMA
D)     FDMA AND CDMA


34. SCTP is a --------------------- layer protocol.
     A. Session Layer
     B. Application Layer
     C. DLL
     D. Transport Layer
     35. UDP is a :
    A. Connection unreliable protocol
    B. Reliable and connection oriented protocol
    C. Connectionless  reliable protocol
    D. Connection oriented unreliable protocol
     36. GSM is a digital cellular phone system using:
    A. TDMA and Packet switching
    B. CDMA and Packet switching
    C. TDMA and FDMA
    D. FDAM and CDMA

    37. An example  for cell switched network is :
     A. SONET
     B. ATM
     C. UPSR
     D. None of these

   38. The IEEE standard for Wifi is :
        A. 802.4
        B. 802.1
        C. 802.2
        D. 802.11

   39. one channel carries all transmissions simultaneously in
     A. TDMA
     B. CDMA
     C. FDMA
     D. PDMA
   40. Encryption is done at :
     A. Presentation Layer
     B. Application Layer
     C. Session Layer
     D. Transport Layer
      41. The service not provided by PPP is :

    A. network address configuration
    B. authentication
    C. Flow Control
    D. none of these

  42. The bit oriented protocol for communication over  point to point and multi point links is :
    A. HDLC
    B.  Stop and Wait Protocol
    C. PPP
    D. PAP

     43 . RG-59 category cables are used for:
      A. Telephone
      B. LAN
      C. Cable TV networks
      D. None of these

   44. The digital multiplexing technique for combining several low-rate channels into high rate one:
    A. TDM
    B. FDM
    C. CDM
    D. None of these

   45.  Eight channels each with a 100 -kHz bandwidth are to be multiplexed together. what is the minimum bandwidthof the link if there is a need for a guard band of 10 kHz between channels to prevent interference?
          A. 540 kHz
          B. 870 kHz
          C. 1020 kHz
          D. 1080 kHz
 
    Exp: 8*100+10*7=870 kHz