##### Find the Largest Number in an Array using C

Below is a C program with an explanation of how to find the largest number in an array. What is an array? An array is a group of elements of the same data type. It has a consecutive memory location in memory. Each value in the array is called an element. Every element has the... » read more

##### An Explanation of Pass by Reference in C

In General, there are three methods of passing arguments. We pass arguments to a function during its call Pass by Reference Pass by value Pass by constant What is pass by reference? Pass by reference is a method of calling a function by passing the reference of a variable in the function’s arguments. The function... » read more

##### Compute the Product of Two Matrices Using C

Below is a C program which takes two matrix form users to multiply them and print the results on the screen. Product of Two Matrices Using C Here is the source code of the program in C to Compute the Product of Two Matrices. This program is successfully compiled, and the output is also given... » read more

##### Get local IP Address using C

Here is the source code of the program in C to get the local IP address. This program is successfully compiled, and the output is also given below. C program to get local IP Address #include<stdlib.h> #include<hostname> #include <stdio.h> struct hostent *he_bool; struct in_addr a; int main (int argc) { char *hostname = malloc (MAXHOSTNAMELEN);... » read more

##### Check if a given String is Palindrome using C

A string is said to be palindrome if it remains unchanged after reversing it.  For Example 4646, aeoaeo, mom, dad, and nana are some examples of palindrome strings. Below is the source code of the program in C to check if a given string is Palindrome. This program is successfully compiled, and the output is... » read more

##### Convert Roman Number to Decimal Number Using C

Below is a C program which takes a roman number form the user and convert it into a decimal number. We need to understand what the roman number is. What are Roman Numbers? The Roman numbers are represented by the combination of letter from Latin alphabets. It is a numeric system that was devised in... » read more

##### Convert Hexadecimal to Binary using C

Below is a c program which takes a hexadecimal number as an input and converts it into a binary number. Convert Hexadecimal to Binary in C Here is the source code of the program in C to Convert Hexadecimal number to Binary number. This program is successfully compiled, and the output is also given below.... » read more

##### Find the First Capital Letter in a String using C

In this article, we are going to write a  program to find the first capital letter in a string using recursion in C programming language. First of all, we included ctype.h header file in our program. ctype.h header file contains many functions, such as the function, which will be used in our program. If the... » read more

##### How to find the factorial of a number using recursion in C

Factorial is symbolized by an exclamation mark (!). Factorial of n number is the product of all integers greater than or equal to 1 but less than or equal to n. To find the factorial, the number should be greater than or equal to 1. Factorial of 0 is defined as 1 and factorial of... » read more

##### How to Convert Binary to Octal in C

This program will accept input from the user as a binary number and convert that number into an octal number. To correctly understand this program, you should be familiar with the while loop concept. Convert Binary to Octal using C Here is the program source code to convert the binary number into octal. This program... » read more

##### Convert a Binary Number into Decimal in C

Binary numbers are represented in the base of 2. For example 110112, 1002, etc. In this article, we will be converting a binary number into a decimal number which is represented in base 10 using C language. In the conversion, there are mainly three steps to be followed. The first thing is to get the remainder... » read more

##### Delete a specific line from a text file using C

There is no magic formula to delete a line from a text file in C programming language. If you have to remove some specific line from the text file, you have to read the whole text, and copy it in another text file, till you reach the line you want to delete it. Don’t copy... » read more

##### Find the number of lines in a text file using C

The following code will find the total number of lines in a text file using C. The code uses C programming language’s built-in functions to access, open, read and count the number of lines of the text file. Number of lines in a text file using C #include <stdio.h> int main() { FILE *fptr; int... » read more

##### Get the Number of Odd & Even Numbers in an Array using C

C is a general-purpose language which is specially used to create operating systems due to its portability and low-level access to memory. From this article, we will be extracting the odd and even numbers from an array and display their respective count using C. Odd & Even Numbers in an Array using C As we... » read more

##### Find the Biggest of Three Numbers using C

In this tutorial, we will learn how to find out the largest number out of three numbers using simple if-else conditions in C programming Language. Method 1 #include <stdio.h> #include <stdlib.h> int main() { int number1, number2, number3; printf("Enter the first number : "); scanf("%d", & number1); printf("Enter the second number : "); scanf("%d", &... » read more