problem with swaping the numbers in c++ | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

problem with swaping the numbers in c++

int A{10}; int B{20}; int *num1{&A}; int *num2{&B}; int *temp{num1}; num1 = num2 ; num2 = temp; Here I have observed that *num1 and *num2 swapped but not A & B........ why??????

28th May 2021, 5:01 PM
saurabh
saurabh - avatar
0 Antworten