Question

int main () {             int gamma;             int delta;             gamma = 5; &nb

int main ()

{

            int gamma;

            int delta;

            gamma = 5;

            delta = 10;

            DoThis(gamma, delta);

            cout << “gamma is “ << gamma << “delta is “ << delta << endl;

}

void DoThis(int alpha, int beta)

{

            alpha = 2;

            beta = 3;

            cout << "alpha is " << alpha << "beta is " << beta << endl;

}

What is the output from the above program?

0 0
Add a comment Improve this question Transcribed image text
Answer #1
#include <iostream>

using namespace std;

void DoThis(int alpha, int beta);

int main ()

{

            int gamma;

            int delta;

            gamma = 5;

            delta = 10;

            DoThis(gamma, delta);

            cout << "gamma is " << gamma << "delta is " << delta << endl;

}

void DoThis(int alpha, int beta)

{

            alpha = 2;

            beta = 3;

            cout << "alpha is " << alpha << "beta is " << beta << endl;

}

Output :

alpha is 2beta is 3 gamma is 5delta is 10

Note: Please comment below if you have any doubts. upuote the solution if it helped. Thanks!

Add a comment
Know the answer?
Add Answer to:
int main () {             int gamma;             int delta;             gamma = 5; &nb
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT