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 the criteria to classify data structures, Explain the criteria to c...

Explain the criteria to classify data structures used for language processors? The data structures utilized in language processing can be classified upon the basis of the subse

What features are needed to implement top down parsing, The features are ne...

The features are needed to implement top down parsing are? Ans. Source string marker, Prediction making mechanism and also matching and backtracking mechanism features are need

DISCRETE STRUCTURES, SET 2I OF ALL INTEGERS WITH ZERO IS AN ABELIAN GROUP

SET 2I OF ALL INTEGERS WITH ZERO IS AN ABELIAN GROUP

Prior conditions - logic programs, Prior Conditions - Logic programs: ...

Prior Conditions - Logic programs: However firstly there we must make sure that our problem has a solution. Whether one of the negative examples can be proved to be true from

What are the advantages of CMOS logic, What are the advantages of CMOS logi...

What are the advantages of CMOS logic Ans: Advantages of CMOS Logic: (i) The power dissipation is mini-mum of all the logic families (ii) LSI and VLSI are possible

Address translation with dynamic partition, Address translation with dynami...

Address translation with dynamic partition : Given figure shows the address translation process with dynamic partitioning, where the processor provides hardware support for

Computer representation for the negative integer, Everything stored on a co...

Everything stored on a computer can be represented as a string of bits. However, different types of data (for example, characters and numbers) may be represented by the same string

What is the significance of asp.net routing, ASP.NET MVC uses ASP.NET routi...

ASP.NET MVC uses ASP.NET routing, to map incoming browser requests to controller action process. ASP.NET Routing makes use of route table. Route table is formed when your web appli

Instruction set architecture - computer architecture, Instruction Set Archi...

Instruction Set Architecture:                             Instruction set architecture cycle-it is smallest unit of time in a processor. superscalar processor

Hrm, hrm digrams

hrm digrams

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