+ 9
What is the difference between ** and * operator??
*ptr ,**ptr
11 Respostas
+ 13
*ptr is pointer and **ptr is pointer to pointer. So pointer to pointer **ptr will have three asterix ***ptr, pointer to that pointer four and so on...
+ 4
@Ace
That's true. Thank you for telling me!
+ 4
Check out, I have reached GOLD!
https://www.sololearn.com/discuss/986250/?ref=app
+ 3
* means multiplication and ** means to the power.
example- 2**3=8(2*2*2)
+ 3
@Suman
Actually, the question is asking about these operators in pointers and not in arithmetical expressions.
One more thing is that in C++ we do not use ** as exponent operator. Instead, ^ is used.
5^3 means 125!
+ 2
In fact ** is not an pointing operator.
It is used to point to another pointer.
For example,
string object = "Some text!";
string *ptr = &object;
string **ptr =& ptr; // Here **ptr is actually *(*ptr)!
cout << *ptr;
// Output: Some text!
// You may point to other pointers by adding an //asterisk in front.
// A pointer to the pointer to the pointer will be ***ptr and so on!
+ 1
** means raise to some power.
* means the ordinary multiplication.
- 1
** for like a=2 and b=3
then use puts a**b o/p is 8
- 1
honestly have no clue