# C Programming Code Examples

## C > Strings Code Examples

### C String function - strncat - It concatenates n characters of str2 to string str1

```
```

```
```

If Else If Statement & Multiple Conditions - In this control structure we have only one 'if' and one 'else', however we can have multiple 'else if' blocks. This is how it looks: If none of the 'condition is true' then these statements

C++ Program Finds HCF of Two Numbers - To find the HCF ('Highest Common Factor') or GCD (Greatest Common Divisor) of 2 or more numbers, make prime factors of the numbers and choose the common prime factors. Then

C Rightmost Occurence of Input Character - Program to find out the rightmost occurence of an input character. Enter the character to be searched. Required character is found at position. Required character is not found in...

Outputs the values to the stream in The C - C program code example outputs the values to the stream. Returns number of characters printed on success or a negative number on failure. The format control string are identical

C++ Displays such a Pattern for n Number - C++ Program to display 'such a Pattern'. Each row will contain odd numbers of number. The first and last number of each row will be 1 and middle column will be the "row number". So n

Topological Sortings of a Directed Acyclic - Topological sorting for directed acyclic graph (dag) is a linear ordering of vertices such that for every directed edge 'uv', vertex 'u' comes before v in the ordering. 'Topological Sorting'

Program Code Calculates the Value of nPr - C Program code calculates the value of nPr. A permutation is a re-arrangement of elements of a set. And any duplications of the collected elements in different orders is allowed. Then