C Programming Code Examples
C > Arrays and Matrices Code Examples
Find the Frequency of Odd & Even Numbers in the given Matrix
Count Vowels & Consonants in a Sentence -
Take the sentence as input, store in the array sentence[] and Initialize the variables vowels, consonants and special to zero. Using if, else statements, check if the sentence has vowels
C programming Scanf() Format Specifiers -
Read a floating-point value, read a single character, read a decimal integer, read an integer in either decimal, octal, hexadecimal format, read a floating-point number, read a
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++ Sorts a given Data using Stooge Sort -
Stooge sort is a recursive sorting algorithm. It Divides the Array into 2 overlapping parts, 2/3 each. Sort the first part. Sort second part and again sort the first part. Then Print the Result
Check a Number can be Expressed as Sum -
Program to check whether a number can be expressed as sum of two prime numbers. To accomplish this task, "checkPrime()" function is created. The "checkPrime()" returns 1 if the
C++ Finds Convex Hull of A Set of Points -
Program to implement "Jarvis March" to find convex hull. The idea of Jarvis's Algorithm is simple, we start from the 'leftmost point' (or point with minimum x coordinate value) and
C++ Sample Calculate Power by Recursion -
This technique can only calculate power if the exponent is a 'positive integer'. To find power of a number, you can use pow() function. C++ program calculates the power of any number
C Program Print Odd Numbers in a Range -
C program to print all odd numbers from 1 to n using for loop. Input lower and upper limit from user. If start is not odd then make it odd And Initialize loop from start, increment it by