what is disadvantage of pointer in C

Answer Posted / sourisengupta

The only drawback of pointer in C maybe that if used
carelessly, you can access and overwrite some critical
memory. For Eg: if you declare an array of 5 ints, arr[5].
and if you try to write on arr[5], you will end up writing
outside the array, and eventually corrupt some memory
location. So data security is lost while handling pointers

Is This Answer Correct ?    12 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is the exit() function same as the return statement? Explain.

664


How do you declare a variable that will hold string values?

670


What is the purpose of main( ) in c language?

623


p*=(++q)++*--p when p=q=1 while(q<=6)

1268


Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.

662






Describe the order of precedence with regards to operators in C.

633


Linked lists -- can you tell me how to check whether a linked list is circular?

646


What does stand for?

598


Why does notstrcat(string, "!");Work?

643


What is structure padding in c?

628


How do you determine whether to use a stream function or a low-level function?

649


When should a far pointer be used?

604


What is the value of a[3] if integer a[] = {5,4,3,2,1}?

673


What are operators in c?

583


Is c pass by value or reference?

595