CUET PG 2021 — Computer PYQ
CUET PG | Computer | 2021Which of the following is not a member of class?
Choose the correct answer:
- A.
static function
- B.
Friend function
(Correct Answer) - C.
const function
- D.
Virtual function
Friend function
Explanation
Solution
Iska sahi jawab aam taur par Friend Function hota hai.
Explanation
C++ jaise Object-Oriented Programming (OOP) mein, members wo hote hain jo class ke scope ke andar define kiye jate hain.
-
Member Functions/Variables: Yeh class ke andar hote hain aur inhe access karne ke liye
.(dot operator) ya->(arrow operator) ka use hota hai.Object.MemberVar=Value -
Friend Function: Ek friend function class ke bahar define kiya jata hai. Halanki iske paas class ke
privateaurprotecteddata ko access karne ki permission hoti hai, lekin technical taur par yeh Class ka member nahi hota.Friend Function∈/Class Members Set

