When can you use a pointer with a function?
Answer / Neeraj Trivedi
"A pointer can be used with a function to allow the function to modify its caller's variables, or to pass large blocks of data (such as arrays and structures) to functions more efficiently. Pointers are particularly useful when working with dynamic memory allocation or in situations where you want to iterate through an array or traverse a data structure like a linked list. "
| Is This Answer Correct ? | 0 Yes | 0 No |
write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);
what is the difference between char * const and const char *?
Explain what is meant by 'bit masking'?
How does the C program handle segmentation faults?
What are the header files used in c language?
What is a loop?
Who developed c language?
Under what circumstances does a name clash occur?
What is function pointer c?
int a=2,b=3,c=4; printf("a=%d,b=%d\n",a,b,c); what is the o/p?
What are function pointers? Provide an example.
What is the use of getch ()?