answersLogoWhite

0

How do pointer work in c program?

Updated: 8/11/2023
User Avatar

Wiki User

9y ago

Best Answer

Pointer can be defined as variable that is used to store memory address , usually the location another variable in memory. Pointers provide a means through which memory location of a variable can be directly accessed.

User Avatar

Wiki User

9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do pointer work in c program?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the purpose of pointer in C?

the purpose of pointer in c for saving the memory space.,and reduce the length and complexity of the program


What is meant by an pointer in c program?

Pointer is like variable address the members in memory shell


C program pointers to pointers examples?

Pointer to Pointer is a double pointer, denoted by (**). Pointer stores the address of the variable and pointer to pointer stores the address of a pointer variable and syntax can be given as int **ptr2ptr;


A c program to show the drawbeck of pointer?

int main (void) { int *p; /* uninitialized pointer */ *p = -1; /* writing to random memory */ return 0; }


You want to write a simple without using pointer or array c program which will print greatest number when you give 20 number?

i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?


What is the base address of an array in c program?

the address of variable (pointer) that contains array


Why is returning a pointer to a local variable a logical error?

Local variables automatically fall from scope when a function returns. If the function returns a pointer to one of its local variables and you subsequently attempt to dereference that pointer, you introduce undefined behaviour into your program. With undefined behaviour you have no way of knowing what will happen: the program may work; the program may crash; the program may wipe the user's hard-drive. Anything can happen when you introduce undefined behaviour into a program.


How can you offset a pointer in C?

Increment or decrement the pointer by the required offset.


What is pointer to a member in objective c?

It is a pointer that points to a member of a structure.


Pointer arithemetic in C?

no


What is a segmentation fault?

An error in which a running program attempts to access memory not allocated to it and core dumps with a segmentation violation error. This is often caused by improper usage of pointers in the source code, dereferencing a null pointer, or (in C) inadvertently using a non-pointer variable as a pointer.


What is a segment fault?

An error in which a running program attempts to access memory not allocated to it and core dumps with a segmentation violation error. This is often caused by improper usage of pointers in the source code, dereferencing a null pointer, or (in C) inadvertently using a non-pointer variable as a pointer.