<---- template headericclude ----->
What do I need to program in C
FedoraForum.org - Fedora Support Forums and Community
Page 1 of 3 123 LastLast
Results 1 to 15 of 31
  1. #1
    Join Date
    May 2006
    Location
    Montgomery,Texas
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What do I need to program in C

    I am going to be very dangerous shortly (I hope). I just got a book on programming in C language. What do I
    need to install to use C ? I am not new to Linux but I havent done any programming since I started using Basic
    several years ago and I have forgotten all of that.

  2. #2
    Join Date
    Nov 2005
    Location
    Los Angeles area
    Posts
    887
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Make sure you have c compiler installed. As root type "yum install gcc".
    Then, as user, edit a file "hello.c" and type:
    #include <stdio.h>
    int main() {
    printf("hello, world\n");
    }

    Then at the command prompt, type
    bash$ gcc -o hello hello.c
    bash$ hello
    hello, world
    bash$

  3. #3
    Join Date
    May 2006
    Location
    Montgomery,Texas
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mwette
    Make sure you have c compiler installed. As root type "yum install gcc".
    Then, as user, edit a file "hello.c" and type:
    #include <stdio.h>
    int main() {
    printf("hello, world\n");
    }

    Then at the command prompt, type
    bash$ gcc -o hello hello.c
    bash$ hello
    hello, world
    bash$
    Thanks alot for the prompt reply. Worked like a champ.
    Registered Linux User # 418170
    If there is not enough food in the fridge, do you say
    "The store must be down"?
    Greg Elin, at a conference

  4. #4
    daihard Guest
    Allow me to be nit-picky...

    int main() {
    printf("hello, world\n");
    return 0;
    }


  5. #5
    compwizzer Guest
    Congrats on wanting to learning C. As you get the hang of it you'll see what an asset it is just to be familiar with. I started with basic(gwbasic) too. Then moved to Visual Basic (yea I know shame on me). Eventually I learned C, then then C++, then PHP and now I'm curious about Python. Understanding C can make it easier to learn a lot of other languages, I think anyways.

    Just start small, like with Hello World. Then gradually add to your knowlege with time. Your frustrations will teach you a lot about programming in general. Which will pay for itself by helping you understand why programs do what they do. ( and shouldn't do)
    Remember to keep a reference handy while you program and don't be ashamed to need it. Ever.

  6. #6
    Join Date
    Dec 2005
    Location
    EU
    Age
    46
    Posts
    637
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what about knowledge?

    a good tutorial?
    I think it is pretty good to start with C http://beej.us/guide/bgc/
    The software required «Windows 98 or better», so I installed Linux.

  7. #7
    Join Date
    Jan 2005
    Posts
    625
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice link. Fun to read. I might just give it a try.
    You can find out what book a person needs by asking the question, "Do you want to be a Muggle or a Wizard?"

    (1) If they answer "Wizard", then you give them RUTE.
    (2) If they answer "Muggle", then you give them "Linux for Dummies."
    (3) If they answer "What's a Muggle?", then you give them "Harry Potter".

  8. #8
    Join Date
    Dec 2005
    Location
    EU
    Age
    46
    Posts
    637
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I like the guide to Network Programming of him(http://beej.us/guide/bgnet/)...
    very recommenable!
    The software required «Windows 98 or better», so I installed Linux.

  9. #9
    Join Date
    Jun 2005
    Location
    Leeds
    Posts
    1,263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I like the guide to Network Programming of him(http://beej.us/guide/bgnet/)...

    Thats the one I used to get to grips with socket programming. Good tutorial but for me a copy of the gnu gcc manual was very helpfull along with this site http://www.advancedlinuxprogramming.com/.

    Never did find anything half decent on rpcgen and coding for that though.

    Ibbo
    A Hangover Lasts A Day, But Our Drunken Memories Last A Lifetime
    --
    Linux user #349545
    (GNU/Linux)iD8DBQBAzWjX+MZAIjBWXGURAmflAKCntuBbuKCWenpm XoA7LNydllVQOwCfdjyzXscddzQvlhBedAcD7qfKmHo==zx0H

  10. #10
    linux_au Guest
    Quote Originally Posted by dw5437
    I am going to be very dangerous shortly (I hope). I just got a book on programming in C language. What do I
    need to install to use C ? I am not new to Linux but I havent done any programming since I started using Basic
    several years ago and I have forgotten all of that.
    I assume your using Fedora 5, so I suggest using Pup (Applications->Add/Remove Software). Select Development and check Development Libraries, Development Tools, Gnome Software Development and if you've got any interest in java Java Development and Eclipse, maybe X software Development for some addtional libraries

  11. #11
    Join Date
    Jul 2005
    Location
    Vulcan
    Posts
    284
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For someone that only used VHDL and now want to learn a programming language should this person learn what first? C or C++?

    Tnx.
    P.S. Never take candy from strangers... money is ok, but not candy.

    FC 12 - 64 bits

    Dell Vostro 1710 | Intel Core 2 Duo T9500 @ 2.60GHz | DDR 2GB | nVidia GeForce 8600M GS 512MB | WLAN Broadcom BCM4328 802.11a/b/g/n | Realtek RTL8111/8168B PCI Express Gigabit Ethernet controller | Dell Wireless 360 Bluetooth | Seagate 5400rpm 160GB | Western Digital 5400rpm 320GB

    Maemo 5

    Nokia N900 | ARM Cortex A8 600 MHz | PowerVR SGX graphics | 32GB | Designed in Finland

  12. #12
    Join Date
    May 2006
    Location
    Montgomery,Texas
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the help and helpful links. I hope eventually to be able to do some serious programming in a
    couple of years. I kind of hope to jump from C to python but dont know if that is wise. My book says that
    C and C++ are practicaly the same.
    Registered Linux User # 418170
    If there is not enough food in the fridge, do you say
    "The store must be down"?
    Greg Elin, at a conference

  13. #13
    compwizzer Guest
    Trek1701, C++ may be easier to learn but I suggest learning both. It won't be too hard to do, in fact I picked up the basics of both languages in under a month.

    My tip for all those learning programing, is to always keep a reference handy - even profesional programmers don't code blindly.

    Also I'd like to share my point of view about how programing is really a form of art. You master the techniques of it and then apply them creatively, just like photographers or writers.

  14. #14
    Join Date
    Apr 2004
    Location
    MD
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Quote Originally Posted by compwizzer
    Also I'd like to share my point of view about how programing is really a form of art. You master the techniques of it and then apply them creatively, just like photographers or writers.
    well said!
    Fedora Core 8

    Dell Dimension E520
    2.13 GHz Core 2 Duo / 2 GB RAM
    128 MB nVidia GeForce 7300LE

    Dell Inspiron 600m
    1.5 GHz Pentium M / 1.25 GB RAM
    64 MB ATI Mobility Radeon
    Intel® PRO/Wireless 2100

    www.csfalcon.com

  15. #15
    Join Date
    Dec 2005
    Location
    North Carolina
    Age
    34
    Posts
    1,162
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Trek1701
    For someone that only used VHDL and now want to learn a programming language should this person learn what first? C or C++?

    Tnx.
    I have found C to be easier for instance a hello world program in C looks like this:
    Code:
    #include <stdio.h>
    main()
    {
    printf("Hello World!\n");
    }
    Where as a C++ version is more like this:
    Code:
    #include <iostream>
    int main()
    {
    using namespace std;
    cout << "Hello World" << endl;
    return 0;
    }
    C++ is harder to mess up in as far as I know. But when I have messed up I have found I need to restructure the whole program again in some of the worst cases. In C I didn't end up doing that. Also C is more used for nix programming than C++ from what I've noticed so you may want to learn C.
    Laptop: Lenovo ThinkPad T410, CPU: Intel Core i5 520M, Ram: 8GB DDR3, Hard Drive: 320GB, Graphics: Intel HD, OS: Windows 7 / Arch Linux x86_64
    Desktop: Motherboard: ASRock Fatal1ty AB350 Gaming K4, CPU: AMD Ryzen 3 1200, RAM: 8GB DDR4, Storage: Samsung 850 Pro 256GB, Graphics: Asus Radeon RX 550 4GB, OS: Arch Linux x86_64

Page 1 of 3 123 LastLast

Similar Threads

  1. Looking for an IVR Program
    By sarpkaya in forum Using Fedora
    Replies: 1
    Last Post: 13th August 2008, 03:24 PM
  2. Replies: 0
    Last Post: 29th June 2008, 01:53 AM
  3. Reading output from program, called inside another program
    By clearer in forum Programming & Packaging
    Replies: 2
    Last Post: 20th February 2008, 09:52 AM
  4. how to run a program when log in?
    By myname74119 in forum Using Fedora
    Replies: 5
    Last Post: 4th February 2007, 11:17 AM
  5. how to use shell program parameters in java program??
    By srujanabobba in forum Using Fedora
    Replies: 1
    Last Post: 10th August 2006, 07:24 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]