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 are c++ variables?

0 Answers  


Can a program run without main in c++?

0 Answers  


What is the limitation of cin while taking input for character array?

0 Answers  


Why Pointers are not used in C++?

0 Answers   Global Logic,


How do you add an element to a set in c++?

0 Answers  


Why isn't sizeof for a struct equal to the sum of sizeof of each member?

0 Answers  


What is c++ hash?

0 Answers  


What is a pointer how and when is it used?

0 Answers  


What do you mean by global variables?

0 Answers  


What is virtual base class?

0 Answers  


what are the iterator and generic algorithms.

0 Answers  


How many types of casting are there in C++? When is a dynamic cast,static_cast,reinterpret cast used?

2 Answers   CTS,


Categories