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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Out of fgets() and gets() which function is safe to use?

1126


What does std mean in c++?

1120


What is polymorphism and its type in c++?

1069


why is iostream::eof inside a loop condition considered wrong?

1053


What is the difference between global variables and local variable

1058


What is the full form of c++?

1344


Can you overload the operator+ for short integers?

1043


Distinguish between a # include and #define.

1148


Can notepad ++ run c++?

1079


What is a catch statement?

1045


What is a constructor in c++ with example?

1130


How do you declare a set in c++?

949


How does work in c++?

1075


Should a constructor be public or private?

1030


Explain object slicing in c++?

1058