Code which arranges elements in binary file.

Programming
Tutor: None Selected Time limit: 1 Day

Write piece of code (function) in C/C++ that arranges char elements in binary file in alphabetical order.

May 13th, 2015

Here is source code of the C program to sort the names in an alphabetical order. The C program is successfully compiled and run on a Linux system. The program output is also shown below.

  1. /*
  2.  * C program to read N names, store them in the form of an array
  3.  * and sort them in alphabetical order. Output the given names and
  4.  * the sorted names in two columns side by side.
  5.  */
  6. #include <stdio.h>
  7. #include <string.h>
  8. void main()
  9. {
  10.     char name[10][8], tname[10][8], temp[8];
  11.     int i, j, n;
  12.     printf("Enter the value of n \n");
  13.     scanf("%d", &n);

May 13th, 2015

Did you know? You can earn $20 for every friend you invite to Studypool!
Click here to
Refer a Friend
...
May 13th, 2015
...
May 13th, 2015
May 30th, 2017
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer