# C Programming Code Examples

## C > Code Snippets Code Examples

### returns time in Coordinated Universal Time (UTC)

C++ program for Complex Numbers using -
Class for addition, subtraction, multiplication and division for 'complex numbers'. Class has 4 functions to perform arithmetic operations. It takes 2 "complex numbers" input from user

Perform Exception Handling for Divide by -
Declare the variables a,b,c. Read the values. Inside the "try block" check the condition. (a. if(a-b!=0) then "calculate the value" of d and display.b. otherwise throw the exception. So

C Program code to Illustrate Pass by value -
Take two numbers as input and store it in the variables j1 and j2 respectively. Call function swap and pass the variables j1 and j2 as parameters to the function swap. In function

C Codes Displays Largest Element of Array -
This C Program takes n number of elements from user and stores it in array arr[]. To find the largest element, the first two elements of array are checked and largest of these two...

Implementation for Deterministic Skip list -
Finding the smallest item in the tree. Return smallest item or 'INFINITY' if empty. Find the largest item in the tree. "Return the Largest" item or INFINITY if empty. Find item x in the

Convert String to Lowercase using strlwr() -
C code convert uppercase string to lowercase using 'For Loop'. Internally characters in C are represented as integer value known as 'ASCII' value. Which means if we write a or any other

C++ Compare Binary & Sequential Search -
A 'function implementing' Binary search on a 'Sorted array'. Every time this function called, counted as a iteration of 'binary search'. So if value is "Less than Value" at start index more

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'