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

  • SEARCH
  • Home
  • 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 6022829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:54:54+00:00 2026-05-23T03:54:54+00:00

this type of declaration of function is valid in C but why not in

  • 0

this type of declaration of function is valid in C but why not in C++?

int sum(i,j)int i,j;
{
  return i+j;
}
  • 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-23T03:54:55+00:00Added an answer on May 23, 2026 at 3:54 am

    This is because that old-style function definition declares no prototype. That is, the caller would not know what parameter types the function expects.

    In C++, that’s too much of a type safety miss. In particular, the FDIS says

    Change: In C++, the syntax for function definition excludes the “old-style” C function. In C, “old-style” syntax is allowed, but deprecated as “obsolescent.”

    Rationale: Prototypes are essential to type safety.

    Effect on original feature: Deletion of semantically well-defined feature.

    Difficulty of converting: Syntactic transformation.

    How widely used: Common in old programs, but already known to be obsolescent.

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

Sidebar

Related Questions

I have faced the following interview question. Consider this function declaration: void quiz(int i)
Given a function/type declaration like this: function Person(name, ... other args ...){ this.name ...
I see variables defined with this type but I don't know where it comes
I have this type of code for prototypal inheritance in Javascript. function A() {
according to MSDN the typedef syntax is: typedef type-declaration synonym; Very easy: typedef int
My function declaration is siteObject(std::string& url, std::string& get, std::string& post); So why is this
I'm trying to generate a function declaration using a macro /* goal: generate int
This is well known code to compute array length in C: sizeof(array)/sizeof(type) But I
Here I have written my name in main argument declaration but still this program
Is this type of control only available in a 3rd-party library? Has someone implemented

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.