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
(PYTHON HOMEWORK)Given the following code snippet, which statement tests to see if all three sets are equal?:
wariber [46]

Answer:

Option D is the correct answer to the following question.

Explanation:

The following option is correct because three sets type variable i.e., "fruit", "fruit2", "fruit3" has contain the same values in it and then they ask for the option is correct if the all are equal and in the option c, there is the if statement in which check the condition if the variable "fruit" is equal to the variable "fruit2" and the variable "fruit" is equal to the variable "fruit3".

so, that' why the following option is correct.

The option A is not correct because there is no equal function in python and we use the operator == to check the condition.

The option B is incorrect because we can see that there is not equal to (!=) operator.

The option D is incorrect because we can see that there is an or operator are used which means if any of the conditions is true then, they return either the other condition is false.

8 0
4 years ago
Which actions changed the look of the following word?
jarptica [38.1K]

Answer:

D

Explanation:

The actions applied to change the look of the word are:

1. It was set to italics. This can be done easily by highlighting the word => press Ctrl + I together on the keyboard.

2. Next is to set to underline. While still highlighted => press Ctrl + U together in the keyboard.

6 0
3 years ago
Read 2 more answers
Which language would you use to create scripts that send data to a web server?
bonufazy [111]

Which language would you use to create scripts that send data to a web server?

A. HTML

<u>B. ASP</u>

C. SGML

D. CSS

5 0
4 years ago
Read 2 more answers
Write a program in C which will open a text file named Story.txt. You can create the file using any text editor like notepad etc
ddd [48]

Answer:

See explaination

Explanation:

#include <stdio.h>

#include <stdlib.h>

int main()

{

FILE * file_object;

char file_name[100];

char ch;

int characters=0, words=0;

printf("Enter source file name: ");

scanf("%s", file_name); //asking user to enter the file name

file_object = fopen(file_name, "r"); //open file in read mode

if (file_object == NULL)

{

printf("\nUnable to open file.file not exist\n"); //check if the file is present or not

}

while ((ch = fgetc(file_object)) != EOF) //read each character till the end of the file

{

if (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\0') //if character is space or tab or new line or null character increment word count

words++;

else

characters++; //else increment character count this assures that there is no spaces count

}

printf("The file story.txt has the following Statistics:\n"); //finally print the final statistics

if (characters > 0)

{

printf("Words: %d\n", words+1); //for last word purpose just increment the count of words

printf("Characters (no spaces): %d\n", characters);

}

fclose(file_object); //close the file object

return 0;

}

6 0
4 years ago
During the software planning process, Rick, a project manager, finds that his team has made an incorrect estimation of funds. Wh
allochka39001 [22]

Answer:

Rick has identified a cost risk.

Explanation:

Risk is the probability of loss in a given setting. Herein, the risk involved is the inadequate assessment of the costs involved to carry out the project usually as a result of poor pricing evaluation of resources required for the project. At the early stage of every project, effective and efficient cost estimation is needed because it provides a basis for estimation of the total costs, it helps distribute the cost budget, it eases decision making and thereby assuring a level of profitability, everything being equal.

7 0
3 years ago
Read 2 more answers
Other questions:
  • Brock wants to use several images on his hiking blog. However, the images are making his pages load very slowly. Explain to Broc
    6·1 answer
  • How many water bottles must be collected to win?
    8·2 answers
  • Which operating system is used by most desktop and laptop computers?
    5·1 answer
  • What is the khan academy game where it is a block having to jump over lava and is an endless runner
    9·1 answer
  • Before a story can be published, it goes to ralph. ralph reads the story and may make changes based on spelling or the rules of
    12·2 answers
  • The popularity of blogging is an example of _____. the public producing the media the public regulating the media both of the ab
    15·2 answers
  • What are some effective methods for scrolling? Check all that apply.
    6·1 answer
  • Indicates the beginning and ending of your code written in HTML
    12·1 answer
  • Assume the following:
    10·1 answer
  • The ability to use various design software such as Adobe Photoshop, InDesign, and Illustrator would be MOST beneficial to which
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!