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 3997308
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:23:09+00:00 2026-05-20T07:23:09+00:00

I am not familiar to Eclipse IDE. I want to know how can O

  • 0

I am not familiar to Eclipse IDE. I want to know how can O call various functions from a single source file that contains a main() function.

For Example

Project name – TestProject
Source File name – EntryPoint.c

Now I want to make various method like add(), Sub(), mul() etc.

Please tell me these method should be in another source file or a file.

  • 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-20T07:23:10+00:00Added an answer on May 20, 2026 at 7:23 am

    If you want to call a function that is defined in another source file, you still need to declare the function in the source file you are calling it from. This is commonly done through the use of header files which are included at the top of each source file that refers to the function.

    Here is an example.

    methods.c

    #include "header.h"
    
    int add(int a, int b){
        return a+b;
    }
    int sub(int a, int b){
        return a-b;
    }
    int mult(int a, int b){
        return a*b;
    }
    

    EntryPoint.c

    #include "header.h"
    
    int main(){
        return sub(add(2, 3), mult(2,5));
    }
    

    header.h

    #ifndef _HEADER_H
    #define _HEADER_H
    
    int add(int, int);
    int sub(int, int);
    int mult(int, int);
    
    #endif
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not familiar on how forms work. Example Scenario Lets say users can create
I am not familiar with android programming, I wish to know if there is
I'm not familiar with C. How can I pass a C array to a
I am not familiar with regular expression. For a string, I want to replace
I'm using a new set of Java tools that I'm not entirely familiar with,
As you know, during using eclipse, we can try to chang the VM arguments
I'm writing an android apps in Java of Eclipse. I'm not very familiar with
Not familiar with c++, can someone help me add cmd to the myStr array
Eclipse Indigo has a Dynamic Web Project wizard(File->New ->Other->Web->Dynamic Web Project) I am not
I'm not familiar with where I can get the package com.sun.net.httpserver? I like to

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.