0

Help What will be the output

int a=12; int b=13; int *pa=&a; int *pb=&b; *pa+=*pb; // same as a+=b; is the output 25??????

22nd Nov 2016, 6:49 AM
stephen haokip
stephen haokip - avatar
5 Respostas
+ 7
*pa = 12 and *pb=13 so output will be 25
30th Dec 2016, 1:33 PM
KavyaOleti
KavyaOleti - avatar
+ 3
yes it is 25 #include <iostream> using namespace std; int main() { int a=12; int b=13; int *pa=&a; int *pb=&b; *pa+=*pb; cout << *pa; return 0; }
22nd Nov 2016, 6:55 AM
Aditya kumar pandey
Aditya kumar pandey - avatar
+ 3
yes I think
26th Feb 2017, 4:55 PM
🇨 🇭 🇭 🇦 🇹 🇷 🇦 🇵 🇦 🇱
🇨 🇭 🇭 🇦 🇹 🇷 🇦 🇵 🇦 🇱 - avatar
+ 3
yes output would be25
28th Feb 2017, 8:46 AM
Yash Raghava
Yash Raghava - avatar
+ 1
*pa and *pb have value of a and b. *pa += *pb is same as a += b // a = a+ b *pa = *pa + *pb; *pa = a + b; put the value of *pa and *pb *pa = 12 + 13; output is 25
1st Jan 2017, 6:36 PM
Avanish Kumar
Avanish Kumar - avatar