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
Can math operations be performed on a void pointer?
Explain indirection?
Describe the order of precedence with regards to operators in C.
Do pointers need to be initialized?
What's the right way to use errno?
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?
write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays
Is there anything like an ifdef for typedefs?
Explain how can you avoid including a header more than once?
What is pointer to pointer in c with example?
How do we declare variables in c?
Describe the steps to insert data into a singly linked list.
What is d scanf?
What are structure members?
Mention four important string handling functions in c languages .