nested funcion in c/c++

Recently in a interview i was asked if c/c++ supports nested functions & If "no" why. I searched the internet to get a very confusing picture. I wlll be highly obliged if you let me know if it supports or not & if no what is the reason.

regards
ulka

Comments

  • : Recently in a interview i was asked if c/c++ supports nested functions & If "no" why. I searched the internet to get a very confusing picture. I wlll be highly obliged if you let me know if it supports or not & if no what is the reason.
    :
    : regards
    : ulka
    :

    c and c++ do not support nested functions because the standards say so. But there is nothing wrong with nested function calls
  • [b][red]This message was edited by gautam at 2007-1-29 22:18:59[/red][/b][hr]
    : : Recently in a interview i was asked if c/c++ supports nested functions & If "no" why. I searched the internet to get a very confusing picture. I wlll be highly obliged if you let me know if it supports or not & if no what is the reason.
    : :
    : : regards
    : : ulka
    : :
    :
    : c and c++ do not support nested functions because the standards say so. But there is nothing wrong with nested function calls
    :

    Strict Ansi C does not support nested functions probably because the function would be only within the scope of the actual function.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories