100% found this document useful (2 votes)
319 views

C Program Examples

This document provides examples of C programming questions and answers. It includes questions related to areas like data types, operators, arrays, strings, pointers, structures, file handling, loops, functions, and more. Example programs are provided for checking number types, solving equations, printing patterns, sorting, searching, and performing operations on matrices, strings, files and more.

Uploaded by

Karthik Baba
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
319 views

C Program Examples

This document provides examples of C programming questions and answers. It includes questions related to areas like data types, operators, arrays, strings, pointers, structures, file handling, loops, functions, and more. Example programs are provided for checking number types, solving equations, printing patterns, sorting, searching, and performing operations on matrices, strings, files and more.

Uploaded by

Karthik Baba
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

2/7/12

C program e amples

Share
10

Report Abuse

Next Blog

C programming questions and answers

C language tricky good pointers questions and explanation operators data types arrays structur preprocessors, looping, file handling, strings questions switch case if else printf advance c linux interview questions and answers with explanation and solution for freshers or beginners. Placem numbers Armstrong Fibonacci series factorial palindrome code programs examples on c c++ tu
Ad b G ge

Learn C Programming

C++ Coding

Write C++ Code

C Array

SUBSCRIBE NOW

Subscribe in a reader

10

Ad b G

ge

Cplusplus Language AC Drives Java Language

Ja a A ica i Learn More Abou w/ Free White Pa

C QUESTIONS AND ANSWERS

AC D i e (VFD 0.25 - 400 HP, In Free Shipping*

ga

e a e i e i

e a da e

C i e ie Da a e

De 1. P dca Home of the entr developers must

Va iab e a i g O e a C f e i e i e i

e i

CP g a i g Find more source

S i ch ca e L i g e i e i e i

C program examples

P i e S i g

P i f,Sca f P e S C C C c ce e

e i e i e i e

This post consists a big collection of e ample of c program. If you hav examples you are free to ask.

Frequentl asked c programs in interview

ad i e a g e i i e e i Li

1. Write a c program to check given number is perfect number or not. 2. Write a c program to check given number is Armstrong number or no
1/25

cquestionbank.blogspot.com/2010/07/c-program-e amples.html

2/7/12

C program e amples

i ed

ac ice e e i

C ic E a C

e f ec ga i gf

i c

INDEX

C tutorial C Programming Questions Interview c questions Program in c C programming pdf C Test Java questions Publish your posts Program of c++

3. Write a c program to check given number is prime number or not. 4. Write a c program to check given number is strong number or not. 5. C program to check a number is odd or even. 6. Write a c program to check given number is palindrome number or no 8. Write a c program to check given string is palindrome number or not. 7. Write a c program to solve quadratic equation. 8. Write a c program to print Fibonacci series of given range. 9. Write a c program to get factorial of given number. 10. Write a c program for Floyd s triangle. 11. Write a c program to print Pascal triangle. 12. Write a c program to generate multiplication table. 13. Write a c program to print ASCII value of all characters. 14. C program to print hello world without using semicolon 15. Write a c program which produces its own source code as its output C p og am i h n mbe

C TUTORIAL

Me Va iab e Da a S L e

i g ia i c ia i c

ia i c

age c a e i g ia i c ia i c ia i c ia i c ce

ia i c

P i e F ci

A a P e

ia i c ia

Ad a ced c

POPULAR POSTS

C program examples C multiple choice questions and answers pdf C interview questions and answers QUICK SORT USING C PROGRAM C objective questions and answers pdf BINARY SEARCH USING C PROGRAM Check given number is prime number or not using c program LINEAR SEARCH USING C PROGRAM

1. Write a c program to reverse any number. 2. Write a c program to find out sum of digit of given number. 3. Write a c program to find out power of number. 4. Write a c program to add two numbers without using addition operato 5. Write a c program to subtract two numbers without using subtraction 6. Write a c program to find largest among three numbers using binary m 7. Write a c program to find largest among three numbers using conditio 8. Write a c program to find out generic root of any number. 9. Write a c program to find out prime factor of given number. 10. Write a c program to find out NCR factor of given number. 11. How to convert string to int without using library functions in c 12. Program in c to print 1 to 100 without using loop 13. C program for swapping of two numbers 14. Program to find largest of n numbers in c 15. Split number into digits in c programming 16. C program to count number of digits in a number Rec ion E ample of ec

ion in c p og amming

L.C.M and H.C.F. 1. Write a c program to find out L.C.M. of two numbers. 2. Write a c program to find out H.C.F. of two numbers. 3. Write a c program to find out G.C.D. of two numbers. S apping 1. 2. 3. 4. Write a c program to swap two numbers. Write a c program to swap two numbers without using third variable. Write a c program for swapping of two arrays. Write a c program for swapping of two string.
2/25

C PROGRAMMING QUESTIONS AND ANSWER

How to run c program Free c program download


cquestionbank.blogspot.com/2010/07/c-program-e amples.html

2/7/12

C program e amples

C program for bubble sort C program for Pascal triangle Basic c program
STANDARD OF QUESTIONS ?

Con e ion ( N mbe S

em )

SUBSCRIBE TO

Posts Comments

SHARE IT Sha Appointment gadget (NEW)e hi on Facebook>>

1. Write a c program to convert decimal number to binary number. 2. Write a c program to convert decimal number to octal number. 3. Write a c program to convert decimal number to hexadecimal numbe 4. Write a c program to convert octal number to binary number. 5. Write a c program to convert octal number to decimal number. 6. Write a c program to convert octal number to hexadecimal number. 7. Write a c program to convert hexadecimal number to binary number. 8. Write a c program to convert hexadecimal number to octal number. 9. Write a c program to convert hexadecimal number to decimal number 10. Write a c program to convert binary number to octal number. 11. Write a c program to convert binary number to decimal number. 12. Write a c program to convert binary number to hexadecimal number 13. C program for addition of binary numbers . 14. C program for multiplication of two binary numbers. 15. C program fractional binary conversion from decimal. 16. C program for fractional decimal to binary fraction conversion. 17. C program to convert decimal number to roman. 18. C program to convert roman number to decimal number. 19. C program to convert each digits of a number in words 20. C program to convert currency or number in word.

ADDTHIS SHARING GADGET

Con e ion ( Uni )


MY HEADLINES

1. C program for unit conversion. S ing

C programming questions and answer How to run c program Free c program download C program for bubble sort C program for Pascal triangle Basic c program C program to find max of two unequal numbers C program to find square root of a number C program to print the all elements of any array C program to get the marks of students and print the average marks C program to add n natural numbers from 1 C program to accept a string and find out total numbers of characters C program to print all even numbers of the given range C program to print numbers from 1 to 10 in reverse order C program to print numbers from 1 to 10 C program to swap two numbers C program to check a given number
cquestionbank.blogspot.com/2010/07/c-program-e amples.html

1. Write a c program to convert the string from upper case to lower case 2. Write a c program to convert the string from lower case to upper case 3. Write a c program to delete the all consonants from given string. 4. Write a c program to count the different types of characters in given s 5. Write a c program to sort the characters of a string. 6. Write a c program for concatenation two strings without using string.h 7. Write a c program to find the length of a string using pointer. 8. Write a c program which prints initial of any name. 9. Write a c program to print the string from given character. 10. Write a c program to reverse a string 11. Reverse a string using recursion in c 12. String concatenation in c without using strcat 13. How to compare two strings in c without using strcmp 14. String copy without using strcpy in c 15. Convert a string to ASCII in c Ma i 1. Write a c program for addition of two matrices.
3/25

2/7/12

C program e amples

is positive or negative C program to accept a string from users and print it C program to add two given numbers C program to print "hello world" C program for merge sort C program for matrix multiplication C program list Sum of digits of a number in c using for loop C program to add digits of a number Reverse five digit number c program

2. Write a c program for subtraction of two matrices 3. Write a c program for multiplication of two matrices. 4. Write a c program to find out sum of diagonal element of a matrix. 5. Write a c program to find out transport of a matrix. 6. Write a c program for scalar multiplication of matrix. 7. C program to find inverse of a matrix 8. Lower triangular matrix in c 9. Upper triangular matrix in c 10. Strassen's matrix multiplication program in c 11. C program to find determinant of a matrix File

SUBSCRIBE VIA EMAIL

Enter your email address:

Subscribe

Delivered by FeedBurner

1. Write a c program to open a file and write some text and close its. 2. Write a c program to delete a file. 3. Write a c program to copy a file from one location to other location. 4. Write a c program to copy a data of file to other file. 5. Write a c program which display source code as a output. 6. Write a c program which writes string in the file. 7. Write a c program which reads string from file. 8. Write a c program which writes array in the file. 9. Write a c program which concatenate two file and write it third file. 10. Write a c program to find out size of any file. 11. Write a c program to know type of file. 12. Write a c program to know permission of any file. 13. Write a c program to know last date of modification of any file 14. Write a c program to find size and drive of any file. Comple n mbe

1. 2. 3. 4.

Comple n mbe p og am in c Write a c program for addition and subtraction of two complex numbe Write a c program for multiplication of two complex numbers. Write a c program for division two complex numbers.

Se ie 1. 2. 3. 4. 5. 6. 7.

Write a c program to find out the sum of series 1 + 2 + . + n. Write a c program to find out the sum of series 1^2 + 2^2 + . + n^2 Write a c program to find out the sum of series 1^3 + 2^3 + . + n^3 Write a c program to find out the sum of given A.P. Write a c program to find out the sum of given G.P. Write a c program to find out the sum of given H.P. Write a c program to find out the sum of series 1 + 2 + 4 + 8 to inf

A a

1. Write a c program to find out largest element of an array. 2. Write a c program to find out second largest element of an unsorted a
cquestionbank.blogspot.com/2010/07/c-program-e amples.html 4/25

2/7/12

C program e amples

3. 4. 5. 6. 7.

Write a c program to find out second smallest element of an unsorted Write a c program which deletes the duplicate element of an array. Write a c program for delete an element at desired position in an array Write a c program for insert an element at desired position in an array C program to find largest and smallest number in an array

So ing 1. 2. 3. 4. 5. 6. 7. Write a c program for bubble sort. Write a c program for insertion sort. Write a c program for selection sort. Write a c program for quick sort. Write a c program for heap sort. Write a c program for merge sort. Write a c program for shell sort. ion

Rec 1. 2. 3. 4. 5.

Write a c program to find factorial of a number using recursion. Write a c program to find GCD of a two numbers using recursion. Write a c program to find out sum digits of a number using recursion. Write a c program to find power of a number using function recursion Write a c program to reverse any number using recursion. pe

Si e of da a 1. 2. 3. 4.

Write a c program to find the size of int without using sizeof operator. Write a c program to find the size of double without using sizeof oper Write a c program to find the size of structure without using sizeof op Write a c program to find the size of union without using sizeof opera

U ing poin e 1. Write a c program for concatenation two string using pointer. Sea ching 1. Write a c program for linear search. 2. Write a c program for binary search. 3. Write a c program for binary search using recursion. A ea and ol me 1. 2. 3. 4. 5. 6. 7.
cquestionbank.blogspot.com/2010/07/c-program-e amples.html

Write a c program to find the area of circle. Write a c program to find the area of any triangle. Write a c program to find the area of equilateral triangle. Write a c program to find the area of right angled triangle. Write a c program to find the area of rectangle. Write a c program to find the area of trapezium. Write a c program to find the area of rhombus.
5/25

2/7/12

C program e amples

8. Write a c program to find the area of parallelogram. 9. Write a c program to find the volume and surface area of cube. 10. Write a c program to find the volume and surface area of cuboids. 11. Write a c program to find the volume and surface area of cylinder. 12. Write a c program to find the surface area and volume of a cone. 13. Write a c program to find the volume and surface area of sphere. 14. Write a c program to find the perimeter of a circle, rectangle and tria

C p og am i h e

la ge n mbe

1. 2. 3. 4. 5. 6.

Write a c program to find factorial of 100 or very large numbers Write a c program to multiply the two very large number (larger the lo Write a c program for division of large number (larger than long int) C code for modular division of large number. C code for division of large number. C code for power of large numbers.

O he

1. C program for ATM transaction. 2. Write a c program which passes one dimension array to function. 3. Write a c program which passes two dimension array to function. 4. Write a c program which takes password from user. 5. Write a scanf function in c which accept sentence from user. 6. Write a scanf function in c which accept paragraph from user. 7. Write a c program to print the all prime numbers between 1 to 300. 8. Write a c program which passes structure to function. 9. Palindrome in c without using string function 10. How to get the ASCII value of a character in c 11. C program to get last two digits of year 12. C program without main function

118 comments:
A Jul 28, 2010 11:41 AM

i suggest that there should be examples on bucket sorting and on the diff example drawing a triangle with stars or numbers.And thank you for the web Reply

Aug 9, 2010 09:50 AM

Program to find the size of int without using sizeof operator.


cquestionbank.blogspot.com/2010/07/c-program-e amples.html 6/25

You might also like