affiliate marketing

Monday, 12 December 2011

NETWORKING RELATED QUESTIONS AND ANSWERS


11: What form of software can also be called firmware?
A: System BIOS
12: What would you set your multimeter to if you wanted to detect an AC ripple?
A: AC Voltage
13: After you install a new floppy drive and restart the system, the floppy drive light stays on constantly and you get an “FDD Controller Failure” POST error. What is the problem?
A: Floppy cable on backwards
14: What type of port communicates information to a peripheral device one bit at a time?
A: Serial port
15: Should you wear a grounding strap when servicing a CRT monitor?
A: No
16: What are the 4 types of DC voltage usually produced by a power supply?
A: +5V
-5V
+12V
-12V
17: If your monitor just shows dots when you turn it on, what is most likely the problem?
A: Bad Video RAM
18: You have 2 hard drives installed on your primary EIDE controller. You install a CD-ROM on your secondary EIDE controller. What jumper setting would you use for the CD-ROM?
A: Master

BACKTRACKING ALGORITHM – KNAPSACK PROBLEM


BACKTRACKING ALGORITHM – KNAPSACK PROBLEM

Aim:
            To write a C program to solve the knapsack problem using backtracking algorithm
Algorithm:
            Step 1: Declare the variables, array size and functions
            Step 2: Get the value of number of objects and size of knapsack
Step 3: Enter weight and profit of objects
Step 4: Assign the initial values
Step 5: Call the necessary function and display the profit
Step 6: End of program

Coding:

DIJKSTRA’S ALGORITHM



DIJKSTRA’S ALGORITHM
Aim
            To implement Dijkstra’s algorithm to find the shortest path.

Algorithm

            Step1: [Include all the header files]
            Step2: Call allSelected( )
            Step3: Call Shortpath( )
            Step4: Access the functions from main
            Step5: End

Algorithm For ALLSELECTED( )

            Step1: Initialise i=0
            Step2: Check whether i<max
            Step3: Check whether Selected[i]=0
                        Return 0
            Step4: Else Return 1
            Step5: Return

Algorithm For SHORTPATH( )

            Step1: Initialise i=0 ,  Check i<max
                       Distance[i]=INFINITE
            Step2: Assign selected[current].distance[0]=0,
                        Current=0
            Step3: While(!allSelected(Selected))
                        Perform(Selected[i]= =0)
                        Current=k
                        Selected[current]=1
                        Print k
Coding:

HASHING TECHNIQUE


HASHING TECHNIQUE

Aim:
            To implement a program using Hashing technique.

Algorithm:

            Step1: Include necessary header files
            Step2: Declare necessary variables
            Step3: Check the value of  *S
                        Then call Insert( )
                            Print “Enter the string”
                        Read S
            Step4: Check the value of *S
            Step5: Then print S by calling hGetVal( )
            Step6: Call PrintHash( )
            Step7: End

Algorithm For hINSERT( ):

            Step1: Allocate memory to pointer
            Step2: Assign index            hGetIndex ( )
            Step3: Assign Ptr            Key         Strdup(key)
                                    Ptr         Val         Val
                                    Ptr         next         h[index]
                                    h[index]        Ptr
            Step4: Print “h[index]=key”
            Step5: Return

Algorithm For hGETVALUE( ):

Step1: [Ptr=h[hGetIndex(key)]]
Step2: If[Ptr && strcmp(Ptr        key)]
                        Then Ptr          Ptr        next
Step3: If[Ptr],Check the value of Ptr
                        [Return Ptr        Val]
Step4: [Return -1]

Algorithm For PRINTHASH( ):

PRIORITY QUEUE USING HEAP


PRIORITY QUEUE USING HEAP
Aim:
            To implement priority queue using Heap in C program.
Algorithm:
            Step 1: [Include necessary header files]
            Step 2: [Define maxsize as 15]
            Step 3: [Declare necessary variables]
            Step 4: READ  option, opt
                        IF opt is 1 THEN CALL INSERT()
                        IF opt is 2 THEN CALL DELMAX()
                        IF opt is 3 THEN CALL DIS()
            Step 5: [END OF MAIN FUNCTION]

Algorithm For INSERT()