No. of arguments passed?

This is a discussion on No. of arguments passed? within the C Programming forums, part of the General Programming Boards category; How can a called function determine the number of arguments that have been passed to it?...

  1. #1
    Registered User
    Join Date
    Jun 2007
    Posts
    99

    No. of arguments passed?

    How can a called function determine the number of arguments that have been passed to it?

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    Via the va macros(), as your other topic is about, as you already said. Keep reading them until you've hit NULL.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,832
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. GradeInfo
    By kirksson in forum C Programming
    Replies: 23
    Last Post: 07-16-2008, 04:27 PM
  2. command line arguments
    By vurentjie in forum C Programming
    Replies: 3
    Last Post: 06-22-2008, 07:46 AM
  3. Replies: 10
    Last Post: 09-27-2005, 01:49 PM
  4. NULL arguments in a shell program
    By gregulator in forum C Programming
    Replies: 4
    Last Post: 04-15-2004, 11:48 AM
  5. arguments passed to main?!?
    By threahdead in forum C++ Programming
    Replies: 14
    Last Post: 01-22-2003, 08:43 PM

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