arrow
arrow
arrow
Which of the following statements about pointers in C are TRUE? A. Pointers can be used to access array elements. B. Pointers can store the addr
Question



Which of the following statements about pointers in C are TRUE?
A. Pointers can be used to access array elements.
B. Pointers can store the address of another pointer.
C. Pointers are automatically deferenced in expression.
D. Pointers cannot be used to access structure members.
Choose the correct answer from the options given below:

A.

A and C only

B.

A and B only

C.

B and C only

D.

C and D only

Correct option is B


A. Pointers can be used to access array elements: (True) Pointers can be used to traverse arrays and access array elements using pointer arithmetic.
B. Pointers can store the address of another pointer: (True) Pointers can hold the memory address of other pointers, creating multi-level pointers.
C. Pointers are automatically dereferenced in expression: (False) Pointers need to be explicitly dereferenced using the * operator.
D. Pointers cannot be used to access structure members: (False) Pointers can access structure members using the -> operator.
Information Booster:
1. Pointers and Arrays: Pointers can traverse arrays by storing the address of the array’s first element.
2. Pointer-to-Pointer: Multi-level pointers (e.g., int **ptr) can hold the address of another pointer.
Additional Knowledge:
· Dereferencing Pointers: Explicit dereferencing is required in expressions, where the * operator retrieves the value stored at the memory address.
· Accessing Structure Members: The -> operator is used to access structure members through pointers.

Free Tests

Free
Must Attempt

Basics of Education: Pedagogy, Andragogy, and Hutagogy

languageIcon English
  • pdpQsnIcon10 Questions
  • pdpsheetsIcon20 Marks
  • timerIcon12 Mins
languageIcon English
Free
Must Attempt

UGC NET Paper 1 Mock Test 1

languageIcon English
  • pdpQsnIcon50 Questions
  • pdpsheetsIcon100 Marks
  • timerIcon60 Mins
languageIcon English
Free
Must Attempt

Basics of Education: Pedagogy, Andragogy, and Hutagogy

languageIcon English
  • pdpQsnIcon10 Questions
  • pdpsheetsIcon20 Marks
  • timerIcon12 Mins
languageIcon English

Similar Questions

test-prime-package

Access ‘UGC NET Computer Science’ Mock Tests with

  • 60000+ Mocks and Previous Year Papers
  • Unlimited Re-Attempts
  • Personalised Report Card
  • 500% Refund on Final Selection
  • Largest Community
students-icon
353k+ students have already unlocked exclusive benefits with Test Prime!
Our Plans
Monthsup-arrow