Happy Codings - Programming Code Examples
Html Css Web Design Sample Codes CPlusPlus Programming Sample Codes JavaScript Programming Sample Codes C Programming Sample Codes CSharp Programming Sample Codes Java Programming Sample Codes Php Programming Sample Codes Visual Basic Programming Sample Codes


       

C Programming Code Examples

C > Arrays and Matrices Code Examples


Page 1 Page 2 Page 3 Page 4



Pointer Simple Program Pass by Reference
C++ Language program sample which passes a "Reference" to a Function and Function has a 'pointer' as argument. Keep the return type void & display result in main body. Apply any

Find last Occurrence of Character in String
C program to input any String from user and find the Last occurrence of a given character in the string. Input String from user, 'Store it' in some variable say 'str'. Declare a index =-1

Check a Number is Positive Negative or 0
We will use the above logic inside if to check number for Negative, Positive or Zero. Step by step Descriptive Logic to check negative, positive or zero. Input a number from user in

Program Finds Sum of First and Last Digit
C Language Program to input a number and find sum of first and last digit of the number using for loop. Input a number. Find last digit. Find total number of digits - 1. Find first digit.

C Programs Calculates the Area of a Circle
C Language Program calculates the Area of a Circle given it's Radius. Lets use The formula to compute the 'area' is: Area = ? x r2 where r is the radius of the circle & ? value is 22/7. 'Pi'

C Example Code Nested Printf Statements
C Program code to demonstrate nested printf statements. String will be first printed while executing inner printf. Length of the string "abcdefghijklmnopqrstuvwxyz". So printf will

C Programming Sample Reading the Files
To read the file in C Language, we must open it first using any of the mode, for example if you only want to read the file then open it in "r" mode. Based on the mode selected during

C Program Flip all Bits of a Binary Number
Flipping a bit means toggling or inverting the current bit status. If the current bit is set i.e. 1 than invert it to 0 and vice versa. Flip all bits of a binary number you can run loop from 0...