Knowee
Questions
Features
Study Tools

What is the purpose of declaring a pointer variable in C?Marks : 1Negative Marks : 0Answer hereTo create a new variable.To store the address of another variable.To perform mathematical operations.All of the mentioned options

Question

What is the purpose of declaring a pointer variable in C?Marks : 1Negative Marks : 0Answer hereTo create a new variable.To store the address of another variable.To perform mathematical operations.All of the mentioned options

🧐 Not the exact question you are looking for?Go ask a question

Solution

The purpose of declaring a pointer variable in C is to store the address of another variable. Pointers are used for indirect access to variables, which means they hold the memory address of another variable. This can be particularly useful when you need to pass the address of a variable to a function, or when dealing with arrays and data structures.

Similar Questions

What is the purpose of declaring a pointer variable in C?

What is the purpose of pointer operators in C?Marks : 1Negative Marks : 0Answer hereTo manipulate characters in strings.To work with memory addresses and values through pointers.To control the flow of program execution.None of the mentioned options

What is the correct syntax for declaring a pointer variable?Marks : 1Negative Marks : 0Answer hereint *ptr;pointer int *ptr;*int ptr;None of the mentioned options

In C, what is the result of declaring a pointer as int *ptr; without initialization?Marks : 1Negative Marks : 0Answer hereThe value of the variableptr points to a specific known memory locationptr contains a garbage value as its addressptr points to the memory location 0

In the context of pointers, what is the significance of the Address operator?Marks : 1Negative Marks : 0Answer hereIt allocates memory dynamicallyIt deallocates memoryIt obtains the address of a variable for pointer initializationIt changes the value of a variable

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.