Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 12 of 12

Thread: PHP problem

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11

    If you intent to call the C prog from a webpage, you'd be better off NOT having it take the arguments from STDIN - it would be better to pass them to the prog as command line arguments. Here's an example that takes (requires) two integers as arguments and outputs their sum:

    #include <stdio.h>
    int main(int argc, char *argv[]) {
      if (argc != 3) {
        printf("Usage: %s Int1 Int2\n",argv[0]);
      } else {
      return 0;

  2. #12
    thanks mate...i have done it and it is now working very well....i just have to add another header call stdlib.h and use atoi to convert string to integer...anyway thanks for all information.....really appreciate it...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts