Impact of void on prototype

This is a discussion on Impact of void on prototype within the C Programming forums, part of the General Programming Boards category; hi, what is the difference between these? Code: int abc() { ... } int abc(void) { ... } what is ...

  1. #1
    Registered User
    Join Date
    Jul 2006
    Posts
    25

    Impact of void on prototype

    hi, what is the difference between these?
    Code:
    int abc() {
    ...
    }
    
    int abc(void) {
    ...
    }
    what is the impact of void there?

    thank you in advance

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,821
    Try calling both of them with

    abc(123);

    Oh, and the answer is different in C++, just in case you don't know which language you're programming in.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,175
    If you understand what you're doing, you're not learning anything.

  4. #4
    Registered User
    Join Date
    Jul 2006
    Posts
    25
    sorry that i didn't look at it, ty for answers..

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. saying hello and 1st question
    By darksys in forum C Programming
    Replies: 12
    Last Post: 10-31-2008, 03:58 PM
  2. Interpreter.c
    By moussa in forum C Programming
    Replies: 4
    Last Post: 05-28-2008, 06:59 PM
  3. Pls repair my basketball program
    By death_messiah12 in forum C++ Programming
    Replies: 10
    Last Post: 12-11-2006, 05:15 AM
  4. msvc just ate one of my source files
    By Eber Kain in forum C++ Programming
    Replies: 6
    Last Post: 07-01-2004, 06:40 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21