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 |
What are c++ variables?
Can a program run without main in c++?
What is the limitation of cin while taking input for character array?
Why Pointers are not used in C++?
How do you add an element to a set in c++?
Why isn't sizeof for a struct equal to the sum of sizeof of each member?
What is c++ hash?
What is a pointer how and when is it used?
What do you mean by global variables?
What is virtual base class?
what are the iterator and generic algorithms.
How many types of casting are there in C++? When is a dynamic cast,static_cast,reinterpret cast used?