Which operator can not be overloaded in C++?
The only C operators that can't be are . and ?: (and sizeof , which is technically an operator). C++ adds a few of its own operators, most of which can be overloaded except :: and . * .
Is This Answer Correct ? | 0 Yes | 0 No |
Write a program to calculate the BMI of a person using the formula BMI = weight/height2.
Explain the uses oof nested class?
class professor {}; class teacher : public virtual professor {}; class researcher : public virtual professor {}; class myprofessor : public teacher, public researcher {}; Referring to the sample code above, if an object of class "myprofessor" were created, how many instances of professor will it contain? a) 0 b) 1 c) 2 d) 3 e) 4
Does std endl flush?
What is virtual function? Explain with an example
Is it legal in c++ to overload operator++ so that it decrements a value in your class?
How would you implement a substr() function that extracts a sub string from a given string?
Which of the following is not a valid declaration for main() a) int main() b) int main(int argc, char *argv[]) c) They both work
Design a program to input a date from user in the form day/month/year (e.g. 2/6/2000) and report whether it’s a valid date or not. The program should take account of leap years. You will need to know that a leap year is a year that is exactly divisible by 4, except that century years are only leap years if they are divisible by 400.
What does new return if there is insufficient memory to make your new object?
Is java the same as c++?
simple c++ program for "abcde123ba" convert "ab321edcba" with out using string