Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

C Program Ability

  1. Apr 30, 2009 #1
    I think this would be the right place to ask this question not entirely sure but I just completed my only class with C, and the only other programming class I take is c++ in my third year.

    From what we've done I know for a fact that my skills at best are low intermediate, maybe, and my professor confirmed this yesterday when he told us that we should not put C as a skill on our resumes. I am going to learn more on my own but I was wondering what skills with C, or types of programs I should have/know before I could say that I know enough C so that I can put it on my resume.

    Like when I know how to do: x, y, and z, with out a problem then it would be acceptable to put it on my resume.
  2. jcsd
  3. Apr 30, 2009 #2
    To be honest, there is nothing much to C. It basically is just a shell that you use in order to do other things. You should specialize with a certain set of API's, whether it be Windows or Linux (or others as well). C is cross platform, but the libraries don't always tend to be the same. Just pick up some fun projects when you feel you have the skill.

    As a novice C programmer, I wrote applications such as basic GUI programs for both Windows/Linux, Client/Server communication, algorithm researching, and some logic puzzles. C is as fun as you make it. But proficiency in the syntax is only the first step, learning to apply it to a certain discipline is where you should be looking.
  4. Apr 30, 2009 #3


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    If you have some specific, career-oriented reason to know C specifically, I'd forget C entirely. Learn a much more modern and useful language, like Python. It's the fastest-growing language right now, for good reason.

    - Warren
  5. Apr 30, 2009 #4
    There is no set skill you should know before putting it on your resume. It is mainly experience. I'd put it on my resume when I am comfortable answering questions about C/C++ in an interview.

    A reason the professor might have said that is because that class may not have touched on the C++"object-oriented" features, which I think are just taken for granted in industry if you say you know C.

    Aside from the object oriented structures, there really isn't a lot to C. If your class went over structs and pointers, then it is mainly practice from there. See if you can find an open source project in the area you are interested. Go over the source and try to contribute when you can. That is one of the best ways to get better. And then you have some contributions you can talk about in an interview!
  6. Apr 30, 2009 #5
    Thanks for the advice I really appreciate, it puts my mind at ease now. I'll try to follow some of the tips you guys gave me.
  7. Apr 30, 2009 #6


    User Avatar
    Gold Member

    I'm not sure that I agree with the other posters. If I were interviewing a person to see if they really know C, I would look for two things:

    1) pass an argument to a subroutine "by value" versus "by reference"
    2) pointers and linked lists (and of course, 'garbage collection', de-allocating your allocated memory)
    3) recursion

    C has been called the "write-only" language; it's not that difficult to write a program, but it can be quite difficult to understand what someone else's program is really doing. In my opinion, the above areas are the tricky ones, and if I did not have experience with them, I would not put C on my resume.
  8. Apr 30, 2009 #7
    Well passing arguments and dealing with pointers I feel comfortable with, 'garbage collection' I would need to do some more work, and recursion sounds familiar but I'm not sure what it is, do you mind giving a brief description of it.
  9. May 1, 2009 #8
    I am learning Python right now and it is amazing. However, from what I hear, it is an excellent PROTOTYPING language. Once you have something prototype you write it in C++ since it's faster, even though scipy, and numpy can make things fast.
  10. May 1, 2009 #9
    I'm rather surprised no one has brought up a rather important point: What is the target application? If your potential employer needs embedded programming (microcontrollers, DSPs, etc), Python is not likely on their list of requirements.
  11. May 1, 2009 #10


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    If you take an algorithm (sort, matrix inversion, etc.) and code it up identically in Python and C++, the Python version will be an order of magnitude slower. No one disputes this. However, if you use the algorithms that come built into Python (which are themselves written in C++), you will obtain virtually identical performance. Python is, in that sense, just an interpreted layer above some very powerful low-level code.

    The chances of a naive C programmer coding an algorithm (sort, matrix inversion, etc.) as efficiently as the Python team is zero. That's why, for most practical purposes, Python is essentially just as fast as C++. If you to use built-in features as much as possible, and learn to avoid a few pitfalls (doing large loop iterations in the interpreted layer, for example), you can get performance that is quite close to that of C++.

    This is exactly what packages like SciPy do for you -- they give you a beautiful, flexible, intuitive interpreted layer above a gargantuan amount of highly optimized algorithms.

    Of course, Python code is easier to write, read, and maintain, and is less likely to have bugs... In most cases, a slight hit in performance is worth it.

    - Warren
  12. May 1, 2009 #11
    Another thing to note about interviewing for a software position is that it's not enough just to know how to hack together a few statements to perform some simple operations. You need to understand how to program - that includes algorithms, data structures, and good software engineering principles.

    I will say that it's easier to write horrible code in C than it is in Python. I'd take a potential employee with only two programming classes under his belt a lot more seriously if they claimed a passable level of proficiency programming with Python than with C. I don't think you can be very effective with C after only taking two classes.
  13. May 4, 2009 #12
    C is an important language. For example, it's the language in which operating systems are written.

    Comparing C to Python is a bit like comparing screwdrivers to hammers. There is no inherently superior tool, but there would be a superior choice based on context.
  14. May 4, 2009 #13
    Before you put any programming language on your resume, you should have had some exposure to solving actual computational problems in that language. For instance, do you know how to do the following things in C?

    - Basic sorting
    - Basic searching

    - Binary search trees
    - Graphs
    - Stacks
    - Queues
    - Heaps

    - In parameters
    - Out parameters
    - Inout parameters
    - Recursion
    - Scoping

    - Memory allocation
    - Memory deallocation
    - Memory manipulation


    It's a little misleading to say you speak English if you don't know any nouns. It's also misleading to say you know C if you can't implement a binary search tree in it and write a recursive function to perform a tree search.
  15. May 5, 2009 #14


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    It depends on the sort of job you are applying for. I am a software engineer working on signal processing and communication algorithms in an embedded environment, so what I look for (and ask interview questions about) in terms of C tends to de-emphasize things like sorting and searching, and to emphasize the stuff that trips people up in my environment: pointers, bitwise operations, nuts and bolts of both integer and floating point arithmetic, scope rules, memory issues of various kinds.

    We do use C++ but mostly as "C with classes"/"a better C" so the C++-specific questions tend to focus on basic object-oriented topics but not much about templates or the other stuff that "modern" C++ programmers concern themselves with.

    On the other hand, someone looking for a system or application programmer for Windows or Unix would emphasize other aspects of the language, probably with greater emphasis on both the standard library and various external ones (Posix, Win32, Boost) and I'd probably flunk such an interview despite being regarded as a very solid software developer in my field!

    I guess I'd say that no matter what field you're in, you should know and have experience applying most of the core language as described in Kernighan and Ritchie, as well as the most commonly used parts of the standard library (stdio.h, stdlib.h, math.h, etc.)

    Also expect to be asked to implement on a whiteboard the sort of basic algorithm stuff that most interviewers ask ("write a function to reverse a string", "insert an element into a linked list such that it remains sorted", etc.)
  16. May 6, 2009 #15
    I think that the real test to determine whether or not you know a programming language is this:

    If I give you a problem, which is the part which could keep you from solving it: finding a solution to the problem is too hard, or figuring out how to make the language to it is too hard.

    Really, if you can formulate a solution to a problem, you should be able to write C code for it.

    (Caveat: you should also be able to find solutions to a wide variety of basic problems already.)
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook