why do we use pointer instead directly acessing the data?

Answers were Sorted based on User's Feedback



why do we use pointer instead directly acessing the data?..

Answer / 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

why do we use pointer instead directly acessing the data?..

Answer / jitendra mishra

As we know pointer shows the address of a particular variable in the memory space.and accessing variable by its name is a bit time consuming because there can have more than one variable of same name but there can not be same address for two different variables.So pointer is more accurate and quick.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What are nested functions in c?

0 Answers  


What are the various topologies? Which one is the most secure?

2 Answers  


When should a type cast be used?

0 Answers  


what is the Output? int a=4 b=3; printf("%d%d%d%d%d%d",a++,++a,a++,a++,++a,a++); printf("%d%d%d%d%d%d",b--,b--,--b,b--,--b,--b);

10 Answers   IBM,


Which of the Following will define a type NODE that is a node in a Linked list? A)struct node {NODE*next;int x;};type def struct node NODE; B)typedef struct NODE {struct NODE *next;int x;}; C)typedef struct NODE {NODE *next;int x;}; D)typedef struct {NODE *next;int x;}NODE;

5 Answers   Accenture, TCS,






Write a program to give following output..... ********* **** **** *** *** ** ** * * ** ** *** *** **** **** *********

4 Answers  


What is wrong with this code?

0 Answers  


what is difference between null and nul in c language

2 Answers  


what is the disadvantage of using macros?

1 Answers   Wipro,


What is the difference between macros and inline functions?

5 Answers   Global Edge, L&T,


Heyyy All, Just a challenge . A C program with if Else if(){ /// insert sumthing print ("in if") // insert sumting } else { ///// insert sumthing print ("in else"); //// insert sumthing } can anyone modify it so that program prints. if and else both

3 Answers  


25. It takes five minutes to pass a rumour from one person to two other persons. The tree of rumour continues. Find how many minutes does it take spread the rumour to 768 persons. ?

11 Answers   CTS, TCS,


Categories