This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
software_carpentary2 [2011/06/20 04:23] medhamsh |
software_carpentary2 [2011/06/20 05:39] madhumathi |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | === Additional Exercises === | ||
+ | |||
+ | 0) Create a simple project with three files: file1.c file2.c and main.c. Define func1() in file1.c and func2 in file2.c. Declare the func1() in file1.h and func2() in file2.h. Include file1.h and file2.h in main.c and call the two functions. Write a makefile for this project. Extra: Make changes in file1.h and file2.h in such a manner that including twice inside main.c will not give compilation errors. | ||
+ | |||
+ | 1) Download wget source code, compile and install it on the system | ||
+ | |||
+ | 2) Understand what configure, automake and autoconf are for | ||
+ | |||
+ | 3) Download and compile the linux kernel | ||
+ | |||
+ | 4) Understand phony targets inside a makefile | ||
+ | |||
+ | 5) Browse mozilla firefox source code using mxr.mozilla.org. | ||
+ | - Access search functions | ||
+ | - Browse for variables declarations and function declarations | ||
+ | - Browse for variable and function usages | ||
+ | |||
+ | 6) Download, read and understand the source of a small and simple free software project as much as possible for some time (such as wget). | ||
+ | |||
+ | 7) Read the GNU coding standards document and try to analyze the importance of each guideline there. | ||
+ | |||
+ | Puzzle: | ||
+ | What does the following function do: | ||
+ | |||
+ | |||
+ | int what_do_i_do(int a) | ||
+ | { | ||
+ | a = ((a & 0xAAAAAAAA) >> 1) + (a & 0x55555555); | ||
+ | a = ((a & 0xCCCCCCCC) >> 2) + (a & 0x33333333); | ||
+ | a = ((a & 0xF0F0F0F0) >> 4) + (a & 0x0F0F0F0F); | ||
+ | a = ((a & 0xFF00FF00) >> 8) + (a & 0x00FF00FF); | ||
+ | a = ((a & 0xFFFF0000) >> 16) + (a & 0x0000FFFF); | ||
+ | return a; | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
====== Quality Assurance ====== | ====== Quality Assurance ====== | ||