1,564 views
0 votes
0 votes

If we delete a record to which another record contains a pointer,  then that pointer is called a

  1. Pinned pointer
  2. Dangling pointer
  3. Pointless pointer
  4. None of the above

1 Answer

2 votes
2 votes

We can think like this If a pointer is pointing the memory address of any record but after some point of time record has deleted from that memory location while pointer is still pointing such memory location. Such pointer is known as dangling pointer .

Related questions

1.3k
views
2 answers
3 votes
dd asked Dec 13, 2016
1,302 views
#include <stdio.h> int main() { int A[3][4] = {{1,2,3,4}, {4,5,6,7}, {8,9,10,11} }; int *p = &A[0][0]; int *q = (int*)(&A[0]+1); int *z = (int*)(&A+1); int ... printf("%d\n",*(q - 2)); printf("%d\n",*(z - 2)); printf("%u %d\n",w,*(w+1)); }
266
views
1 answers
0 votes
Debargha Mitra Roy asked Apr 16
266 views
#include <stdio.h> int main() { int a[3][2] = {1, 3, 5, 7, 9, 11}; int *ptr = a[0]; ptr += sizeof(int); printf("%d", *ptr); return 0; }(Assume size of int to be $2$ bytes.)The output is __________.
859
views
1 answers
0 votes
Mrityudoot asked Apr 24, 2023
859 views
For arrays with more given elements than its size, why does doing a[i] print garbage value but *a+i brings the correct value, despite them being the same thing (a[i] = *a+i)int a[ ... , Garbage printf( %d , *a+i; // gives 1, 2, 3, 4}
392
views
1 answers
0 votes
jaikant asked Apr 14, 2023
392 views
I have confusion regarding pointers, why 1D array and 2D array works differently. For e.g. I have written a code#include <stdio.h>int main(){ int arr[6 ... isn't *marr suppose to print 11' in place of some longed signed value.