how to test my C skills

This is a discussion on how to test my C skills within the C Programming forums, part of the General Programming Boards category; im done with C(almost a yr) now i dunno how good im at C.. so ne1 tell me how to ...

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    13

    how to test my C skills

    im done with C(almost a yr)

    now i dunno how good im at C.. so ne1 tell me how to test my C skills(started with TURBOc[is it a compiler] still using it ..)
    whtas an IDE how it differs from compiler?(is TurboC an IDE or compiler?)

    studied object oriented approach also ... if im done with C what should be my next approach, C# java c++ VB VC++ ????

    i cant start next 1 till i dont know how much i know bout C...plz help

  2. #2
    Registered User
    Join Date
    Jan 2006
    Posts
    2

    Smile

    For gaining knowledge about 'c' or mastering the language .. the best thing to do is going through this three books


    1.C The Complete Reference
    by Herebert Schildt

    2.Let Us C
    by Yasawant Kanetkar

    3.Test your C skills
    by Yasawant Kanetkar

    there are also many books dedicated to Turbo c++ (Ide)

    check out the site www.bpbonline.com

    If you are throughly done with 'C' , then jump to 'C++',then to 'C#'
    keep avoiding --- Visual Basic (It is not a powerful language)

  3. #3
    Registered User
    Join Date
    Dec 2005
    Posts
    13
    done with book no. 1 and 2 ....


    3rd 1 havent come across ... btw thanx 4 the reply...

  4. #4
    Registered User
    Join Date
    Mar 2005
    Posts
    22
    Quote Originally Posted by =viki=
    im done with C(almost a yr)

    now i dunno how good im at C.. so ne1 tell me how to test my C skills(started with TURBOc[is it a compiler] still using it ..)
    whtas an IDE how it differs from compiler?(is TurboC an IDE or compiler?)

    studied object oriented approach also ... if im done with C what should be my next approach, C# java c++ VB VC++ ????

    i cant start next 1 till i dont know how much i know bout C...plz help
    Considering the information I can glean from this post and the other thread you've started today, I'd say that you are still very much a beginner.

    I hope you don't take it as an insult, it just seems that if you still can't do some very simple File I/O with the standard C library, then you haven't done much programming at all.

    Not knowing what a compiler/IDE is, and the differences between them also suggests a limited knowledge.

    Of course, the standard C library, the differences between compilers/IDEs etc. does not necessarily have any impact on your actual knowledge of the language, it just seems odd that you would be anything but a beginner without knowledge the above topics.

  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,497
    Well the first mistake was reading schildt.
    And the second was using TurboC as your reference compiler.

    I also agree with slcjoey's analysis of your other attempts.
    A year of C, and you can't use fgets() in a loop?

  6. #6
    Registered User
    Join Date
    Dec 2005
    Posts
    13
    Quote Originally Posted by Salem
    Well the first mistake was reading schildt.
    And the second was using TurboC as your reference compiler.

    I also agree with slcjoey's analysis of your other attempts.
    A year of C, and you can't use fgets() in a loop?

    damn man! i know how to use fgets()

    its just i cant get it right.. look

    Code:
    while(!feof(fp))
    {
        fgets(str,50,fp);
        printf("%s",str);
        strcpy(str,"");
    }
    this code will put each line of file read in a char array str with new line character. and then print the str in the console.
    FIle io is not my prob.. smtimes it becomes tricky to read a file in a way problem wants..

    i still didnt get my answer.... how to check my C skills?
    may be im a beginner

  7. #7
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,528
    Quote Originally Posted by =viki=
    damn man! i know how to use fgets()

    its just i cant get it right.. look

    Code:
    while(!feof(fp))
    {
        fgets(str,50,fp);
        printf("%s",str);
        strcpy(str,"");
    }
    Have a look at why its not a good thing to use feof to control a loop.

    And why this?:
    Code:
    strcpy(str,"");

  8. #8
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,497
    > damn man! i know how to use fgets()
    You don't know how to use it well.

    while ( fgets ( buff, sizeof buff, fp ) != NULL )
    Is much better for several reasons
    1. it doesn't suffer from the abuse of feof() like in your example. Have you ever noticed how your code would print the last line of the file twice?
    2. there is no expicit mention of the buffer size - you get the compiler to do it for you.
    3. the loop will exit if there is some other problem with the file, not just end of file.
    4. It actually pays attention to the return result of the function.

    > how to check my C skills?
    Well one way is to contribute answers to the questions other people ask, and see how well they stack up against other peoples answers. Being able to successfully explain something to someone else is a real test of understanding on your part.

    Quick quiz, you said printf("%s",str);
    Why would printf(str); be a bad idea?

    Or maybe try some problems here - http://acm.uva.es/problemset/

  9. #9
    Registered User
    Join Date
    Nov 2004
    Location
    India
    Posts
    515
    Echo what Salem Sir and Joey said. Also, one more piece of advice..try to avoid anything thats been written by Indian authors (Kanitkar(sp??)) and anything written by Schildt. Throw away TurboC and start using a gcc based compiler like DevC++ www.bloodshed.net
    One year of experience with C is hardly enough to master it if it is your first programming language. Anyways, all the best in whatever you do
    Code:
    >+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-] <.>+++++++++++[<++++++++>-]<-.--------.+++.------.--------.[-]>++++++++[<++++>- ]<+.[-]++++++++++.

  10. #10
    ex-DECcie
    Join Date
    Dec 2005
    Posts
    125
    Quote Originally Posted by =viki=
    im done with C(almost a yr)
    Not to be flip, but I've programmed with C almost 20 years now, and I still can't say "I'm done with C."

    I would echo what everyone else has said to this point.

    And remember this: if it doesn't run the way YOU want it to run, keep digging, keep exploring, keep fiddling with it until you get it to run the way you want it to.

  11. #11

    Join Date
    Jan 2006
    Posts
    28
    Wow, 20 years, that's nuts. I just started a month or two ago, heheh!

    Oh, and back on the subject...
    Even though I shouldn't be talking, I think you should make some of your best applications and let experts test them for errors, if they find a ton, you still have learning to do (don't take this the wrong way and think I'm a know-it-all, because I am nowhere NEAR as smart as you guys, but I have gotten compliments on my intelligentness), few errors, you just need to strengthen those areas, one or two errors, probably just a typo in the source. Hope this helps!

  12. #12
    Registered User
    Join Date
    Mar 2005
    Posts
    22
    Why would printf(str); be a bad idea?
    This code was perfectly fine up until 1999. heh.

    Of course, I guess code riddled with buffer overlows was perfectly fine until the Morris Internet Worm opened up everyones eye -- and yet still today we have the same problems.

  13. #13
    Registered User
    Join Date
    Dec 2005
    Posts
    13
    thanx for letting me know where i stand.
    btw found some good problems to solve at
    http://acm.uva.es/problemset/


    at this point advicing me soom good books on C will be very much appreciated. thanx a lots guys 4 helping me out

  14. #14
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    Quote Originally Posted by =viki=
    at this point advicing me soom good books on C will be very much appreciated.
    Until this develops, use these:[edit]Even some of the answers for K&R are fun:
    http://users.powernet.co.uk/eton/kandr2/
    Last edited by Dave_Sinkula; 01-02-2006 at 10:15 PM.
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Integer Emulation
    By Elysia in forum C++ Programming
    Replies: 31
    Last Post: 03-18-2008, 01:03 PM
  2. MURK - a small preview
    By Mario F. in forum Game Programming
    Replies: 27
    Last Post: 12-18-2006, 07:22 AM
  3. undefined reference
    By 3saul in forum Linux Programming
    Replies: 12
    Last Post: 08-23-2006, 05:28 PM
  4. C++ Operator Overloading help
    By Bartosz in forum C++ Programming
    Replies: 2
    Last Post: 08-17-2005, 12:55 PM
  5. MSVC Template Constructor/Assignment Errors
    By LuckY in forum Windows Programming
    Replies: 3
    Last Post: 07-22-2005, 02:57 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21