- 2

Type in a code to declare variable b and assign a's value to b, and then print their sum to the screen.

int a = 15; int b = ; cout << a b << endl;

1st Jul 2018, 12:54 PM
BIRUDARAJU SAIPRAKASH
BIRUDARAJU SAIPRAKASH - avatar
9 Réponses
+ 1
inline int add(int a, int b) { __asm__ __volatile__ ( " addl %%ebx, ℅℅eax " : "=a" (a) : "a" (a), "b" (b) ); return a; } int main() { int a = 15; int b = a; cout << add(a, b); // 30 }
1st Jul 2018, 1:47 PM
To Seek Glory in Battle is Glorious
To Seek Glory in Battle is Glorious - avatar
0
Are you asking for help or posing a challenge?
1st Jul 2018, 1:04 PM
David Akhihiero
David Akhihiero - avatar
0
int a=10; int b=a; cout << a+b ;
1st Jul 2018, 3:03 PM
Aveek Bhattacharyya
Aveek Bhattacharyya - avatar
0
AK-47 that's beautiful
1st Jul 2018, 7:58 PM
hinanawi
hinanawi - avatar
0
declare variable b and assign a's value to a( int b = a;) print their sum ( + ) int a = 15; int b =a ; cout << a +b << endl;
7th Aug 2019, 9:27 AM
Cheddad Zoher
0
correct
26th Sep 2020, 12:23 PM
Alabi AbdulMaleek
Alabi AbdulMaleek  - avatar
0
31st May 2021, 11:45 AM
اورد عبدالامير جاسم _المرحلة الثانية شعبة[ A]
اورد عبدالامير جاسم _المرحلة الثانية شعبة[ A] - avatar
0
int a= 15; int b =a; cout<<a+b<<endl;
28th Jun 2021, 6:21 AM
sai krishna (RA1911003020369)
sai krishna (RA1911003020369) - avatar
0
a +
2nd Aug 2021, 2:29 AM
Yashika Patel