merge sort using command line...!!!

This is a discussion on merge sort using command line...!!! within the C++ Programming forums, part of the General Programming Boards category; can anyone help me... Write a program to implement merge sort. Your program should take as input as input size ...

  1. #1
    Registered User
    Join Date
    Feb 2013
    Location
    delhi
    Posts
    1

    merge sort using command line...!!!

    can anyone help me...

    1. Write a program to implement merge sort.


    Your program should take as input as input size (range 1-20, it has to be first command line argument always) and the entire sequence of numbers (only 2-bit integers, range 10-99) which are to be sorted and program should output sorted sequence as output, each number separated by a space character with no newline characters, as shown in Sample Run.

    Sample Run:
    It assumes that your program is compiled into megeSort.out executable and takes input.txt file as input and output.txt file as output.

    ./mergeSort.out 5 45 12 56 98 23 # first command line argument is input size
    12 23 45 56 98



    this is the main problem..i have to submit my assignment but i don't have deep knowledge about command line
    plz plz plz help me!

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,422
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. reading command line or text file...expression tree (sort of)
    By mathwork orange in forum C++ Programming
    Replies: 2
    Last Post: 02-13-2008, 08:52 AM
  2. Using unix command line to sort random array
    By lostmyshadow in forum C Programming
    Replies: 4
    Last Post: 12-11-2007, 06:14 PM
  3. Quick Sort or Merge Sort???
    By swanley007 in forum C++ Programming
    Replies: 6
    Last Post: 11-10-2005, 05:48 PM
  4. Quick sort VS Merge Sort
    By sachitha in forum Tech Board
    Replies: 7
    Last Post: 09-03-2004, 11:57 PM
  5. merge sort and selection sort and time spent on both
    By misswaleleia in forum C Programming
    Replies: 3
    Last Post: 06-04-2003, 02:24 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21