Which of the following statements are correct for a static member function?
It can access only other static members of its class.
It can be called using the class name, instead of objects.
A.Only 1 is correct.
B.Only 2 is correct.
C.Both 1 and 2 are correct.
D.Both 1 and 2 are incorrect.
Answers
Answered by
9
ʜᴇʟʟᴏ ᴅᴇᴀʀ......ᴜʀ ᴀɴꜱᴡᴇʀ....
ᴄᴏʀʀᴇᴄᴛ...✔✔✔✔✔✔✔✔
ᴄ. ʙᴏᴛʜ 1 ᴀɴᴅ 2 ᴀʀᴇ ᴄᴏʀʀᴇᴄᴛ..
❤❤❤❤❤❤❤❤❤❤❤❤
ᴄᴏʀʀᴇᴄᴛ...✔✔✔✔✔✔✔✔
ᴄ. ʙᴏᴛʜ 1 ᴀɴᴅ 2 ᴀʀᴇ ᴄᴏʀʀᴇᴄᴛ..
❤❤❤❤❤❤❤❤❤❤❤❤
Answered by
0
The correct answer is option (c) Both 1 and 2 are correct.
- Static is the keyword in the C and C ++ editing language. We use a consistent keyword to describe a static data member or static member activity within and outside the classroom.
- When we define a class data member using a fixed keyword, the data members are called static data members.
- Stable data member is similar to static member activity because static data can only be accessed using static data member or static member function. Also, all class items share the same copy of the static member in order to access static data.
#SPJ3
Similar questions