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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:22:29+00:00 2026-05-24T02:22:29+00:00

I like to know how to write a program which would export some API

  • 0

I like to know how to write a program which would export some API function.

For ex: Suppose I have few function, lets take add(int x,int y), mul(int x,int y) sub(int x, int y).

How can I write a daemon in c such that this will export above API to external world.

And how can I access these APIs from other program?

I am expecting from code point of view… Thanks in advance…

  • 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-24T02:22:29+00:00Added an answer on May 24, 2026 at 2:22 am

    It depends on what you mean by API.

    Creating a library

    Create a header file. This will be the "interface" of your API. Programs that want to use your library will have to include it in order to do so.

    libexample.h
    
    int add(int x,int y);
    int mul(int x,int y);
    int sub(int x, int y);
    

    Then you can go on and implement your library in your favorite system-specific way.

    Creating a program that services requests

    In this case, indeed you want a daemon and probably want to use RPC. Using this scheme, external programs can call your functions via the network.

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

Sidebar

Related Questions

I would like to write a program which can monitor activity of my keyboard.
i have to write program, which will create two child processes These processes would
I have two stacks(which follows LIFO). I would like to know if i can
in a C++ program I have graphs to which I'd like to add some
I would like to know when I should include external scripts or write them
I would like to know which dependency described in my pom.xml brings a transitive
I would like to write a program that reads all the unused clusters on
As far as I know, in gcc you can write something like: #define DBGPRINT(fmt...)
Does anyone know (like in tried and succeeded) if I can have D2009 both
I would like to know if I can open 2 different diagrams using MS

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.