Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how is returning structurs from functions?Show an eg?



how is returning structurs from functions?Show an eg?..

Answer / ravi.g

struct student
{
int age;
float percntg;
};

struct student s1;

int a=25;
float p=88.99;
student assign(a,p)
{
student s2;
s2.age=a;
s2.percntg=p;
return s2;

}

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is a null object in c++?

0 Answers  


What are exceptions c++?

0 Answers  


What relational operators if statements in c++?

0 Answers  


How does class accomplish data hiding in c++?

0 Answers  


What is object slicing and how can we prevent it?

2 Answers   Tech Mahindra,


What is the benefit of learning c++?

0 Answers  


Mention the purpose of istream class?

0 Answers  


What is encapsulation in c++ with example?

0 Answers  


Will a catch statement catch a derived exception if it is looking for the base class?

0 Answers  


Explain the purpose of the keyword volatile.

0 Answers  


What is setbase c++?

0 Answers  


What is a protocol class?

1 Answers  


Categories