plz solve these q.

Discussion in 'C' started by maxr_09, Jul 28, 2007.

  1. maxr_09

    maxr_09 New Member

    Joined:
    Jul 28, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    plz ans these q.
    my email is maxr09@gmail.com
    1. Design an algorithm and write a program that places the kth element of an array in position 1, the (k+1)th Element in position 2, etc. The original 1st element is placed at (n-k+1) and so on. (Use pointers)

    2. Write a program for implementing stack of strings using linked list and display output

    3. Every integer can be expressed as a product of prime numbers. Design an algorithm to compute all the prime factors of an integer n

    4. A perfect number is one whose divisors add up to the number. Design and implement an algorithm that prints all perfect numbers between 1 and 500

    5. Design and implement an algorithm that will merge two ordered linked lists

    6. Design and implement an algorithm that accepts as input an ordered list of search names. The task required is to establish and report the Absence or presence of these search names in a second much longer ordered list

    7. In some applications, particular information needs to be retrieved from a list with a much higher frequency than other information. Under these conditions the best way to arrange the list is to put the most frequently retrieved item at the head of the list, the second most frequently retrieved item in the second position and so on. The appropriate order is often not know in advance. To make a list progress towards the appropriate order whenever an item is retrieved it can be exchanged with its predecessor. Under this scheme the most frequently retrieved items eventually migrate to the front of the list. Design algorithms that search and maintain such a linked list

    8. Write a program to maintain a singly linked list having the following functions:
    a. Creation of the list
    b. Displaying the list
    c. Traverse through the linked list and subtract two consecutive nodes. The result should be inserted just before the nodes subtracted.
    Note: If the linked list contains the data :
    5 15 8 9 2 6
    The changed linked list should contain the data in the following order:
    -10 5 15 -1 8 9 -4 2 6
    Display both the original linked list as well as the changed linked list


    9. Write a program to maintain a singly linked list having the following functions:
    a. Creation of the list
    b. Displaying the list
    c. Prompt the user for a position, and then detach a node from that position. Now ask the user for a new position and attach the detached node into the specified position

    10. Write a function to display statistics of a text file. (No of characters, No of words, No of lines, Name of file, location of file)

    11. There are 10 records present in a file with the following structure:
    struct
    {
    char itemcode[6];
    char itemname [20];
    int qty;
    };
    Write a program to read these records and display them in ascending order on the field itemname and write them into a text file in ascending order

    12. Write a program to maintain a singly linked list having the following functions:
    a. Creation of the list
    b. Displaying the list
    c. Swap all nodes at consecutive even and odd positions
    Note: The node at position 1 should be swapped with node 2, node 3 with that of node 4, node 5 with 6 and so on

    13. Design a function instring(char*str1, char*str2), where instring() searches out the existence of string str2 in str1 and reports the same. It should also display the number of occurrences of str2 in str1. Implement the function in a C-code

    14. Create a text file using any editor. The text file contains a distinct word on each line. Read the text file into a Singly linked list and display the count of words

    15. Write a program to implement a mail merge facility

    16. A common mistake in typing is that the same word is typed more than once. Write a program that finds such double words and the line numbers on which they occur in input

    17. Write a single C program to perform each of the following by using linked list:
    i. Create a queue of N elements
    ii. Reverse the queue so that last element becomes first & so on

    18. Given a large ordered array that may contain many elements that are multiply occurring (it may be assumed that on average when an element is multiply occurring it will occur many times). Device an efficient duplicate deletion algorithm for particular type of data. Write the program for the same (use pointers)

    19. Design and implement a merging algorithm that reads the integer data sets from two files of uneven length. And merge the data and write in third file .Use end-of-file tests to detect the ends of the data sets

    20. Design an algorithm and write a program for merging three arrays.
     
  2. NewsBot

    NewsBot New Member

    Joined:
    Dec 2, 2008
    Messages:
    1,267
    Likes Received:
    2
    Trophy Points:
    0
    The forum is not a free software home nor its a place to finish your assignments.
     
  3. maxr_09

    maxr_09 New Member

    Joined:
    Jul 28, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    sorry man i am a beginner,new member of this forum.if u can help me than go ahed.
     
  4. NewsBot

    NewsBot New Member

    Joined:
    Dec 2, 2008
    Messages:
    1,267
    Likes Received:
    2
    Trophy Points:
    0
    We cannot go ahead and answer all your questions if you don't show any hint's of solving them. What help other than that is needed.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice