Knowee
Questions
Features
Study Tools

Which of the following statements about pointers is true?Marks : 1Negative Marks : 0Answer herePointers are not used in C programming.Pointers cannot be assigned values directly.Pointers are variables that store the memory address of other variables.Pointers can only be used with integer data types.Clear

Question

Which of the following statements about pointers is true?Marks : 1Negative Marks : 0Answer herePointers are not used in C programming.Pointers cannot be assigned values directly.Pointers are variables that store the memory address of other variables.Pointers can only be used with integer data types.Clear

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

Solution

The true statement about pointers is: "Pointers are variables that store the memory address of other variables."

Here's why:

  1. Pointers are indeed used in C programming. They are a powerful feature of the language that allows for dynamic memory allocation and efficient handling of arrays and structures.

  2. Pointers can be assigned values directly, although this is typically done using the address-of operator (&) or through the use of functions like malloc() in C.

  3. Pointers can be used with any data type, not just integers. You can have pointers to char, float, double, any user-defined types, or even other pointers.

This problem has been solved

Similar Questions

Which of the following statements about pointers is true?

Multi Choice Type QuestionWhat 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

Multi Choice Type QuestionWhat does a null pointer indicate in C?Marks : 1Negative Marks : 0Answer hereA pointer that points to a constant valueAn uninitialized pointerA pointer with a value of zero (NULL)None of the mentioned options

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

Which of these is a correct way to initialize a pointer in C?Marks : 1Negative Marks : 0Answer hereint ptr = 0int *ptr = 0int ptr = NULLint *ptr = NULL

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.