Hello All,
I am a fresher in c, i need to know about how to find out the size of a function defined & size of stack memory allocated for c compilers

An application stack size - see your compiler+linker and OS manuals. For example, Visual C++ linker default is 1M, but you can specify this value:
http://msdn.microsoft.com/en-us/library/tdkhxaks(VS.71).aspx
It's platform-dependent issue - see, for example:
http://www.cs.nyu.edu/exact/core/doc/stackOverflow.txt

Size of compiled code - as usually, you may ask your compiler (and/or linker) to produce module map.

You will scarcely obtain these values (especially function body size) in run time.
Don't get these questions firmly fixed in your head, they are absolutely unimportant on a fresher in C stage...

Don't get these questions firmly fixed in your head, they are absolutely unimportant on a fresher in C stage...

You're right about that -- there was a time 20 years ago when those two questions were very important for programmers because programs were limited to 640K of memory. But times changed and made the two questions nearly obsolete. They are however still relivent on a few obscure operating systems such as embedded systems where memory is very limited. But on a PC running either *nix, MS-Windows, or MAC you don't need to be concerned much about program size or stack size unless you want to write a really gigantic program.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.