1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
vfiekz [6]
3 years ago
11

What is wrong with the following program? #include //Line 1 namespace aaa //Line 2 { const int X = 0; //Line 3 double y; //Line

4 } using namespace std; //Line 5 int main() //Line 6 { y = 34.50; //Line 7 cout << "X = " << X << ", y = " << y << endl; //Line 8 return 0; //Line 9 }
Computers and Technology
1 answer:
Nataly [62]3 years ago
3 0

Answer:

#include //Line 1

namespace aaa //Line 2

{ const int X = 0; //Line 3

double y; //Line 4

}

using namespace std; //Line 5

int main() //Line 6

{ y = 34.50; //Line 7

cout << "X = " << X << ", y = " << y << endl; //Line 8

return 0; //Line 9

}

In Line 1, No header file is present,so it will print output as cout and endl is not defined.

we should include <iostream> header file in line 1  

Lines 7 and 8 are incorrect.

X and y variables in aaa namespace are stated. So we can't use it any other namespace(std), but here y is initialized to 34.50 and x is printed in other namespace rather than stated.

You might be interested in
The Windows Net use command is a quick way to discover any shared resources on a computer or server. True or False
V125BC [204]
Yes it’s true the window net use command is a quick way to discover any shared resources on a computer or server
8 0
3 years ago
What is the difference between a computer’s RAM and its hard disk?
san4es73 [151]

Answer:

D. RAM is volatile, which means that it must be handheld with care when removed or replaced. A hard disk is not volatile, which means that it is much more resistant to movement during removal or replacement.

Explanation:

Most RAM (random access memory) used for primary storage in personal computers is volatile memory. Volatile memory contrasts with non-volatile memory, which does not lose content when power is lost. Non-volatile memory has a continuous source of power and does not need to have its memory content periodically refreshed.

8 0
2 years ago
Read 2 more answers
Which tab should you click if you want to access the Show All Comments option in a worksheet?
Lostsunrise [7]

Answer: Review

Because you want to review the comments

3 0
3 years ago
Read 2 more answers
ALRIGHT SO- There's this link that's been going around, it's like- "tinyclick" then a buncha letters, please don't click on it,
Katarina [22]

Answer:

okay thank you!

Explanation:

7 0
3 years ago
Read 2 more answers
Convert ⅖ pie radian to degree​
aniked [119]

Answer:

Convert to a decimal.

22.9183118°

Explanation:

7 0
3 years ago
Other questions:
  • A document repository is down when you attempt to access it. which isa principle is being violated?
    13·1 answer
  • Why should you avoid the use of sarcasm , cliches, and idioms in business letters?
    6·2 answers
  • Why hasn’t the World Health Organization declared a global health emergency?
    5·1 answer
  • What is the name given to the amount that a particular camera’s lens opens?
    12·1 answer
  • A bear is an animal and a zoo contains many animals, including bears. Three classes Animal, Bear, and Zoo are declared to repres
    12·1 answer
  • Computer is a major source of informarion why​
    8·1 answer
  • What are three advantages of using enterprise software in an organization?
    10·1 answer
  • What does the x mean in .docx
    6·1 answer
  • A computer lacks a division instruction and performs iteratively using the technique described on page 300. suppose we wish to e
    10·1 answer
  • What should you try first if your antivirus software does not detect and remove a virus?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!