 C Programming Code Examples

C > Arrays and Matrices Code Examples

Read integers into an array and Reversing them using Pointers

C Language program Print Pascal Triangle - C program print pascal triangle up to n rows. Pascal triangle is a triangular number pattern named after famous mathematician Pascal. Where n is row number and k is term of that

C Perform Matrix Multiplication Recursion - C program, 'using recursion', performs Matrix multiplication of 2 'matrices' and displays the result. We use 2 D array to represent a matrix & resulting matrix is stored in different matrix

C Code Find Armstrong Numbers in Range - Logic to find all Armstrong number between 1 to n. Input Upper Limit to print Armstrong number from user. Store it in some variable say end. Run a loop from 1 to end, increment

C Code print all negative elements in array - Write a C program to input elements in array and print all negative elements. Display all negative elements in array using loop in C. Displaying negative, positive, prime, even...

Code Sort N Numbers in Ascending Order - C Program sorts the numbers in ascending order using bubble sort. Bubble sort is simple sorting algorithm that works by repeatedly stepping through list to be sorted, comparing

Check Alphabet Digit or Special Character - Checking Alphabet, Digit or Special character using ASCII value. A character is alphabet if it in between a-z or A-Z. A character is digit if it is in between 0-9. And A character is special

C Program Find First N Fibonacci Numbers - C Coding calculate the Fibonacci Numbers in the series. First two numbers in the Fibonacci sequence are 0, 1 & each subsequent number is the sum of the previous 2. Fn = Fn-1 + Fn-2

Swaps Numbers Using Pointers in the C++ - The simplest and probably most widely used method to "swap 2 variables" is to use a third temporary variable: In programming, the act of 'swapping' two variables refers to mutually