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
(a) Explian two limitations of dead-box analysis. (b) Describe why memory analysis is difficult. (c) With reference to the "Shadow Walker" rootkit, explain what is meant by

The major programs here are Arthur Samuel's, the rote learning method which is a lot like a memory based method, generalization learning which is a lot like backprop and a signatur

What are Attributes?  Attributes are declarative tags in code that insert additional metadata into an assembly. There exist two types of attributes in the .NET Framework: Pred

The preorder traversal sequence of a binary search tree is 30, 20, 10, 15, 25, 23, 39, 35, 42. Which one of the following is the postorder traversal sequence of the same tree?

For executing recursive function the data structure used is: For executing recursive function, stack is used as a data structure.

Vector-Vector Instructions In this category, vector operands are fetched from vector register and accumulated in another vector register. These instructions are indicated with

Define asynchronous bus. Asynchronous buses are the ones in which every item being transferred is accompanied by a control signal that shows its presence to the destination uni

What are the user interfaces of interactive lists? If you require the user to communicate with the system during list display, the list must be interactive.  You can describe

expression for thickness and refractive index of coating material to act as anti reflection coating

Define throughput?  Throughput in CPU scheduling is the number of processes that are completed per unit time. For long processes, this rate might be one process per hour; for s