Pointers and Strings

1 year ago
MeraMind

A string in C is an array of characters ending in the null character (written as ‘\0′), which specifies where…

Array of Pointers

The way there can be an array of integers or an array of float numbers, similarly, there can be an…

1 year ago

Pointers and Multidimensional Arrays

C allows multidimensional arrays, lays them out in memory as contiguous locations, and does more behind the scenes address arithmetic.…

1 year ago

Arrays and pointers

Pointers and arrays are so closely related. An array declaration such as int arr[ 5 ] will lead the compiler…

1 year ago

Function returning a pointer

A function can also return a pointer to the calling program, the way it returns an int, a float or…

1 year ago

A Function returning more than one value

Using call by reference method we can make a function return more than one value at a time, which is…

1 year ago

Passing pointers to functions

Arguments can generally be passed to functions in one of the two following ways: 1. Pass by value method 2.…

1 year ago

Pointer Arithmetic

Pointer variables can also be used in arithmetic expressions. The following operations can be carried out on pointers: 1.Pointers can…

1 year ago

Null Pointer Assignment

It does make sense to assign an integer value to a pointer variable. An exception is an assignment of 0,…

1 year ago

Pointer to a Pointer

The concept of the pointer can be extended further. As we have seen earlier, a pointer variable can be assigned…

1 year ago

Pointer type declaration and assignment

We have seen that &qty returns the address of qty and this address can be stored in a variable as…

1 year ago

The address and indirection operators

Now we will consider how to determine the address of a variable. The operator that is available in C for…

1 year ago

Pointer Characteristics

Computer’s memory is made up of a sequential collection of storage cells called bytes. Each byte has a number called…

1 year ago

Pointers in C

If you want to be proficient in the writing of code in the C programming language, you must have a…

1 year ago

Accessing the members of an union

Individual union members can be used in the same way as the structure members, by using the member operator or…

1 year ago

Unions

Structures are a way of grouping homogeneous data together. But it often happens that at any time we require only…

1 year ago

Structures and Arrays

Thus far we have studied as to how the data of heterogeneous nature can be grouped together and be referenced…

1 year ago

Structures as Function Arguments

C is a structured programming language and the basic concept in it is the modularity of the programs. This concept…

1 year ago

Initializing structures

Like other C variable types, structures can be initialized when they’re declared. This procedure is similar to that for initializing…

1 year ago

Accessing the members of a structure

Individual structure members can be used like other variables of the same type. Structure members are accessed using the structure…

1 year ago