Saturday 31 August 2013

Sample Programs for C Language



1.   Write a c program to reverse any number.
2.     C program to reverse a number using recursion
3.     Write a c program to add two numbers without using addition operator.
4.     Write a c program to subtract two numbers without using subtraction operator.
5.     Write a c program to find out generic root of any number.
6.     Write a c program to find out prime factor of given number.
7.     Write a c program to find out NCR factor of given number.
8.     How to convert string to int without using library functions in c
9.     Program in c to print 1 to 100 without using loop
10.   C program for swapping of two numbers
11.   Program to find largest of n numbers in c
12.   Write a c program to check given number is Armstrong number or not.
13.   Write a c program to check given number is prime number or not.
14.   Write a c program to check given number is strong number or not.
15.   Write a C program to check a number is odd or even.
16.   Write a c program to check given number is palindrome number or not.
17.   Write a c program to print Fibonacci series of given range.
18.   Write a c program to get factorial of given number.
19.   Write a c program to print Pascal triangle.
20.   Write a c program to generate multiplication table.
21.   Write a c program to find out largest element of an array.
22.   Write a c program to find out second largest element of an unsorted array.
23.   Write a c program to find out second smallest element of an unsorted array.
24.   Write a c program which deletes the duplicate element of an array.
25.   Write a C program to find largest and smallest number in an array
26.   Write a c program to convert decimal number to binary number.
27.   Write a C code for decimal to octal converter
28.   Easy way to convert decimal number to octal number in c
29.   Write a c program for linear search.
30.   Write a c program for binary search.
31.   Write a c program for binary search using recursion.
32.   Write a c program to find out the sum of series 1 + 2 + ….  + n.
33.   Write a c program for bubble sort.
34.   Write a c program for insertion sort.
35.   Write a c program for selection sort.
36.   Write a c program for quick sort.
37.   Write a c program for merge sort.
38.   Write a c program to convert the string from upper case to lower case.
39.   Write a c program to swap two numbers.
40.   Write a c program to swap two numbers without using third variable.

0 comments:

Post a Comment

 

C Programming Language Interview Questions and Answers Tutorial for beginners. Copyright 2013 All Rights Reserved