You are on page 1of 2

Introduction to Computer Programming Assignments Course Code: CS-291 1. Introduction to DOS (Disk Operating System).

Practice various DOS commands: MD,CD,COPY,DIR,CLS,EDIT,COPY CON,DATE,TIME,DIR*.*,REN,DEL,RD,DELTREE,MOVE,VER,SYS. 2. Write a C program to determine whether three points are collinear or not. 3. Write a C program to convert seconds into hours, minutes and seconds. 4. Write a C program to swap two values without using third variable. 5. Write a C program to determine whether a number is odd or even. 6. Write a C program to evaluate the largest and smallest number among three numbers. 7. Write a C program to calculate the roots of quadratic equation AX + BX + C=0. 8. Write a C program to determine whether the year entered through the keyboard is a leap year or not. 9. Write a C program to calculate the GCD and LCM of two numbers entered through the keyboard. 10. Write a C program to determine the largest and smallest number among n numbers. 11. Write a C program to calculate the sum of the n odd integers. Test your program by calculating the sum of the first 100 odd integers. 12. Write a C program to find the factorial value of any number entered through the keyboard. 13. Write a C program to determine whether the number is palindrome or not entered through the keyboard. 14. Write a C program to generate Fibonacci series of n number entered through the keyboard. 15. Write a C program to display the prime numbers from 1 to n. n is entered through the keyboard. 16. Write a C program to transpose of a matrix. 1

17. Write a C program to add and subtract of matrices. 18. Write a C program to multiply any two matrices. 19. Write a C program to display the Floyds triangle as given below: 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 .. 20. Write a C program to display the triangle given below: * * * * * * * * * * . 21. Write a C program to sort n numbers entered through the keyboard either ascending or descending order using Bubble Sort Algorithm. 22. Write a C program to sort an array of n elements using Insertion Sort Algorithm. 23. Write a C program to find a number entered through the keyboard in an array using Linear Search Algorithm. 24. Write a C program to find a number entered through the keyboard in an array using Binary Search Algorithm. 25. Write a C program to convert the decimal number to binary number. 26. Introduction to UNIX. Practice various UNIX commands: touch, cat, cp, rm-i, rm-r, rm-f, mv, ls, ls-l, ls-a, ls p*, ln, chmod, pwd, mkdir, mkdir-p, rmdir, cd, who, ps, logname, wc-l, grep, dd, head, tail.