answersLogoWhite

0

Can you divide pointer variables

Updated: 12/10/2022
User Avatar

Wiki User

14y ago

Best Answer

No, but if you really want that, use type-cast, for example:

printf ("main=%p=5*%lx\n", main, ((long)main)/5);

Of course it is good for nothing at all.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Can you divide pointer variables
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How accessing a pointer an a variable differs?

Pointer-variables are variables, so there is no difference.


Explain reference variable and how it is different from pointer variable?

In JAVA, all variables are reference variables, and there are no pointer variables. Even though the platform may implement them as pointers, they are not available as such. In C, no variables are reference variables. They are a C++ enhancement. In C++ a reference variable is syntactically the same as a pointer variable, except that the use of the indirection operator (*) is implicit. You do declare reference variables slightly differently than pointer variables but, once you do so, they can be treated as non-pointer variables. Reference variables also cannot be redefined once they have been initialized to point to some object. They are const. Structurally, there is no difference between a pointer variable and a reference variable. They are both still pointers. The compiler just makes it easier to treat reference variables and non-pointer variables the same way.


What is pointer?

pointer r the variables created in RAM which store the address of a another variable


Can a pointer be considered a variable?

You can declare pointer-variables, if that's what you mean. Example: char *sample = "Sample";


How many pointers can be used in a c program?

Answergenerally we use simple pointer, void pointer,null pointer, structure pointer. Answerzero or more (unlimited).


WHAT IS POINTER TO POINTER IN C POINTER?

Pointer in C is Memory Reference. It stores memory address of any variable, constant, function or something you later use in your programming. Pointer basically used to ease the referencing of variables and others or in polymorphism and inheritance.


How we can get address of variables in Java as pointer variables in C?

At any given point of time you cann't get the address of a variables of java program. This is meant for security purpose only.


Is declaration of variables allocated memory?

Constants, static variables and global variables are allocated in the program's data segment at compile time. Local variables are allocated on the stack at runtime. Variables cannot be allocated on the heap, you must use a constant, static variable, global variable or local variable to store the start address of a dynamic memory allocation. The variable must be a raw pointer or a reference handle (a smart pointer).


What is a pointer variable in C?

Pointer variables point to data variables. They are mostly used to point to dynamically allocated data variables, but can actually point to anything (e.g. statically allocated variables, array elements, anywhere inside a variable, program machine code, I/O device descriptors, nonexistent memory). Misuse of pointer variables, either unintentionally or intentionally, is a major cause of nearly impossible to debug software problems in programs written in C (and C++).


Different types of pointers in c language?

... are usable. void pointer (generic pointer) : a special type of pointer which point to some data of no specific types. void *p; null pointer : a special type of pointer which point nowhere. it is usually used to check if a pointer is pointing to a null or free the pointer during deallocation of memory in dynamic memory allocation; it is define by using the predefine constant NULL int *p=NULL; wild pointer : uninitialized pointer. it hold a garbage value. i.e it is not pointing to any memory location yet. dangling pointer: pointer pointing to a destroyed variable. it usually happen during dynamic memory allocation when the object is destroyed but not free and the pointer is still pointing to the destroy object.


What is this keywords?

'This' is a keyword that is it is previously defined in the library. It is Used with this pointer to point to another variables memory address.


How do you get the mean in math?

you add all the numbers together then divide the answer by the number of numbers there are