Question:
How to write C code.........?
1970-01-01 00:00:00 UTC
How to write C code.........?
Six answers:
??????
2012-09-01 16:18:00 UTC
You can write C code in a text editor as you wish without compiling it.

This is not recommendable but can be done.

It is like writing a book without publishing it.

As long as you do not compile your code, you will have no executable program and so no game or other useful program.

The difference with writing a book is, that you can finish your story completely without publishing it, while in programming this is not the case : a long program listing without being tested ever, will contain HUNDREDS of faults, no matter how good you are.

So the way of working you suggest is not recommendable, but it is not impossible.

If you still want to do it that way, you must pay attention to :

- type errors

- syntactic errors, therefore you need to know your programming language very well

- wrong reasoning faults : faults in your pseudo-code yield faults in your final code because the algorithms are incorrect; you can only prevent these by thinking very thoroughly before writing and by experience and to gain experience you need to compile

Annoying faults are often :

- forgetting to initialise variables : hard to detect and debug cause the program shows undetermined behaviour cause an uninitialised variable gets a kind of random value on startup

- memory leaks : your program crashes because of these

So you could think about your project and write your book, why not ? It is good to have a plan and it is the first step of becoming a good programmer. The first program i wrote, i designed it completely on paper, cause i had no computer. Then i gave it to a friend of mine to type it in his computer and of course he got nothing but errors, but it was a beginning !
MarkF120
2012-09-01 15:44:42 UTC
You need a compiler to translate your code into ones and zeros the computer understands man, here is a quick guide on getting started with C



http://thenewboston.org/list.php?cat=14



Here is a Harvard Course taught in C

http://cs50.tv/2011/fall/



This is like theNewBoston explanations, but it has more info

http://cplusplustutor.com/tutorials.php



Learn C before you learn any other languages, and forget silly things like computer games(are you a creator or a L-user?), most of the world is written in C, cars, microwaves, aircraft controls, space shuttle systems, mars rover, and yes...computer games(basically anything with a micro processor is probably programmed in C), though C++ is used more for computer games(top quality computer games). Stick to C until you have at least gone through all of the above links and read a book, book I suggest 'K&R' and 'Let us C', Google/YouTube 'how to' is your friend.



EDIT



Testing grounds, when you think you know C, write programs in C to solve some of these problems:

http://projecteuler.net/problems



Master C and you can do anything, most other languages are derived from C so other languages will be easy or easier to learn if you first master C.
?
2016-07-27 11:22:28 UTC
I will assum that you have a terminal window, or you are sitting in entrance of a linux computer. Upon getting logged in you'll both be facing a terminal window or a desktop. If you happen to see a computing device have the ability to start a terminal. In the terminal you ought to use a text editor. For decades humans have argued which is better vi or emacs, however now there are others. In the terminal on the command line style "vi helloworld.Cpp" or "emacs helloworld.Cpp" or "xemacs helloworld.Cpp" or "vim helloworld.Cpp" or "gedit hellowrold.Cpp" or "nano helloworld.Cpp". All of those are illustration of text editor in unix. Gedit is like home windows notepad, and there are menus to save records. In vi and vim it isn't as apparent, it's the person who i take advantage of the most considering the fact that you don't have got to waste time touching your mouse. Whe vi starts you will see a clean reveal press i to be in interactive mode. Sort your code, and hist esc : w q this escapes you from interactive mode, after which writes and quite vi or vim. In xemacs and emacs you should use the mouse like notepad. In nano the instructions are on the bottome of the screen. I hope this helps.
2014-08-30 23:18:12 UTC
confusing stuff do a search in search engines like google that will will help
夢想家
2012-09-01 23:04:08 UTC
C is not only use for low-quality games but in any kind of programming possible.

A "compiler" is like the heart of programming, can you live w/o your heart? I don't think so.
?
2012-09-01 15:35:45 UTC
To write C, a compiler is vital, as it is needed to make the program executable. You just can't avoid a compiler. You could try code :: blocks, i'll include a link in the sources.

C is not only used for low-quality video games. It offers an excellent base for video games, as well as being used for standard everyday use software.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Continue reading on narkive:
Loading...