Menu

how do i write and compile a c program?

2007-09-23
2012-11-13
  • Nobody/Anonymous

    is this possible to write this program with notepad++, and how?

    #include <stdio.h>
    main()
    {
    printf("hello world\n");
    }

     
    • Nobody/Anonymous

      It's possible (and perhaps a good idea) to write your source code in Notepad++.

      However, to actually compile the program into an executable (a working binary, for example "file.exe") you will need a compiler.
      That source code is C so I suggest you use a C/C++ compiler; my personal preference being Dev-C++ (also free :) ).

      http://www.bloodshed.net/devcpp.html
      (just ask google if this fails you)

      I really only know a little C++ myself. If you have trouble with that code you could also try

      #include <iostream>
      using namespace std;
      int main() {
      cout<<"Hello, Scotland!"<<endl;
      cin.get();
      return 0;
      }

       
MongoDB Logo MongoDB