Computer Hope

Software => Computer programming => Topic started by: jpotts on December 09, 2010, 06:57:10 AM

Title: How to start C programming?
Post by: jpotts on December 09, 2010, 06:57:10 AM
After using windows for to make batch files for a while, i decided to upgrade. I now have Ubuntu and am going to learn C programming. How do i start? do i need a program to write the scripts in, like eclipse for Java or what?
Thanks
Pottsie
Title: Re: How to start C programming?
Post by: Linux711 on December 09, 2010, 08:24:59 AM
Quote
How do i start?
Open the terminal and type gcc to see if the compiler is installed.
If so, you can proceed to write a program using a text editor and save it as program.c
Then you can use gcc to compile it from the terminal.
If not, you can install it from the package manager.

Quote
do i need a program to write the scripts in, like eclipse for Java or what?
I am not very familier with what is the best IDE.
Title: Re: How to start C programming?
Post by: BC_Programmer on December 09, 2010, 04:37:12 PM
kdevelop is a good IDE for C and C++, it supports other languages too I think.

sudo apt-get install kdevelop at a terminal to install; or use the package manager.
Title: Re: How to start C programming?
Post by: adrielsmith on December 18, 2010, 01:30:26 AM
For starting c programing you should know about the c language keywords, header files, data types. First of all you should start simple program like print hello.

#include < stdio.h>

void main()
{
    printf("\nHello World\n");
}
Title: Re: How to start C programming?
Post by: Geek-9pm on December 20, 2010, 11:31:54 AM
Programming in C is almost programming in assembly.
Learn C++. It is a 'middle' language.It nis much easier to get started.
Unless you are the academic type, I would not recommend spending much time learning C or other low-level-languages.
Have you studied any high-level languages?
If not, why not?
Most work being done today is top-down development.
Title: Re: How to start C programming?
Post by: BC_Programmer on December 20, 2010, 12:19:25 PM
Programming in C is almost programming in assembly.
Learn C++. It is a 'middle' language.It nis much easier to get started.

um... no it's not. C++ is a superset of C. Therefore by definition it will be harder to learn. It's sort of like saying "don't bother learning basic arithmetic, you should start with calculus"

Title: Re: How to start C programming?
Post by: Geek-9pm on December 20, 2010, 01:38:11 PM
um... no it's not. C++ is a superset of C. Therefore by definition it will be harder to learn. It's sort of like saying "don't bother learning basic arithmetic, you should start with calculus"
Yes, I failed arithmetic. And later I failed Algebra.
Set me back so I did not get to take calculus.
Should have skipped arithmetic.
Title: Re: How to start C programming?
Post by: Dr Jay on December 20, 2010, 07:16:40 PM
Actually, I would say that C and C++ are agreeably close in difficulty to learn. But, for beginners - C is essentially easier to dive in to than C++. As for experienced learners in the programming field, C++ should not be too aggressive. ;)

~DMJ (http://img833.imageshack.us/img833/6379/skinnyironsword.png)
Title: Re: How to start C programming?
Post by: 2x3i5x on December 22, 2010, 12:27:55 PM
If you are on windows, Microsoft Visual C++ Express Edition (http://www.microsoft.com/express/Downloads/#2010-Visual-CPP) is good compiler.


C++ includes the stuff you can do in C. Anyway, cplusplus.com (http://cplusplus.com/doc/tutorial/) has a great tutorial so you may want to start here!

Title: Re: How to start C programming?
Post by: Dr Jay on December 22, 2010, 08:47:21 PM
I agree. cplusplus.com is pretty good. I am on a couple of other sites that I learned on.
Title: Re: How to start C programming?
Post by: Geek-9pm on December 22, 2010, 08:51:36 PM
C++ includes the stuff ... cplusplus.com (http://cplusplus.com/doc/tutorial/) has a great tutorial so you may want to start here!
Way to go! Greet link! And it is FREE!
Title: Re: How to start C programming?
Post by: sugarfish on January 15, 2011, 08:29:24 AM
I'm new here but I wanted to give my 0.02 worth...

It's generally accepted wisdom that C and C++ are close enough that you may as well start with C++. The major difference is the object model and it's better to get started with objects sooner than later.

I like Geany for C/C++. It runs on Win and *Nix and it can run C/C++ directly (as long as you have a compiler available).
Title: Re: How to start C programming?
Post by: jhonas on January 20, 2011, 12:14:42 AM
I recommend w3schoos.com is also good !!
Title: Re: How to start C programming?
Post by: 2x3i5x on January 20, 2011, 12:55:55 AM
I recommend w3schoos.com is also good !!

you are recommending a non-functional website  ???