# C Programming Code Examples

## C > Miscellaneous Code Examples

### Program to Input Password for Validation of User name

Implement Randomized Binary search tree -
Program demonstrates the implementation of Randomized Binary Search Tree. Function to check if tree is empty. And then make the tree logically empty. Functions to insert data.

C analyze Comma-Separated list of words -
This, is, a, test to analyze comma-separated list. Skip over spaces and commas. Copy characters that are not space, comma or \0 as part of a word. Append terminator and The

C++ Multiply Two Matrices use 2D Arrays -
C++ Code is very simple it takes input in two 2D arrays each with size of 2X2. After taking the input program "multiply two matrix" in 3 nested for loops. Size of arrays is defined use

Generate Random Partition out of a Given -
Program 'takes the input' of a set of integers or characters. It firstly generates the random partition of the "Length of the Set". Starting from the beginning, it 'prints the number' of

Pass Structure as an argument to Function -
We have a function 'printStudentInfo()' which takes structure Student as an 'argument' and 'prints the details' of student using structure varaible. The important point to note here is

Code Sum of Prime numbers between 1- n -
C program to find sum of all prime numbers between 1 to n using for loop. Prime numbers are positive integers greater than 1 that has only two divisors 1 and the number itself. For

C Program Reverse String Without Library -
Lets find the length of the string using library function strlen(). A "string" is charracter array and a "Character Array" have character range between 0 to length-1. Thus we have position

Qsort Sort [array of pointers to structures] -
Code compare function for qsort. Add ONE element to the array. Allocate memory for ONE 'struct node'. Copy the data into the new element ( structure ). Qsort array of...