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??????
5 Respostas
+ 7
*pa = 12 and *pb=13 so output will be 25
+ 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;
}
+ 3
yes I think
+ 3
yes output would be25
+ 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