C Programming Tutorial

 
 
 
 
#include <stdio.h>
#include <conio.h>
#include <math.h>
#include <alloc.h>
void main()
{

char *a[10],dum[10],s;
int i,k,j,n;
clrscr();
printf(\"enter the no of std....\");
scanf(\"%d\",&n);
printf(\"enter the name of students \");
for(k=0;k<n;k++)
scanf(\"%s\",a[k]);
for(i=1;i<n;i++)
{
for(j=1;j<n-i;j++)
{if(strcmp(a[j-1],a[j])>0)
  {strcpy(*dum,*a[j-1]);
   strcpy(*a[j-1],*a[j]);
   strcpy(*a[j],*dum);
 }
 }  }
 for(i=0;i<n;i++)
 printf(\"%s\",a[i]);
 getch();
 }

    Related Post:
  1. Program to solve the producer-consumer problem using thread

  2. Program to print pyramid of * (stars) in reverse pattern

  3. Find Death Date C Program

  4. Example of passing structure to function

  5. Program to simulate process synchronization, call wait function so that the executing process gets blocked and then print their process ids

  6. Program to calculate bonus, commission and gross salary as per description formula

  7. Program to find the length of a string taken from user (without using strlen)

  8. Use of subscripted members in structures , ARRAYS WITHIN A STRUCTURE

  9. Sorting of a structure on names using bubble sort

  10. Program to display Factorial using self scheduling

  11. Program to count word from user entered text or sentence

  12. Program to display current date and time

  13. Program to copy one string s2 to another string s1. (Without using strcopy function from string.h)

  14. PROGRAM TO FIND ANSWER OF THE FOLLOWING SERIES. INPUT STEPS FROM KEYBOARD. SUM =12-32+52-72+.....

  15. Program that prints triangle in reverse pattern

  16. Program that will accept a line of text from the text file; count the number of words, lines, and characters in the file

  17. Program to compute area under a curve

  18. Singly Linked list with following operations INSERT AT STARTING, INSERT AT MIDDLE, INSERT AT END, DELETE FIRST NODE, DELETE LAST NODE, DELETE MIDDLE

  19. Program to use increment and decrement operators

  20. Program to calculate roots of 3 numbers using root1 = (-b + sqrt(discriminant))/(2.0*a) and root2 = (-b - sqrt(discriminant))/(2.0*a) formula

 
 
Didn't find what you were looking for? Find more on Program to sort a list in alphabatic order using pointers