Breaking News

C Tutorial

C is a general-purpose, procedural, imperative computer programming language developed in 1972 by Dennis M. Ritchie at the Bell Telephone Laboratories to develop the UNIX operating system. … This tutorial is designed for software programmers with a need to understand the C …

What is Array?

Whenever there is need to store a group of data of the same type in the memory, arrays are used. Two terms have been described here Array and String. Strings in C are represented by …

Read More »

What Is Array Declaration?

Array Declaration Arrays are defined in the same manner as ordinary variables, except that each array name must be accompanied by the size specification. The general form of array declaration is: data_type array_name[size]; data-type specifies …

Read More »

What is Array Initialization?

The Element of array are initialized in the same way as the ordinary variables. Example: int num[6]={2,4,5,35,12,12,67}; An example showing the index and its corresponding data (prices) > An example program of entering data into …

Read More »

What is Two Dimensional Array?

Two dimensional array (2-D array) is also called Matrix General form of 2-D array is: data_type array_name[row_size][column_size]; Example: int marks [4][2] Different ways of Initialization of a 2-Dimensional Array: int table [2][3]={0,0,0,1,1,1}; initialization done by …

Read More »

What is Multi Dimensional Array?

Arrays of three or more dimension is called Multi-Dimensional Array. General form Multi-Dimensional Array: data_type array_name[s1][s2][s3]……[sn]; Example: int survey[3][5][12] Here survey is a 3-dimensionalarray declared to contain 180 integer_type elements. (3x5x12=180) Initialization of 4-Dimensional Array: …

Read More »

What is String?

Strings in C are represented by arrays of characters. The end of the string is marked with a special character, the null character, which is simply the character with the value 0. Because C has no built-in facilities for manipulating entire arrays (copying them, …

Read More »

What is Function Definition?

Functions are self contained program segments that carry out some specific well defined task. In “C” , we include the header files like stdio, conio, string, etc. These files contain number of library functions which …

Read More »

Function Declaration

Before defining the function, it is desired to declare the function with its prototype. In function prototype, the return value of function, type, and number of argument are specified. Function declaration is written in following ways: return data_type …

Read More »

What is Function Call?

Function can be called either by value or by reference . A function can be called by specifying its name followed by a list of arguments enclosed in parentheses and separated by commas. From the above example the …

Read More »

What is Recursions?

Repetitive calling of the same function is called recursion. Recursions are those functions which call itself again and again. Recursive functions can easily become infinite loops. An example program to find out the factorial of …

Read More »

What is Pointers?

Pointers are a fundamental part of C. If you cannot use pointers properly then you have basically lost all the power and flexibility that C allows. The secret of C is in its use of …

Read More »

What is Pointer expression?

Like other variables pointer variable can also be used in expressions. Arithmetic and comparison operation can be performed on the pointers. Pointer Arithmetic Example: Addition of a number to a pointer int i=4,*j,* j=&i; j=j+1; …

Read More »

Pointer & functions

Let us now examine the close relationship between pointers and C’s other major parts. We will start with functions. When C passes arguments to functions it passes them by value. There are many cases when …

Read More »