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
seraphim [82]
3 years ago
5

What is the output of the following program? #include using namespace std; class TestClass { public: TestClass(int x) { cout &lt

;< x << endl; } TestClass() { cout << "Hello!" << endl; } }; int main() { TestClass* test; return 0; }
Computers and Technology
1 answer:
Alik [6]3 years ago
4 0

Answer:

An error will be occurred here. In C++ a function must be like

returntype function_name(){

}

but the functions in given class does not have returntype given. So there will be a syntax error.

If the returntype is defined then the code does not show any output since nothing is printed in the main function.

You might be interested in
A yellow inspection tag on a scaffold means the scaffold has been inspected and
kodGreya [7K]

Answer:CAUTION

Explanation: on edg

7 0
2 years ago
Consider the following line of code: if (x &lt; 12 || (r – 3 &gt; 12)) Write three valid mutants of this ground string (based on
Nata [24]

Answer:

See explaination

Explanation:

Mutation Testing:

Mutation Testing is a type of software testing where we mutate (change) certain statements in the source code and check if the test cases are able to find the errors. It is a type of White Box Testing which is mainly used for Unit Testing. The changes in the mutant program are kept extremely small, so it does not affect the overall objective of the program.

We say a mutant is valid if it is syntactically correct. We say a mutant is useful if, in addition to being valid, its behavior differs from the behavior of the original program for no more than a small subset of program test cases.

VALID MUTANTS

1. if (x < 12 && (r – 3 > 12)) LOR

2. if (x < 12 || (r – 3 < 12)) ROR

3. if (x < 12 || (x – 3 < 12)) IVR

INVALID MUTANTS

1. if (x < 12 ||(r – 3 > 12) UPR

2. if (x < 12 (r – 3 < 12)) MLO

3. (x < 12 || (x – 3 < 12)) CSM

Note:

LOR: LOGICAL OPERATOR REPLACEMENT

ROR: RELATIONAL OPERATOR REPLACEMENT

IVR: INVALID VARIABLE REPLACEMENT

UPR: UNBALENCED PARANTHISIS REPLACEMENT

MLO: MISSING LOGICAL OPERATOR REPLACEMENT

CSM: CONTROL OPERATOR MISSING REPLACEMEN

4 0
3 years ago
What is web based<br> What is local <br> What is mobile in computer
Radda [10]

Answer:

The mobile web refers to browser-based World Wide Web services accessed from handheld mobile devices, such as smartphones or feature phones, or a device. hope this helps :)

Explanation:

6 0
3 years ago
Describe two benefits of the community of replacing the printed copy with an online version.
DiKsa [7]

Answer:

less costs

Explanation:

saves more money

easy to use for everyone

6 0
3 years ago
Write a program that uses two input statements to get two words as input. Then, print the words on one line separated by a space
nikitadnepr [17]

Answer:

Following is the C++ code for the question given :-

#include <iostream>

#include<string>

using namespace std;

int main() {

   string s1,s2;//two strings to store the words.

   cin>>s1;//Input statement.

   cin>>s2;//Input statement.

   cout<<s1<<" "<<s2<<endl;//printing both words in one line separated by space.

return 0;

}

Input:-

make

choices

Output:-

make choices

Explanation:

I have taken two strings two store two words.After taking the input I have printed both the strings which contains the words entered by the user separated by space.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Describe FIVE significant advantages of web-based applications for an organisation.
    7·1 answer
  • 2. Write a program that calls creates an ArrayList of integer and calls the method minToFront described below. Print out the lis
    12·1 answer
  • What type of information is kept on a database?
    10·1 answer
  • Which type of computer are todays most widely used personal computers?
    8·2 answers
  • On "assignments" what does XMPT mean?
    9·1 answer
  • Select the correct answer.
    9·2 answers
  • 1.
    13·1 answer
  • A computer _________________ is a text file that a computer can understand
    12·1 answer
  • A cookie is stored on your device's memory or disk in what file format? 1.)video file
    15·1 answer
  • What are the two compatibility issues that may arise between computer systems while transferring presentations? different video
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!