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

Does there exist any other function which can be used to convert an integer or a float to a string?

0 Answers  


what is the difference between overloading & overriding? give example.

0 Answers  


Write about the stack unwinding?

0 Answers  


How many types of scopes are there in c++?

0 Answers  


what Is DCS ? what i will get benefit when i did?

0 Answers  


What will happen if when say delete this ?

7 Answers  


What is a constructor in c++ with example?

0 Answers  


when can we use virtual destructor?

7 Answers   HCL, HP, Virage Logic,


write a program that takes two numbers from user that prints the smallest number

2 Answers  


Describe friend function & its advantages.

0 Answers   TCS,


What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?

0 Answers  


How we can differentiate between a pre and post increment operators during overloading?

0 Answers  


Categories