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
Which header file is essential for using strcmp function?
What is queue in c?
What is getche() function?
How many levels of pointers can you have?
What does the error 'Null Pointer Assignment' mean and what causes this error?
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
Explain what is #line used for?
Explain what is meant by high-order and low-order bytes?
How can you find the day of the week given the date?
printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions
What is memcpy() function?
Do you know the difference between exit() and _exit() function in c?
how do you execute a c program in unix.
What are the types of data structures in c?
Explain how does flowchart help in writing a program?