0

Pointers

1) why do we put Int x = 15 Int *ptr = &X Not int x = 15 Int *ip = &x ?? 2) are pointers really important ?? 3) why when we do cout << &x <<endl; It output random numbers and letters like uehJdf72646 ???

11th Sep 2020, 10:18 AM
NotMicah
2 Réponses
+ 2
Yes pointers,vector, STL are main in cpp . These things make cpp Programming better . If u have not studied pointer vector templates then u have learned nothing. Your third statement cout<<&x<<endl ; &x will print address its not a letters or garbage value. First read concepts about pointers.
11th Sep 2020, 10:34 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
0
Thank you for the answer ! ☺️
14th Sep 2020, 7:05 PM
NotMicah