In this example, strings are sorted using dynamic memory allocation.
Dynamic memory allocation is when, the amount of memory required to be allocated is decided at the run time.
In this example, strings are sorted using dynamic memory allocation.
Dynamic memory allocation is when, the amount of memory required to be allocated is decided at the run time.
This example shows how to allocate (with new) and deallocate (using delete) memory dynamically and goes on to find the first n primes.
This example shows how to use the pointer notation with a multidimensional array.
This example calculates the first 100 primes. The first three elements of this array have been defined: 2,3,5. And then the idea is to keep on adding to this array as a prime is found.
This example shows how strings are sorted using pointers. It displays words in ascending order.
This example shows how to initialize and use an array of pointers to characters.
This example depicts how to initialize pointer variables with strings. As done in lines 10-16 in the following example.
This example shows the indirection operator(*) in action. It is a unary operator.