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 Statement in C are looping control statements. Based on break and continue statement loop can be break or skipped break and continue both are keywords. break – Uses to break the loop also use with switch to break the switch case. continue– skip the current execution of loop and transfer control to … 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

Matrix Multiplication in C Programming

Example: Write a program to multiply two matrix. Firstly, ask from user order of matrix( number of rows and column) Then take the elements of matrix from user as a input and print the resultant matrix.

NULL Pointers in C Programming

A pointer that is assigned NULL is called a null pointer. We must initialize NULL pointer during variable declaration. A null pointer refers to pointer variable that does not point to a valid address. Generally NULL pointer is used when you do not have an exact address to be assigned.