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

Ecommerce concepts, Your task is to propose a business that has a Web ...

Your task is to propose a business that has a Web presence on the Internet. Your business may be an online only business or a so-called "clicks and mortar" business. You

Explain the numbering plan for isdn address structure, Explain the numberin...

Explain the numbering plan for ISDN address structure. The numbering plan for ISDN is evolved with using the following guidelines: 1. This is based on, and is an improvemen

Logical user-centered interactive design methodology, Question: Logical...

Question: Logical User-Centered Interactive Design Methodology is a methodology that identifies six clear stages to help in software development while keeping the user in mind.

Number system, Number systems   Consider a decimal number:         ...

Number systems   Consider a decimal number:               7654.32   Short hand for:            7 * 103 + 6*102 + 5* 101 + 4*100 + 3*10 -1  + 2*10 -2   Likewise

Eight-stage process - conjunctive normal forms, Eight-stage process - Conju...

Eight-stage process - Conjunctive normal forms: Hence we notice the following eight-stage process converts any sentence with CNF as:  1.  Eliminate all arrow connectives by

Hat are the advantages and disadvantages of hardwired, What are the advanta...

What are the advantages and disadvantages of hardwired and micro programmed control? Advantages of hardwired control i. Operate at high speed ii Each state of this coun

Determine if the product of two integers are even, If the product of two in...

If the product of two integers a and b is even after that prove that either a is even or b is even. Answer: It is illustrated that product of a and b is even so let a * b = 2n.

What are the requirements of the user, This step of systems examination is ...

This step of systems examination is one of the most difficult. In this stage systems specifications are identified by asking what, who, when, where and how. A few questions address

Explain the term thread scheduling, Problem: a) Most RMI and RPC system...

Problem: a) Most RMI and RPC systems expect to be supported by the "Request-Reply Protocol". Describe what "Request-Reply Protocol" is. b) Describe the invocation semantics

What is application analysis, What is application analysis? The purpose...

What is application analysis? The purpose of analysis is to understand the problem so that a correct design can be constructed. The application analysis focuses on major applic

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