[SOLVED] hello friends, i have just started learning c programing language in fedora 16
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hello friends, i have just started learning c programing language in fedora 16
hello friends,
i have just started learning c programing language in fedora 16 n i have installed c compiler. Now when i type the program in terminal n executing it.
it is showing some errors
n the same thing when m doin by writing the program in text editor n save it in .c format n then opening in it terminal. it is working properly.
In my college when v do c programing v dont hav to go to text editor v can do it directly in terminal. from writing the program to executing everything is done in terminal.
so please guide me what is wrong m doin or in fedora 16 v have to do in this way only.
There are several text editors that run in a terminal such as vi (vim if you want syntax highlighting) and emacs. Learning to use one of these effectively is not necessarily trivial but you'll usually end up working more quickly than in a gui based one.
hello frnz,
thanks for uor response on my question.
i m gettin a problem when i write a program in terminal
#include <stdio.h>
main()
> {
> printf("\nC you later\n");
after this it gives a error
bash: syntax error near unexpected token `"\nC you later\n"'
y it is so please help me out i m really gettin pissed off
n please tell any book in which they have given c programming in fedora or any linux from beginning which can help me out
thanks...i ll hope ll get reply very soon
Looks like you forgot a return 0; and a } (closing brace).
The best book, in my opinion, is the K&R, The C programming Language by Kernighan and Ritchie. I also liked C Primer Plus by Stephen Prata. There are lots of tutorials online and many free resources as well, just search a little.
You really should work harder at spelling out words in your posts, like friends instead of frnz.
Also use code tags when posting code, it makes it more readable.
hello friend,
thanks for telling me all these things
one more question i have and that is do we have to write all this program in text editor (i am using gedit)
and then compile and execute in c terminal or we can write the program in terminal and there only compile and execute
Quote:
Originally Posted by jkirchner
Looks like you forgot a return 0; and a } (closing brace).
The best book, in my opinion, is the K&R, The C programming Language by Kernighan and Ritchie. I also liked C Primer Plus by Stephen Prata. There are lots of tutorials online and many free resources as well, just search a little.
You really should work harder at spelling out words in your posts, like friends instead of frnz.
Also use code tags when posting code, it makes it more readable.
hello friend,
thanks for telling me all these things
one more question i have and that is do we have to write all this program in text editor (i am using gedit)
and then compile and execute in c terminal or we can write the program in terminal and there only compile and execute
If(!) I understand the qn, you do have to use and editor of some sort, you can't type direct onto the terminal cmd line; it won't understand.
You can either use a GUI editor like gedit, or you can use an editor on the cmd line eg vim.
In either case, you then compile & execute (if compile goes ok).
This http://rute.2038bug.com/index.html.gz is a good tutorial on Linux and also has a C programming section at Chap 22.
I suggest you read it closely.
thanks sir you are right that was my question thanks for your help i hope in future also you will be very helpful to me.
Quote:
Originally Posted by chrism01
If(!) I understand the qn, you do have to use and editor of some sort, you can't type direct onto the terminal cmd line; it won't understand.
You can either use a GUI editor like gedit, or you can use an editor on the cmd line eg vim.
In either case, you then compile & execute (if compile goes ok).
This http://rute.2038bug.com/index.html.gz is a good tutorial on Linux and also has a C programming section at Chap 22.
I suggest you read it closely.
In my college when v do c programing v dont hav to go to text editor v can do it directly in terminal. from writing the program to executing everything is done in terminal.
I guess you're talking about an IDE like Borland Turbo C++. If you're interested in an IDE , you can use "Code::Blocks" and download it from here.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.