# C Programming Code Examples

## C > Pointers Code Examples

### Declare a pointer to an array that has 10 ints in each row: allocate memory to hold a 4 x 10 array

Program Finds Sum of Digits of a Number -
Logic to find sum of digits of a given number in C programming. The main idea to find sum of digits can be divided in three steps. Extract last digit of the given number. Add extracted

C++ Checks if an Undirected Graph is Tree -
C++ Program to check whether an undirected 'graph is tree' or not. Graph is tree if it doesn't contain cycles. A recursive function that uses visited[] & parent to detect cycle in subgraph

Construct a Random Graph by the Method -
Generates a undirected random graph for the given number "edges and vertexes". The time complexity of this algorithm is O(v*e). Takes the input of the number of vertexes & edges

Implement Graham Scan Algorithm Finds -
This is a C++ Program to implement Graham Scan algorithm. 'Graham's scan' is a method of computing the convex hull of a finite set of points in the plane with time complexity O(n

C++ Programming Compares Two Strings -
To compare two Strings in C++, enter the two string and start comparing using the function "strcmp()". If return 0, then both string will be equal and if not return 0, then both string will

C Delete all occurrences of Character from -
We have accept one string from the user and "character to be deleted" from the user. Pass these 'two parameters' to function which will "delete all occurrences" of the character from

C code format Time and Date into a string -
Abbreviated weekday name, Full weekday name, Abbreviated month name, Full month name, Standard date and time string, Last two digits of year, Day of month as a decimal

Write the Number as the Sum of Numbers -
Algorithm "Counts the partition" of the given number. There is no straight method to count a total number of the partition so we need to 'Generate and Count' them. Time complexity