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

Explain fundamental models of inter process communication, Explain the two ...

Explain the two fundamental models of inter process communication. Two kinds of message passing system are given as: (a) Direct Communication : Along with direct communicat

Which is not a layer of input-output management module, Which is not a laye...

Which is not a layer of IO management module? Ans. MCS that is Management Control System, is not a layer of IO management module.

Inserting external media in the web page, Step 1: Click on the icon in the ...

Step 1: Click on the icon in the object tool bar Or Insert -> Media -> Choose the media type to be inserted Step 2: Find and select the file required (browse) Step 3: C

What is organizational structure, What is Organizational Structure? A b...

What is Organizational Structure? A business organization may be structured in many dissimilar ways, depending upon the environment within which it handles.  There is always

Give explanation about stored program control, Give explanation about Store...

Give explanation about Stored Program Control. Stored Program Control: In this centralized control, all the control equipment is replaced through a single processor that must

Explain the concept behind pre-compositing adobe, Question 1: (a) Expl...

Question 1: (a) Explain the concept behind Pre-Compositing Adobe After Effects. (b) Briefly describe the Wiggler function in Animation help in Adobe After Effects. (c)

Predicate logic - artificial intelligence, Translate the following sentence...

Translate the following sentences into predicate logic, using Russell's theory of definite descriptions to represent the article the. a. The wizzard of Oz fell. b. Everyone a

Explain dead code elimination, Explain briefly Dead code Elimination of the...

Explain briefly Dead code Elimination of the commonly used code optimization techniques Dead code Elimination: Code which is unreachable or which does not influence the pr

Rapid appllication development, Explain clearly the four stages in the Rapi...

Explain clearly the four stages in the Rapid Application Development

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