Count Repeated Elements in an Array in C Programming

Count Repeated Elements in an Array in C Programming is generally asked in interviews. This problem can be solved in any language. Here we will discuss algorithms to count repeated elements and implement them in C programming. What is Repeated Elements Repeated elements are elements that occur more than one time in a list or … Read more

GCC installation on linux unix

In a Linux or UNIX, to check whether GCC is installed on your system  enter the following command in the command line −

If GCC compiler installed on your system, then it should print a message as follows −

If GCC is not installed, then you will have to install it yourself On … Read more

Addition of two numbers in C Programming

Addition of two numbers in C Programming is basic and simple task. We can create it very easily. Writing a program is based on Algorithm. An algorithm is step by step description of program. So before writing program we must write algorithm to develop this program. There are different ways to represent an algorithm 1 … Read more

Reading a File in C Programming

Reading a File To read a  file there are following  function available: Function fgetc():  Function fgetc() is used to read a single character at a time from the input file. The syntax of this function is −             Syntax :                int fgetc( FILE * fp ); Functions fgets():  Functions fgets() is used to reads string from input … Read more

Break and Continue Statement in C with Example

Break and Continue statements in C are looping control statements. Based on the break and continue statement loop can be broken or skipped break and continue both are keywords. break – Uses to break the loop and also use with a switch to break the switch case. continue– skip the current execution of the loop … Read more

if else statement in C programming

In the C language decision making statement is executes if the given condition is true otherwise conditional block will never execute. In C language non-zero and non-null values are consider as true, and zero or null values are consider  false. if statement Syntax of an if statement −

In a if statement if the expression result is non zero true, then … Read more

Array of pointers in C Programming

Example: Write a program to assign the address of array elements to pointer variable and print the array element with address.


Functions in C Programming

In a C programming language a function is a group of statements that together perform a special task. In every C program has at least one function, which is main(). In a C library has a numerous predefined or built-in functions. For example, strcat() to concatenate two strings, main() from where program execution starts.  In a C programming … Read more