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

Can math operations be performed on a void pointer?

1041


Explain indirection?

1124


Describe the order of precedence with regards to operators in C.

1047


Do pointers need to be initialized?

1072


What's the right way to use errno?

1135


A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?

2312


write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays

2240


Is there anything like an ifdef for typedefs?

1147


Explain how can you avoid including a header more than once?

1089


What is pointer to pointer in c with example?

1061


How do we declare variables in c?

1057


Describe the steps to insert data into a singly linked list.

1067


What is d scanf?

1079


What are structure members?

1090


Mention four important string handling functions in c languages .

1098