How a pointer variable declared in c, Computer Engineering

Assignment Help:

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''.

 


Related Discussions:- How a pointer variable declared in c

What are base tables of an aggregate object, What are base tables of an agg...

What are base tables of an aggregate object? The tables making up an aggregate object (primary and secondary) are known as aggregate object.

What are the properties of e-cash, What are the properties of E-cash? ...

What are the properties of E-cash? Properties: a. Monetary Value: It must be backed through either cash, bank –certified cashier’s cheque and authorized credit cards.

Design a 32:1 multiplexer, Design a 32:1 multiplexer using two 16:1 multipl...

Design a 32:1 multiplexer using two 16:1 multiplexers and a 2:1 multiplexer Ans. Design a 32 X 1 MUX by using two 16 X 1 MUX and one 2 X 1. Now here total 32 input lines

What is direct addressing mode, Computer Organization and Architecture ...

Computer Organization and Architecture 1. Draw the block diagram of von Neumann Architecture and describe about its parts in brief. 2. Draw block diagram of Intel 8085 CPU o

Logic diagrams for same boolean expression, Q. Logic diagrams for same Bool...

Q. Logic diagrams for same Boolean expression? The expression F can be simplified using Boolean algebra. The logic diagram of simplified expression is drawn in fig (b)

How free-space is managed using bit vector implementation, How free-space i...

How free-space is managed using bit vector implementation? The free-space list is executed as a bit map or bit vector. Each block is shown by 1 bit. If the block is free, the b

What is soap and how does it relate to xml, The Simple Object Access Protoc...

The Simple Object Access Protocol (SOAP) uses XML to describe a protocol for the exchange of information in distributed computing environments. SOAP having of three components: an

What is a union, What is a union ? A union, like a structure, is a derive...

What is a union ? A union, like a structure, is a derived type. Unions follow the same syntax as structures but have members that share storage. A union type defines a set of alt

Network throughput-network properties, Network throughput It is an indi...

Network throughput It is an indicative measure of the point carrying capacity of a network. It is distinct as the total number of messages the network can transmit per unit tim

Define the products of dynamic mode, Define the Products of Dynamic mode ...

Define the Products of Dynamic mode Dynamic model: A model of dynamic behaviour of user object.  It defines important states of user object, the way that actions depend on

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd