Syllabus for C Programming Linux environment
0. Linux Environment
Understanding Linux command shell environment
1. Representing numbers
Basic Linux commands
Creating text files and C program files using text editors like nano and vi
Compiling a C program and generating executable file
Executing the executable file
2. ASCII codes for numbers, letters and some control characters
Conversion of numbers from one base to other
Representing negative numbers in ones compliment and twos compliment
a) Write hex number 0x1234 in binary format.
b) Write the binary number 1011010111001010 in hex format.
c) Write decimal number 36 in binary format.
d) Write -12 in binary format using two's complement.
e) What is the maximum unsigned value that can be stored in 6 bits.
f) What is the minimum and maximum values that can be stored in 6 bits
3. Various Types of variables possible in C and their sizes in 32
bit operating systems
a) What is the ASCII code for character 'A' ?
b) What is the ASCII code for digit '5' ?
c) What is the ASCII code for carriage return ?
i) char, short, int, long, float, double
4. Understanding the following Arithmetic operators and using them in arithmetic expressions. Understanding the difference between Binary operator and Unary operator.
ii) Signed and Unsigned variables
iii) Boolean variables
a) What is the size of float variable?
b) What operator do you use to find the size of an variable?
c) What is the suitable types for storing boolean values?
d) What is the maximum value that can be stored in a signed char?
+ - / *
% -- ++
5. Logical opetators and using them in logical expressions.
a) Which of the above operators are unary operators?
b) What is the value of expression 10 % 3 ?
&& || !
6. Conditional operators and using them in conditional expressions
i) What are the values of x,y,z in the following program.
int a = 20;
int b = 10;
x = a && b;
y = ! x ;
z = y || b;
== != > < >= <=
7. Bitwise operators and using them in the expressions
& | ^ ~
8. Precedence rules
10. IF Statements
Single statement and Block statements
11. Loop Statements
If-Else If-Else If-Else Statement
12. Break and Continue Statements
Function prototype and its use
Functions that will not take any arguments
Functions that will not return any thing
Functions that take single arguments
Functions that take multiple arguments
Pass by value and Pass by reference for function arguments
Declaring various types of pointer variables.
Initializing the pointer variable with address of other variables
Initializing the pointer variable with address given by malloc().
Dereferencing a pointer (accessing the contents pointed by pointer)
Declaring Function Pointers
Adding integer to pointer
Subtracting integer from pointer
Initializing the function pointer with function address
Invoking the function by using function pointer
Use of pointers
To achieve pass by reference effect for function arguments
Dynamic memory usage
Declaring various types of arrays
Accessing elements of an array in for loop
Maximum index of an array
Difference between array name and pointer variable
Declaring the template for a structure
Declaring the structure variable
Initializing the fields of a structure
Printing the fields of a structure
Declaring pointer variable to structure
Initializing structure pointers with malloc() function
Accessing fields of a structure by using structure pointer
Difference between structures and Unions
18. Scope of variables and functions
19. Writing functions and testing those functions
Difference between Definition and declaration of variables
Use of 'extern' keyword
Use of 'static' keyword for local variables
Use of 'static' keyword for global variables
Use of 'static' keyword for functions
Students should be able to write any function according to the given description. Lot of students used to write only main() function. They are not comfortable in writing a separate function and calling that function from main function. But important skill is to write to given function with given description. One should be able to call this function from main() function and should be able to test that function.
20. Understanding and using following C library functions
Standard Input/Output Functions
putchar(); puts(); printf(); getchar(); gets(); scanf();
strlen(); strcpy(); strncpy(); strcat(); strncat(); strcmp();
strncmp(); memcpy(); memcmp();
Character class testing and Conversion functions
isalpha(); isupper(); islower(); isdigit(); isalnum(); isspace();
Storage management functions
malloc(); calloc(); free();
sqrt(); pow(); sin(); cos(); tan();