Answer Posted / anh vu
A static function member can be used to provide utility
functions to a class. For example, with a class representing
calendar dates, a function that tells whether a given year
is a leap year might best be represented as a static
function (DateTime.IsLeapYear). The function is related to
the operation of the class but doesn't operate on particular
object instances (actual calendar dates) of the class.
| Is This Answer Correct ? | 15 Yes | 8 No |
Post New Answer View All Answers
What are the restrictions apply to constructors and destructors?
A prime number is a number which is divisible only by itself and 1. Examples of the first few primes are 2, 3, 5, 7, 11. Consider writing a program which can generate prime numbers for you. Your program should read in and set a maximum prime to generate and a minimum number to start with when looking for primes. This program should be able to perform the following tasks: 1. Read the maximum number from user (keyboard input) to look for primes. The program should not return any primes greater than this number. 2. Read the minimum number from user (keyboard input) to look for primes. The program should not return any primes less than this number. 3. Generate and print out every prime number between the maximum prime and minimum number specified by the user.
What is the difference between strcpy() and strncpy()?
Where must the declaration of a friend function appear?
When one must use recursion function? Mention what happens when recursion functions are declared inline?
What is static function? Explain with an example
What are move semantics?
What is public, protected, private in c++?
Why is c++ a mid-level programming language?
Does c++ have string data type?
We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?
What is the most powerful coding language?
What is a hash function c++?
Can I learn c++ without learning c?
Do you know the problem with overriding functions?