x

Wednesday, January 27, 2016

What should a C programmer know?

What should a C programmer know?

Knowledge Requirements for a C Programmer

C is the basic of all programming languages. Before the introduction of C we had only Machine level languages. Once you have mastered C, you can learn other programming language with ease. Our opinion, Aside from standard constructs common to most procedural languages, C Programmer should have the following knowledge:

– (ab)using the preprocessor;
– Function pointers;
– Why sprintf can blow your foot off;
– Unions;
– Thinking about development in terms of modules (.h/.c files) with a set of publicly exposed functions instead of strictly classes;
– inker vs compiler;
– How arrays are pointers are arrays;
– Pointers Pointers Pointers;
– Pointer aliasing, (why its illegal in C99);
– Stack vs Heap;
– Manual memory management malloc/free;
– ow to cast anything to anything (its all just 1s and 0s after all;
– How bad C string use can result in buffer overflows;
– How C strings work, and how they are also pointers and arrays;
– x >> 1 is equivalent to x/2 for unsigned integers;
– Bit masks are your friend;
– Pointer arithmetic;
– Frequent small memory allocations can cause fragmentation on the heap;
– malloc and/or calloc can return NULL…make sure your check return values;
– GOTO is not evil especially when used to handle exceptions/failures;
– nitialize everything to a known value;
– Integer promotion rules.

Please feel free to mail us at ntp.interview@gmail.com if you have questions or comments. Visit site at http://www.interviewquiz.net/ for updates and more information.

 

One Response to What should a C programmer know?

  1. […] Copied from http://www.interviewquiz.net/what-should-a-c-programmer-know/ […]

Leave a Reply

No comments:

Post a Comment