overloading in C

Discussion in 'C Programming' started by uday, Nov 25, 2004.

  1. uday

    uday Guest

    Does C supports overloading. I am thinking no. But some people are
    saying yes. If yes how. Please answer with examples.

    Also in c++ size of empty class is one. why. and what are the
    default methods created in a class. These questions are asked in
    interviews. so please explain.
    uday, Nov 25, 2004
    #1
    1. Advertising

  2. "uday" <> writes:
    > Does C supports overloading. I am thinking no. But some people are
    > saying yes. If yes how. Please answer with examples.


    You posted your article 3 times; once would have been enough.

    No, C doesn't support overloading. (C99 adds type-generic macros in
    <tgmath.h>, but overloading of user-defined functions isn't
    supported.)

    > Also in c++ size of empty class is one. why. and what are the
    > default methods created in a class. These questions are asked in
    > interviews. so please explain.


    We can't answer questions about C++ here.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
    Keith Thompson, Nov 25, 2004
    #2
    1. Advertising

  3. On 24 Nov 2004 18:33:57 -0800, in comp.lang.c , "uday"
    <> wrote:

    >Does C supports overloading. I am thinking no.


    no.

    >But some people are saying yes.


    They're wrong.

    >Also in c++ size of empty class is one. why. and what are the
    >default methods created in a class. These questions are asked in
    >interviews. so please explain.


    Wrong room. C++ is down the hall.



    --
    Mark McIntyre
    CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
    CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>
    Mark McIntyre, Nov 25, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Iyer, Prasad C

    Overloading __init__ & Function overloading

    Iyer, Prasad C, Sep 30, 2005, in forum: Python
    Replies:
    3
    Views:
    6,410
    Fredrik Lundh
    Sep 30, 2005
  2. Fredrik Lundh
    Replies:
    0
    Views:
    449
    Fredrik Lundh
    Sep 30, 2005
  3. Steve Holden
    Replies:
    0
    Views:
    430
    Steve Holden
    Sep 30, 2005
  4. Iyer, Prasad C
    Replies:
    4
    Views:
    577
    John J. Lee
    Sep 30, 2005
  5. Fredrik Lundh
    Replies:
    0
    Views:
    398
    Fredrik Lundh
    Sep 30, 2005
Loading...

Share This Page