C Programs List

On this page, we have tried to categorize all the programs for quick reference. Simple C Programs Airthmatic Operators ++ and — Operatores Global and Internal Variables Extern Variables Bitwise operators Size of data Types Switch Statement Ternary Condition(?) Format Enumeration Example Functions Multiplication table Do statement Sum Digits of Integer Pyramid Pattern Name Sort …

Advertisements

K&R C Programs

  1. A Tutorial Introduction Exercise 1-01a Exercise 1-01b Exercise 1-01c Exercise 1-02 Exercise 1-03 Exercise 1-04 Exercise 1-05 Exercise 1-06 Exercise 1-07 Exercise 1-08 Exercise 1-09 Exercise 1-10 Exercise 1-11 Exercise 1-12 Exercise 1-13 Exercise 1-14 Exercise 1-15 Exercise 1-16 Exercise 1-17 Exercise 1-18 Exercise 1-19 Exercise 1-20 Exercise 1-21 Exercise 1-22 Exercise 1-23 …

C Program to implement bucket sort

Write C program to implement bucket sort. The idea of Bucket Sort is to divide the interval [0, 1] into n equal-sized sub intervals, or buckets, and then distribute the n input numbers into the buckets. To produce the output, we simply sort the numbers in each bucket and then go through the buckets in …

C Program to delete a file using remove function.

Write a C program to delete a specified file using remove function. remove function deletes the specified file, where it takes file name as the argument and if file is successively deleted it returns 0 , other wise returns a non zero value. Read more about C Programming Language . and read the C Programming …

C program without using main function

Write a C program without using main function.In this program, we didn’t use the main function, but we are using the preprocessor directive #define with arguments to define the Main function.A Preprocessor is program which processes the source code before compilation.The ‘##‘ operator is called the token pasting or token merging operator. In the second …

C program to print given numbers as a pyramid

Write a C program to print given numbers as a pyramid.In this program we use the simple for statements to produce the patterns.This program prints the following output,        1      232    34543  4567654567898765 Read more about C Programming Language . and read the C Programming Language (2nd Edition). by K and …

C program to hide the mouse pointers.

C program to hide the mouse pointers.In this program, we hide the mouse pointers using graphics.h and dos.h library functions.To use graphics.h, we have to install the drivers in to the the system by using the initgraph() function.In this program,we also check the condition that mouse pointer is available or not. Read more about C …

C Program to change the text colors.

Write a C Program to change the text colors.In this program, we give the example of changing the text colors, background colors using conio.h library.Syntax: void textcolor(int_color);Here color is the integer variable, you can specify a color name also, but it should be a proper color name in capital letters.Read more about C Programming Language …

C program to sort a string

C Strings: Write a C program to sort a string. In this program we sort the string using bubble sort technique. Bubble Sort is the simplest and easiest sorting technique. In this technique, the two successive items A[i] and A[i+1] are exchanged whenever A[i]>=A[i+1]. The larger values sink to the bottom of the array and …

Write a C program to reverse a string using pointers.

C Strings:Write a C program to reverse a string using pointers.In this program, we reverse the given string by using the pointers. Here we use the two pointers to reverse the string, strptr holds the address of given string and in loop revptr holds the address of the reversed string. Read more about C Programming …