Question

Fix the code to print the result[] array properly:

1 #include <iostream> 2 3 using namespace std; 4 5 void printArray(int array 7 for(inti= 0: i < 2;i++) cout くく array[i] <<

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:

At line no:27 no need of brackets in the above code.

in the below code line no:19

i gave input value of x is 1.

firstArray[2] is assigned to{10,20}

then secondArray[0] is assigned to 1.

and secondArray[1] assigned to x+15 means 1+15, that is 16.

this is the program and result was printed.

Executing) - Dev-C+5.11 File Edit Search View Project Execute Tools AStyle WindowHelp 鳳鳳 日,8. TDM-GCC 4.9.2 4-bit rofiling (g

CAUsersanushDocuments) may20.exe 11 36 Process exited after 2.582 seconds with return value θ Press any key to continue .. R

Thank you...

Add a comment
Know the answer?
Add Answer to:
Fix the code to print the result[] array properly: 1 #include <iostream> 2 3 using namespace...
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