C Programming Code Examples
C > Mathematics Code Examples
Averaging ten numbers - storing the numbers the hard way
C Trim Trailing White Spaces from Strings -
C Program code remove 'trailing white space' characters is 'lot more easier' and faster than removing leading white space characters. As in this case we need not to perform any 'char'
C++ Programs to Implements D-ary-Heap -
Filling up 'heap' with the array. A Function to check if heap is empty. Function to get index parent of i. Function to get index of k th child of i. Function to find least element. Function
C++ Break Keyword is used to Stop Loops -
The 'C++ program' tries to count alphabetical letters from d to n, but a break makes it stop when it encounters k: In a for statement, the 'break' can stop the counting when particular
C++ Language Character & String Literals -
When writing both single "character & string" literals, it is Necessary to 'Put the Quotation' marks surrounding them to distinguish them from possible variable identifiers or reserved
C Print Range of Fundamental Data Types -
C Program Code to Convert the number of bytes into bits by multiplying the bytes with 8. Use two functions namely signed_one() and unsigned_one() for calculating the range
Demonstrates Printf Inside Another Printf -
Firstly Inner printf is executed which results in printing 1324. Printf returns 'Total Number' of Digits:4 & second inner printf will looks like. It prints 4 & Returns the Total Number of digits
Every Possible Combination of two Strings -
Program display every 'possible combination' of 2 "Words or Strings" from the input strings without repeated combinations. Read strings into 2d character arrays. Concatenate string1
Codes Convert Binary Number to Decimal -
C Programming code take a binary number and store it in the variable j. And initialize the variable decimal_val to zero, variable base to 1. Obtain the remainder and quotient of the...