Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6141187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:12:56+00:00 2026-05-23T18:12:56+00:00

Recently I’ve been looking at the some of the C example code from the

  • 0

Recently I’ve been looking at the some of the C example code from the online resources of Steven Skiena’s “Algorithm Design Manual” and have been baffled by the syntax of some of his function calls. Admittedly it’s been a while since did C at uni but I’ve never encountered untyped function arguments like this:

find_path(start,end,parents)
int start;
int end;
int parents[];
{
    if ((start == end) || (end == -1))
        printf("\n%d",start);
    else {
        find_path(starts,parents[end],parents);
        printf(" %d",end);
    }
}

Is this valid syntax anymore? Are / were there any benefits with this style of function declaration? It seems more verbose than the conventional inline typing of arguments.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:12:57+00:00Added an answer on May 23, 2026 at 6:12 pm

    They are called K&R style definitions. Don’t use them in new code. Even K and R recommend that you stay away from them in “The C Programming Language 2ed”.

    A note of history: the biggest change between ANSI C and earlier
    versions is how functions are declared and defined.

    The parameters are named between the parentheses, and their types are
    declared before opening the left brace; undeclared parameters are
    taken as int.

    The new syntax of function prototypes makes it much easier for a
    compiler to detect errors in the number of arguments or their types.
    The old style of declaration and definition still works in ANSI C, at
    least for a transition period, but we strongly recommend that you use
    the new form when you have a compiler that supports it
    .

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

recently I'm writing some functions that I take from Haskell and translate into Java.
Recently I've been trying to debug some low-level work and I could not find
Recently I have been told that static class/methods are evil. Take for example my
Recently I found some simple source code of a bootloader.The following is the simple
Recently I've been maintaining a legacy project written in VC++ 6.0. The code uses
Recently, we discovered odd behavior in some old code. This code has worked for
Recently downloaded some code for a minor open-source project related to a small webgame
Recently I have been investigating the possibilities of caching in ASP.NET. I rolled my
Recently, I started changing some of our applications to support MS SQL Server as
Recently, I've been dealing with an error with accessing MAPI via the .NET framework

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.