what is pointer ? what is the use of pointer?

Answer Posted / gouse mohiddin

A Pointer is a variable which holds the memory address of
the another variable
pointers are used to save and find the memory address of
the another variable.
The syntax is as shown below. You start by specifying the
type of data stored in the location identified by the
pointer. The asterisk tells the compiler that you are
creating a pointer variable. Finally you give the name of
the variable.
type * variable name

Example:

int *ptr;
float *string;
Address operator:

Once we declare a pointer variable we must point it to
something we can do this by assigning to the pointer the
address of the variable you want to point as in the
following example:

ptr=#

This places the address where num is stores into the
variable ptr. If num is stored in memory 21260 address then
the variable ptr has the value 21260.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.

1459


What are the 4 data types?

784


What is || operator and how does it function in a program?

864


In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.

1620


How can I make sure that my program is the only one accessing a file?

959


Is c weakly typed?

773


What is variable in c example?

831


What is C language ?

1730


Which is more efficient, a switch statement or an if else chain?

788


Why c is called a mid level programming language?

843


List a few unconditional control statement in c.

778


Is c language still used?

744


what is bit rate & baud rate? plz give wave forms

1731


What are integer variable, floating-point variable and character variable?

884


WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?

2112