Data Structures Question:
Download Job Interview Questions and Answers PDF
What is significance of ” * ” ?
Answers:
Answer #1The symbol “*” tells the computer that you are declaring a pointer.
Actually it depends on context.
In a statement like int *ptr; the ‘*’ tells that you are declaring a pointer.
In a statement like int i = *ptr; it tells that you want to assign value pointed to by ptr to variable i.
Actually it depends on context.
In a statement like int *ptr; the ‘*’ tells that you are declaring a pointer.
In a statement like int i = *ptr; it tells that you want to assign value pointed to by ptr to variable i.
Answer #2The symbol “*” is also called as Indirection Operator/ Dereferencing Operator.
Download Data Structures Interview Questions And Answers
PDF
Previous Question | Next Question |
Is Pointer a variable in data structure? | Why do we Use a Multidimensional Array in data structure? |