answersLogoWhite

0

Not really, but you can have:

- a pointer pointing to a structure (FILE * is an example)

- a pointer pointing to a structure-member (eg: struct tm tm; int *ip= &tm.tm_year)

- a structure-member that is a pointer (any type)

Example:

typedef struct TreeNode {

struct TreeNode *left, *right;

int data;

} TreeNode;

TreeNode *root = (TreeNode *)calloc (sizeof (TreeNode), 1);

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What is the difference between c plus plus and java programming?

Java doesn't have pointers. C++ has pointers.


What is the difference between pointers in c and c plus plus?

Nothing.


How do stuctures in C and C plus plus differ?

Structures in C and C++ differ in that C structures do not have an automatic typdef associated with them.


Is it possibly to return an array of strings in a function without using pointers in C plus plus?

No.


What are the storage allocation in C plus plus?

They mostly deal with pointers and new operators in memory.


How do you write a reverse function in C plus plus without pointers?

You can either use references or you can simply return the result by value. Note that in C++, unlike C, references are not the same as pointers. C++ references are aliases, alternate names for existing objects, whereas pointers are just variables that may contain a memory address that can be dereferenced.


What are the applications of pointers in using c language?

Accessing data by address. Some data-structures, like lists and trees, are usually implemented using pointers.


Do you have pointer concept in c plus plus language?

Yes. All string variables are pointers as are other arrays.


In computer language C plus plus is related to?

C++ is related to C, the language from which it is derived.


Difference between array and pointers in c plus plus?

A pointer is simply a variable that can store a memory address and has the same purpose in both languages. The only real difference is that C++ pointers can point at objects (instances of a class) and indirectly invoke their methods, whereas pointers in C (which is not object oriented) cannot.


What are the three selection structures available in C plus plus?

if while switch


Can functions be defined in C structures?

No, all functions must be defined outside of C structures. However, all functions in C have a type (the return type) and an identity (an address), so you can define function pointers as members of a structure to achieve the same end.