What are the first basic steps to do this with FreeBSD?
As in any other unix[like] system:
1. write your source code with the texteditor of your choice (preinstalled on FreeBSD are
vi
, and
ee
; install other(s) you like.)
2. (in shell) compile the source e.g.
cc my_hello_world.c
3. correct it, if there were bugs

4. run your program e.g.
./a.out
The standard default command on any unix[like] system is always
cc
for "c compiler",
that's a link to the system's primary default c-compiler which in FreeBSD is
clang(1),
https://en.wikipedia.org/wiki/Clang ,
https://clang.llvm.org/
You may also use options after cc as you were use the compiler with its direct name:
cc my_hello_world.c -o hello
./hello
I'm imagining I need a folder setup to save to in advance?
You don't need any. You can save your C source files anywhere on the system where you have write permissions, and compile it either in the according directory, or tell cc the path to the file.
But it would make pretty much sense to stay in your own /home/ directory, and, yes, to create there directories not to mess up the place, but keep files in order not to lose surveillance.
If you're going to do some programming more than just a bit more as "hello world!", you are adviced best to think of a sophisticated directory tree (good names!), start to use some version control (most people use git, except me; but I wouldn't recommend any but to use one anyway), and, yes, as
ralphbsz already said, learn to use
make
But then we're already beyond what I would call "first steps"
And this would be a similar process for other programming as well?
Yes. (Well, not for shell scripts. You don't need to compile those, but simply run them.)
And you were best adviced to have own directories for each language. But of course that's completely up to you, how you organize your workplace, what's comfortable to your work style, and how you not lose surveillance over your stuff.
It's impossible to answer that question in general.
There are too many choices, possibilities, personal flavors, and work styles as there can be a satisfying answer given to that, but you need to find out for youself: what there is, what you need, what suits you. And this can be said for the whole system, not just programming.
There is
lots of stuff you can add. Like
nxjoseph already pointed out, there is not only the choice of the editor, and several plug-ins for each (emacs can be
really bloated), and other things like IDEs (I believe [I'm not a big fan of "jack-of-all-trades"-things, but prefer good old unix-style: small tools, specialized for each job, almost always in the shell. But others tell you otherwise. You have to figure out yourself what suits you best, or even develop your own work style, or change it to unix-like.])
My advice was:
Start small and simple (as I described above. You already can do
a lot with "basic vanilla", by principle already everything. Anything you add is to help
organize your stuff.)
Add what you need, and only what you really need.
Otherwise there is a real chance you may drown in the vast ocean of options, only configuring and learning your new tools, but not doing any programming anymore.
