hey guys i m a free lancer in web designing n i 've a ques. Can smbdy chk out my code:
#inlcude<iostream> #inlcude<string> #inlcude<ctype> #inlcude<stdlib> #inlcude<stdio> using namespace std; class account{ private: char name_private; int age_private; int rollno_private; public: void func(char name_pub[], int age_pub, int rollno_pub){ name_private = name_pub; age_private = age_pub; rollno_private = rollno_pub; } int getName(){ return(name_private); } int getAge(){ return(age_private); } int getRollno(){ return(rollno_private); } }; void main(){ char name[] = "Harsh"; int age = 16; int rollno = 7; account obj; obj.func(name, age, rollno); cout<<"Name is: "<<getName(); cout<<"Age is: "<<getAge(); cout<<"Rollno is: "<<getRollno(); } //will it output:: Harsh 16 7