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

print first nodd numbers in descending order

7 Answers  


What are the extraction and insertion operators in c++? Explain with examples.

0 Answers  


How do I use arrays in c++?

0 Answers  


Is string data type in c++?

0 Answers  


What are different types of polymorphism supported by C++

2 Answers   CA, GameLoft,


Can a Structure contain a Pointer to itself?

0 Answers  


How does atoi function work?

0 Answers  


Why do we use classes in c++?

0 Answers  


How to change constant values?

6 Answers   Huawei, Symphony,


What is the difference between interpreters and compilers?

0 Answers  


How do you initialize a string in c++?

0 Answers  


Explain how we implement exception handling in c++?

0 Answers  


Categories