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
What are directives in c?
What are the advantages of c preprocessor?
Find MAXIMUM of three distinct integers using a single C statement
Is c language still used?
What is the difference between fread and fwrite function?
What does c value mean?
What is main () in c?
Explain the properties of union. What is the size of a union variable
Write a program to find the biggest number of three numbers in c?
Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon
Explain how do you override a defined macro?
What is use of integral promotions in c?
How can I recover the file name given an open stream or file descriptor?
What is a example of a variable?
why we wont use '&' sing in aceesing the string using scanf