answersLogoWhite

0


Best Answer

True - A C++ constructor cannot return a value.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: True or False A C plus plus class constructor cannot return a function value?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Can you overload the constructor in java true or false?

Yes, you can have more than one constructor with a different set of parameters.


Is can every class has at least one constructor?

As many as you care to write.


True or false The return value for a JavaScript function must be a variable?

true The return value can be anything you'd like. For instance: return true; is entirely valid.


How do you display prime number in Microsoft visual studio 6.0?

Function is_prime(ByVal num As Integer) As Boolean If num < 0 Then num = num * -1 If num < 2 Then Return False If num Mod 2 = 0 Then Return num = 2 Dim max As Integer = Math.Sqrt(num) For div As Integer = 3 To max Step 2 If num Mod div = 0 Then Return False Next Return True End Function Sub Main() For num As Integer = 0 To 100 If is_prime(num) Then Console.Write(num) Console.WriteLine(" is prime") End If Next End Sub


Explain the concepts of constructor and destructor Do you have to declare a constructor every time you create a class?

we cover constructors and destructors for C++ objects. Constructors give a means to initializing newly created objects and can be overloaded. Destructors offer a way to perform clean up on an object just before it is destroyed; a class can have at most one destructor. Together constructors and destructors provide a method of encapsulating the lifespan of an object. Although we have not done anything useful with destructors so far, we will see that they are extremely useful as our programs get more complex.In mathematics, an ordered list numbers is called a sequence. Sequences come in many types, but we can model a generic sequence with a class. Sequences can be of any length, but we will put a limit of 100 terms on our sequences for this first example:The code above describes a sequence class with two constructors, a member function, and two data members. The first constructor is a default constructor, which creates a sequence with no terms in it. The second constructor takes an array of terms and a length; the terms are copied from the array to the sequence via a for-loop. The member function outputs the length of the sequence and then all of the terms-a check is made internally to assure that sequence has at least one term before outputting them. The data members are the length and an array of doubles to hold the terms.In this main function, we create two instances of our sequence object and call Print() to output the sequences to the console window.

Related questions

What category in Excel returns a true or false value?

Excel has a category called Logical Functions. The IF function is the one of those that most people use and associate with returning True or False values. Other functions also return True or False values. There is a TRUE function and a FALSE function. The OR function and the AND function can be used to return True or False values too. The NOT function can reverse a True or False value, so it also returns True or False.


What is the difference between return 0 and return -1 in c?

If we consider any function that is not the main function that is declared as "bool" i.e it will return boolean values to the main function-0 & 1, meaning 'false' and 'true' respectively. If we have to tell the main function that the condition checked in the function is false or disagreed, then we return 0 to the main function and when we have to tell that the condition checked in the main function is true or agreed, then we return 1 to the main function.


Can you overload the constructor in java true or false?

Yes, you can have more than one constructor with a different set of parameters.


How do you disable right click in HTML?

<SCRIPT LANGUAGE="JavaScript"> var message="Function Disabled!"; /////////////////////////////////// function clickIE() {if (document.all) {alert(message);return false;}} function clickNS(e) {if (document.layers(document.getElementById&&!document.all)) { if (e.which==2e.which==3) {alert(message);return false; if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;} else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;} document.oncontextmenu=new Function("return false") // --> </script>


What does the NOT function in Excel do?

The NOT function is a logical function used to reverse the result of a logical statement or check if something is false. If you wanted to identify a value that were different in two cells you could use the NOT function to check if they are not equal, like this: =NOT(A2=B2) If they are the same it will return TRUE and if they are the same it will return FALSE.


You can replace any letter in function notation with any number?

No you cannot the answer is False


Is can every class has at least one constructor?

As many as you care to write.


True or false The return value for a JavaScript function must be a variable?

true The return value can be anything you'd like. For instance: return true; is entirely valid.


Write a program in vb to check whether a no is prime or not?

Function isPrime(ByVal n As Integer) As Boolean If n < 2 Then Return False End If Dim sqrtn As Integer = Math.Sqrt(n) + 1 For i As Integer = 2 To sqrtn If (n Mod i) = 0 Then Return False End If Next Return True End Function


Is it true or false that the cosine function is an odd function?

False; the cosine function is an even function as cos(-x) = -cos(x).


Is The subunits of a cell function independently?

no they do not


True or False. The speed she was going is a function of the amount of the ticket?

False