why do we use pointer instead directly acessing the data?
Answer Posted / manish
We use the pointer instead of the because of the fast
access of the data as pointer provides direct memory access.
Also, soemtimes passing the ;large structure variable in
the function argument requires large memoy stack but by
passing the pointer to the structure inside the function
will reduce the stack size.
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }
What does void main () mean?
What are the advantages of c language?
Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop
What is a class c rental property?
What is difference between && and & in c?
Is c weakly typed?
Is it acceptable to declare/define a variable in a c header?
which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +
What is the difference between fread buffer() and fwrite buffer()?
which is conditional construct a) if statement b) switch statement c) while/for d) goto
Describe static function with its usage?
What is the difference between procedural and functional programming?
Why c is a mother language?
Why pointers are used?