logo

CuriousTab

CuriousTab

Discussion


Home Technical Questions Programming Comments

  • Question
  • Write a c program for insertion sort.


  • Correct Answer
  • #include int main(){ int i,j,s,temp,a[20]; printf("Enter total elements: "); scanf("%d",&s); printf("Enter %d elements: ",s); for(i=0;i=0)){ a[j+1]=a[j]; j=j-1; } a[j+1]=temp; } printf("After sorting: "); for(i=0;i


  • Programming problems


    Search Results


    • 1. Write a c program for quick sort.
    • Discuss
    • 2. Write a c program for selection sort.
    • Discuss
    • 3. Write a c program to print multiplication table
    • Discuss
    • 4. Write a c program to check whether a number is strong or not.
    • Discuss
    • 5. C program to find the factorial of a given number
    • Discuss
    • 6. Write a c program for merge sort.
    • Discuss
    • 7. Write a c program for binary search.
    • Discuss
    • 8. Write a program for matrix multiplication in c
    • Discuss
    • 9. Write a c program to copy a data of file to other file.
    • Discuss
    • 10. What will be output of following c code? void main() { struct india { char c; float d; }; struct world { int a[3]; char b; struct india orissa; }; struct world st ={{1,2,3},'P','q',1.4}; clrscr(); printf("%dt%ct%ct%f",st.a[1],st.b,st.orissa.c,st.orissa.d); getch(); }
    • Discuss


    Comments

    There are no comments.

Enter a new Comment