Beginning with C

Below are the collections of questions that can be used to command over any programming language like c, c++, c# and others. These are basically standards types of questions which can be solved using any programming language:



1. Write a C program to print in ascending order, the prime factors of n.
2. Write a C program to print the second largest value in an array containing n integers.
3. Write a function of type int that accepts a long int limit and returns the number of prime numbers less than or equal to limit.
4. Write a C program to print the second largest value in an array containing n integers.
5. Write a function of type int that accepts a long int limit, and returns the number of Fibonacci numbers less than or equal to limit.
6. Write a program to copy one file into another, changing each lower case character in the source file to uppercase in the destination file, and vice versa.
7. Write a program to read int numbers one number per line, until a negative number is entered. Your program should print the number of values read, largest value, the smallest value and their difference.
8. Write a program that reads a line at a time from an ASCII file and substitutes a pattern with another pattern. For example, in the text, where ever the word “Pascal” occurs, that should be replaced by the word “C++”.
9. Write a C program that copies one file to another. The program takes the file names from the command line. The program should refuse to copy if there already is a file having the target name.
10. Write a C program to print prime numbers in the range of 1 to 500.
11. Write a C program to produce factorials of first ten numbers (i.e. 1 to 10)
12. Write a C program to search a list of numbers for a given number.
13. Write a C program to find the GCD of two numbers
14. Write a C program to count the number of words in a given string.
15. Write a C program to arrange a list of n numbers in ascending/descending order.
16. Write a C program to generate all the prime numbers up to a given number n.



Some of the popular contents related to c and c++:
{
http://mybestnotes.com/source-code/
http://www.sherikar.com/shekhar/sources/all/compressed/
http://brisray.com/qbasic/qnumber.htm
 }

C Language Problems with their Solutions:
{
http://www.sherikar.com/shekhar/sources.htm
}