 # C Programming Code Examples

## C > Data Structures Code Examples

### Add two long positive integers

Find First Capital Letter in a String without - Program using iteration, finds the first capital letter that exists in a string. We have included ctype.h in order to make use of int "isupper()" C Function that's Defined inside the "ctype.h"

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

Code calculate determinant of 3x3 Matrix - C program to read elements in a matrix and find determinant of the given matrix. Find determinant of a 2x2 matrix and 3x3 matrix. Logic to find determinant of a matrix in C.

C Program code check Armstrong Number - A number is called as "Armstrong Number" if Sum of Cubes of Digits of Number is equal to the number itself. In C code, we are checking the input number is Armstrong or not. Check

Find Sum of Natural Numbers While Loop - The "Positive Numbers" 1, 2, 3... are known as natural numbers. The C program codes below takes a positive integer ( let say n ) as an input from the user and calculates the sum up to n.

C program code insert an element in array - Code insert an element in array at specified position. Insert element in an array at given position. The program should also print an error message if the insert position is invalid.

C Program Code to Sort array of Structure - C code accept records of the different states using array of structures. A structure should contain Char state, population, literacy rate, & income. Display the State whose Literacy

Program Solve The 0-1 Knapsack Problem - C++ Program to solve 0-1 'knapsack problem'. The 'Knapsack' problem or Rucksack problem is a problem in "Combinatorial Optimization": Given a Set of items, each with a mass, value,