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...

can we declare a function inside the structure?
ex: struct book
{
int pages;
float price;
int library(int,float);
}b;
is the above declaration correct? as it has function
declaration?

Answer Posted / srinivasroyal

In CPP the above declaration is correct. But in case of C it
is not.

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is 02d in c?

1027


Explain the use of keyword 'register' with respect to variables.

968


What is the purpose of sprintf?

1062


What header files do I need in order to define the standard library functions I use?

995


Explain the Difference between the New and Malloc keyword.

1077


What do you mean by keywords in c?

1079


Why ca not I do something like this?

970


When should you not use a type cast?

1069


Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays

2296


What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.

2201


What is bin sh c?

986


What is a struct c#?

998


Can you please explain the difference between exit() and _exit() function?

992


Is fortran still used in 2018?

985


how is the examination pattern?

1960