Question:
I am confused about how programming language really works, and what it's for?
Kyll
2011-04-17 14:40:03 UTC
I really want to learn how to start programming, except I am a complete 'level zero' at it. I am going to start a class on C programming next week, however I wanted to know more about what exactly is programming, what do I do when I start writing the codes, like what is happening? lol I know I sound a bit confusing but hopefully you will share some clarity.

(Also, once I learn the language and write stuff on the compiler, what exactly am I going to be writing - like what is the code for...)
Three answers:
Light Cloud
2011-04-17 14:52:31 UTC
Programming is basically giving the computer a set of instructions to follow. On the highest level, a program takes in input, and returns output. For instance, a program that calculates letter grades may take in a numeric number (0-100) as input, and return a letter grade as output ('A' if 90-100, 'B' if 80-89, 'C' if 70-79, etc).



People write in source code (in languages such as C, Java, Python, etc). Compilers translate the source code into machine code, which are then executed by the computer.



The traditional first program is the "hello world" program, which just prints out the words "hello world" to the screen.



int main() {

printf("Hello world");

}
2011-04-18 05:01:35 UTC
Well, not to confuseing, What is happening is you are write instruction, or commands, in a language that the computer can interpret, and use to do a task or various tasks,..the application, I can't say much for C ,but it is all the same principle, on can do a certain amount of prgramming with simple badtch files, ...so for example, useing qbasic,

you write:



PRINT "hello world"

then, you run it, and it wil display the text "hello world" on the screen, if you make a executable, you then have a excutable file, it could have any name, but lets say you name it helloworld, you would then have a file, in a folder called helloworld.exe , so if you click it , it runs, displays the text.

or at the comand prompt when you type hellowworld, and hit enter,...

Ok so thats nothing, just printing hello world, but that s where most start, ..then you start learning more commands, and lines,...so as to be able to build a chain of events, and results, which are your program,...so you could write a pro.gram that, starts playing some music, asks for your name, and to login, maybe even a password,..then perhaps a menu, a game, a editor, math problems, pretty much what ever you can imagen. It is pretty neat, ...and unlimited as to what you can do once you learn enough,...don't worry, everyone started out at level 0, at one time....

good luck and enjoy yourself.

Note, my sources are not intended to promote anything, When I started a year ago, or less, I also was at level zero,...and still have a long ways to go, these sources, sre just to demonstrate the stages I am going thru as I learn, the same would apply,if you study C, C+, python,java or any of the many languages in porgramming, it is a very fascinating,exciteing world, and creative,career, or hobbie (in my case hobbie)
LAL
2011-04-17 21:44:32 UTC
You write applications. The applications can be anything you want. Games, software, etc.


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