C Examples

C++ Example Programs


C Tutorial -Examples

Add Numbers (Folder)

Armstrong_Numbers

  • Armstrong_Numbers.c

Ascending_Descending_Order

Binary_to_Decimal (Folder)

Binary_to_Hexadecimal (Folder)


Binary Search Tree

Code

  • The code below assumes that the input numbers are in ascending order.

 

Result

 


Linear Search Tree

Code

 

Result

 

 

Linear search for multiple occurrences

Code

 

Result

 

C program for linear search using function

 

Linear search function using pointers


 

 

Bubble_sort_Algorithm (Folder)

Decimal_to_Binary

Decimal_to_Hexadecimal

Factorial

——————————————–

Fibonacci-Series

Fibonacci_Series.c

————————————————–

Floyd’s_Triangle

Floyd’s_Triangle.c

——————————————————————

Pyramid(Folder)

  •  https://cprogrammingcodes.blogspot.in/p/pyramid.html
  • Generate a following structure : GitHub code Square_Structure.c

@@@@@

@@@@@

@@@@@

@@@@@

@@@@@

#####

  ####

    ###

      ##

        #

————————————————————————-

Greatest_Common_Divisor

——————————————————- 

Largest and Smallest number (Folder)

Odd or Even (Folder)

———————————————–

Prime_Number

 —————————————————-

Random_Number_Generator (Folder)

—————————————————-

Reverse_Number_and_Palindrome_Checker

————————————

Simple and Compound Interest

  • Simple_and_Compound_Interest.c

————————————

Swapping

Swapping Strings (Folder)

Windows Commands

If you want to access the windows commands using C program? its very easy to do. For that you need to include predecessor (stdlib.h) . See the Below code

******************************************

Leave a Reply

Your email address will not be published. Required fields are marked *