How a pointer variable declared in c, Computer Engineering

How a pointer variable declared in C ? Why is it sometimes desirable to pass a pointer to a function as an argument?

A pointer is a variable which contains the address in memory of another variable. We can have a pointer to any variable type.

To declare a pointer to a variable do:

int *ip;

This declaration looks like our earlier declarations, with one obvious difference: that asterisk. The asterisk means that ip, the variable we're declaring, is not of type int, but rather of type pointer-to-int. (Another way of looking at it is that *ip, which as we'll see is the value pointed to by ip, will be an int.)

The unary or monadic operator & gives the ''address of a variable''.

The indirection or dereference operator * gives the ''contents of an object pointed to by a pointer''.

 

Posted Date: 6/14/2013 7:06:57 AM | Location : United States







Related Discussions:- How a pointer variable declared in c, Assignment Help, Ask Question on How a pointer variable declared in c, Get Answer, Expert's Help, How a pointer variable declared in c Discussions

Write discussion on How a pointer variable declared in c
Your posts are moderated
Related Questions
Objectives After going through this part, you will be capable to: Examine the meaning of Pipeline processing and explain pipeline processing architectures; Classify

What is the meaning of Proper programming Proper programming of the ports of the company's Web server through detection of IP addresses could be an excellent strategy or solut

What are the concerns for growth of e-commerce in India? Government as Facilitator for the growth of e-commerce has taken following steps: a. Promotion of competitive dataco

Truth table of NAND and NOR can be made from NOT (A AND B) and NOT (A OR B) correspondingly. Exclusive OR (XOR) is a special gate whose output is one only if two inputs aren't equa

Q. Write short notes on proton - proton fusion in sun. Proton - Proton cycle 1 H 1 + 1 H 1 → 1 H 2 + 1 e 0 + ν (emission of positron as well as neutrino) 1

Power point presentation Arrange a 20 minutes power point presentation showing the original and processed filters.  Discuss the methods used for processing and comment on each r

Q. Efficiency - Metrics for performance evaluation? The other significant metric employed for performance measurement is efficiency of parallel computer system it implies that

State the Example of begin end module sequential(); reg a; initial begin $monitor ("‰g a = ‰b", $time, a); #10 a = 0; #11 a = 1; #12 a = 0; #13 a = 1; #

Many physicists believe that the universe is governed by a single system. A system which is capable of describing the behaviour of the very large (stars and planets) and the very s

Q. Illustrate what is a Centrifugal Force? Answer:- Centrifugal force is the force that is equivalent in magnitude but opposite in direction to the centripetal force which