C Programming – A Practical Approach
C language is a general purpose, the structured high-level language which was originally developed by Dennis Ritchie in 1973 at Bell Laboratories. This is the basic programming language and has gained a lot of popularity due to its structure, high-level abstraction, machine independent feature. C language was developed with UNIX operating system. So, it is strongly associated with UNIX which is one of the most popular network operating system used nowadays. C was initially used for system development work, particularly the programs that make-up the operating system. C language was used as a language for system development due to the fact that the code written in C language runs approximately as quick as the code which is written in assembly language. C has now become a widely used professional language for various reasons −
- 1. C is a robust language and it has the rich set of built-in functions and operators which can be used to write a complex program.
- 2. C compiler combines the capabilities of an assembly language with features of a high-level language.
- 3. C programs are efficient and fast due to the variety of data type and powerful operators.
- 4. C is the highly portable language which means that programs once were written can be run on another machine with some or without any modification.
- 5. C program has the ability to extend itself.
- 6. C program is basically a collection of functions that are supported by C library. We can also create our own function and add it to C library.
- 7. C language is the most widely used language in operating systems and embedded system development today.
This course assumes that you know how to edit a text file and how to write source code inside a program file.
Pre-requisites for learning C Programming
- You should have basic knowledge of computers.
- You should have a 32-bit system where you can install the runtime environment or IDE.
- You should have basic logic building skills, problem solving skills.
- You should also have knowledge of Basic Mathematics which includes prime number, factorial etc.
1. Getting Started (Introduction)
Learning Objectives: C language was developed was in 1973 by Dennis M Ritchie at AT&T Bell Laboratories. This language was developed was originally developed to develop UNIX operating system. The UNIX operating system, the C compiler and essentially all Unix application programs have been written in C. C was initially used for system development work, particularly the programs that make-up the operating system. C was adopted as a system development language because it produces code that runs nearly as fast as the code written in assembly language. C has now become a widely used professional language. C is a general-purpose, structured high level language which is used for writing programs in multiple domains, such as operating systems, numerical computing, graphical applications, etc. C language has gained a lot of popularity due to its robust nature. Also, it has rich set of built-in functions and operators which can be used to write a complex program. It is a small language, with just 32 keywords.
Topics: Introduction, prerequisite, Exercise files, Development environment.
2. C- Programming
Learning Objectives: C language is a structured and procedural programming language which was originally developed to develop operating systems. The main feature of C language is that it is highly portable language which means that program once written can be run on different machines with some modification. Other features include low-level access to memory, simple set of keywords, and clean style, these features make C language suitable for system programming like operating system or compiler development. To start C programming, we need to have a compiler to compile and run our programs.
Topics: C- Language and standards, C- Fundamentals, Executing C program.
3. Program structure
Learning Objectives: C program consists of functions and variables. A function is also referred to as method and it contains executable statements which are specifically written to perform desired operations. Variable on the other hand store values which are used for different operations in a program. The basic program structure includes preprocessor commands, functions/methods, variables, statements & expressions and comments. The functionality of C language comes mostly from standard libraries which are included through preprocessor commands. The standard library header files are included at the start of program which contains necessary information to use these libraries including function declarations and macros.
Topics: : C- Preprocessor, C - Managing code, C - storing values, C - Statements and Expressions, C – Comments.
4. Data types
Learning Objectives:Data types in C are classified as fundamental data types and derived data types. The Fundamental data types constitutes integer type, floating type, character type and void type. Whereas, derived data types constitutes arrays, pointers, strings, structures and enumerations. Integer type, floating type are predominantly covered in this chapter.
Topics: Introduction, Integer types, Floating-point types, Void type
5. C – Strings
Learning Objectives:A string in C is actually a one dimensional array of characters with a null character (‘\0’) at the end. The null character is also known as string terminator because the null character is considered as the end of string. The length of the string is the count of number of characters before the null character ‘\0’.
Topics: Introduction, Input / Output, Advanced usage.
Learning Objectives:C variable is a piece of memory or a container that can store value. In other words, it is a named location in the memory which holds a value and where program can manipulate the data. C variable can have any data type such as int, char, float etc. and the value of variable may get changed in the program. Every variable should be declared in accordance with the naming convention. A variable name should always start wit either a letter or underscore, where letters should be distinctly declared due to the case sensitive nature of C language. The variable name can be a combination of alphabets and numbers but no special character is allowed except underscore. It is important to note that variable should be declared before use. Memory isn’t allocated at declaration, but at variable definition. Initialization of variable is the process of assigning value to a variable.
Topics: Introduction, Declaring variables
7. C – Basics
Learning Objectives: The basics of C program constitutes tokens, identifiers and keywords. Tokens in C are the basic building blocks constructed together to write a complete C program. In other words, the smallest unit in C program is termed as token. A s the name suggests, an identifier in C program is a name given to an element to identify the variables, functions and arrays. Keywords are predefined words in C compiler with each keyword meant to perform specific task. Keywords can’t be used as names of variables.
Topics: Arithmetic Operators, Relational Operators, Logical operators, Bit-wise operations, Working with complex statements, Working with Mathematical expressions, Working with Statements and expressions.
8. C – Functions
Learning Objectives:Bigger C programs are divided into basic building blocks which are technically referred to as functions or methods. These functions are created with instructions included within a pair of curly braces and each function perform desired operation. The advantage of creating C function is that it avoids rewriting same logic/code again and again in a program and provides flexibility to write the code once and use it multiple times as per the requirement. The function once created can be called multiple times from any place in a program. It adds to efficiency of the C program.
Topics: Passing variables, Returning Data, Recursion in C
9. C - Branching Decisions
Learning Objectives: C language includes decision making statements which include if – else statements, nested if statements and switch case statements. All these statements operate in similar fashion, they evaluate a particular condition and execute the statements, provided that the condition holds true (no zero).
Topics: If-else Statements, If-else-if Statements, Switch Statements.
10. C – Loops
Learning Objectives:C language includes iteration statements most commonly known as loops. There are three different types of loops in C programming. They are For loop, While loop and Do – While loop. Loops are used to execute the same statements multiple times.
Topics: Introduction, for loops, while loops, do-while loop, break.
11. C – Arrays
Learning Objectives: An array in C programming is a collection of similar type data elements which are sequentially arranged or stored in continuous memory locations. An array can be of any data type, but its size should be a constant value. It is always suggested to initialize an array to zero or null if you’re not assigning any value to the array. Arrays can be single dimensional or multi dimensional. Multi dimensional arrays can be 2-D, 3-D and 4-D arrays. 2-D array is also known as matrix and is predominantly used in programming.
Topics: Introduction, Arrays: Declaration, Arrays: Initialization, Array elements, 2-D Arrays, Working with Arrays, Working with Loops in Arrays.
12. C - Manage memories
Learning Objectives:When it comes to memory management in C, there are two types of memory managements known as static memory management and dynamic memory management. Static memory management involves the process of allocating memory at the compile time while dynamic memory memory involves the process of allocating memory at the runtime. The memory management is a concept is based on pointers which are special types of variables created ton hold the address of the variables in a program. There are four types of memory allocations in C. They are – malloc(), calloc(), free() and realloc().
Topics: Introduction to C-Pointers, Pointer: Declaration, Pointer: Initialization, Basic operation on pointers, Pointers and Arrays, Allocating and releasing memory.
13. C – Structures
Learning Objectives:Structure in C programming is a similar to an array, however, the only difference is that an array is a homogeneous collection of elements with similar data types while structure is a collection of elements with different data types. Structure consists of members which are called as structure members. Structure members can be accessed using structure variables. Multiple structure variables can be declared for same structure and each variable will be allocated separate memory. Similar to structures, C also has Union with same concept. However, the only difference is that structures allocates separate memory to all its members while union allocates common memory to the members.
Topics: Declaration, Working with Structures, Union operations with structures.
14. C - Custom Functions
Learning Objectives:The actual working of a function is contained in function definition which includes the function declaration, statements and function algorithms. A function ideally accepts a number of arguments or parameters and returns a value which is it is set to return. It is important to note that the function can only return single value irrespective of the numerous return statements which we can include within the function.
Topics: Introduction, Functional Programming, Components of a Function, Types of Variables, Working with Variables, Function prototype, Recursive Functions.
Learning Objectives:Before a C program is compiled by a compiler, the source code is processed by a program known as preprocessor. The process is known as preprocessing. The commands which are used in preprocessor are called as preprocessor directives and always begin with “#” symbol. These preprocessor directives are categorized as, file inclusion (# include), conditional compilation (#ifdef, #endif) and macro expansion (#define) etc.
Topics: Macros, using other files, Working with Conditional commands.
16. Global Programming norms
Learning Objectives:There are some global programming norms which must be adhered in order to write a program. You need to use lowercase for variable names and uppercase for symbolic constants. The names of local variable should be short while external names should be longer and more descriptive. Variable names can begin with an underscore (_), however, it should be avoided because these names are are reserved for library implementations as per the standard naming convention. Each variable should be specifically declared with a datatype which defines what values it can represent, how its data is stored in memory, and what operations can be performed on it. Explicitly defining a type for all variables and interfaces, the type system enables the compiler to catch type-mismatch errors, thereby preventing a significant source of bugs.
Topics: Naming conventions, Code correctness, Debugging techniques, Simple and clear codes, Code portability.
Q1 Who is our Instructor?
Ans. All our instructors are domain experts from the Industry or are from world-renowned academic Institutes and have at least 10-12 yrs of relevant experience in their domains. They are subject matter experts and are trained by E & ICT Academy for providing online training so that participants get a great learning experience.
Q2 What are the payment options?
Ans. You can pay by Credit Card, Debit Card or Net Banking from all the leading banks. We use a SBI Payment Gateway. Additionally, you may send us a cheque with appropriate details or use wire transfer.
Q3 How to get my queries resolved?
Ans. You can email us at email@example.com
Q4 What internet speed is required to attend the LIVE classes?
Ans. 1Mbps of internet speed is recommended to attend the LIVE classes. However, we have seen people attending the classes from a much slower internet.
Q5 How soon after Signing up would I get access to the Learning content?
Ans. As soon as your payment is verified, you will immediately get access to our course content in the form of a complete set of previous class recordings, PPTs, PDFs and assignments. You can start learning right away.
Q6 What are the system requirements?
Ans. Your system should have a 4GB RAM, a processor better than core 2 duo and operating system can be of 32bit or 64 bit.
Q7 Will Windows system work?
Ans. Yes, to work on Android on your Windows, you must install Java Development Kit (JDK) & Android Studio on your Windows Machine.
Q8 What are the prerequisites to start learning Mobile Computing?
Ans. You must have basic working knowledge of Java. Please check prerequisite.
Registration is required for course enrollment and scholarship request. You will get an activation link in the mail. Click on it and follow the instructions to complete your registration. Login with your username and password. You will be redirected to your dashboard. You can browse available courses from Home Page or by clicking Courses link on menu bar. Navigating to a course will give you two options: 1.Direct Enrollment 2. Scholarship Enrollment Logged in user can fill their details in the 'Scholarship Application' available in each course. We will mail you further details after processing your application based on your academic and professional record. Note: 1. Click on 'login' link and enter your username and password. or 2. Click on 'Register' link for registering on our website. Scholarship Eligibility: 1. Faculties from the states of Haryana, Punjab and U.P. and U.T.s of Chandigarh and Delhi are eligible for scholarship. 2. Candidates belonging to SC / ST category can avail full scholarship of Rs. 12,500(You need to submit SC / ST certificate in a format prescribed by the Central Govt. : After processing your scholarship request, we will send you the necessary details. You can directly enroll for the course by clicking on ‘Direct Enrollment’, if you do not require scholarship.
Click on 'Register' link on the menu bar
Click on activation link in the email
Click on 'Login' link on the menu bar
Click on 'Courses' link on the menu bar
Click on 'Scholarship Enrollment' in the course
Click on 'Direct Enrollment ' in the course
Registration is required for course enrollment and scholarship request.
You will get an activation link in the mail. Click on it and follow the instructions to complete your registration.
Login with your username and password. You will be redirected to your dashboard.
You can browse available courses from Home Page or by clicking Courses link on menu bar. Navigating to a course will give you two options: 1.Direct Enrollment 2. Scholarship Enrollment
Logged in user can fill their details in the 'Scholarship Application' available in each course.
We will mail you further details after processing your application based on your academic and professional record.
Note: 1. Click on 'login' link and enter your username and password. or 2. Click on 'Register' link for registering on our website.
Scholarship Eligibility: 1. Faculties from the states of Haryana, Punjab and U.P. and U.T.s of Chandigarh and Delhi are eligible for scholarship. 2. Candidates belonging to SC / ST category can avail full scholarship of Rs. 12,500(You need to submit SC / ST certificate in a format prescribed by the Central Govt. :
After processing your scholarship request, we will send you the necessary details.
You can directly enroll for the course by clicking on ‘Direct Enrollment’, if you do not require scholarship.
*CGPA to percentage conversion formula:
Equivalent Percentage = CGPA obtained X 9.5 X (10/CGPA Scale)
Example: If CGPA obtained is 8.00 on the scale of 10, then Equivalent
percentage will be 8.00 X 9.5 X (10/10) = 76%,
or If CGPA is 3.7 out of 4, then Equivalent percentage will be 3.7 X 9.5 X (10/4) = 87.88%
We urge you to provide correct information to your best knowledge. Certificates will be withheld if found that you have misrepresented any data / information.
C- Language and Standards
Executing C program
C- Program Structure
C - Managing Code
C - Storing Values
C - Statements and Expressions
C - Comments
C - Data types
C - Strings
Input / Output
C - Variables
C - Basics
Working with Complex Statements
Working with Mathematical Expressions
Working with Statements and Expressions
Solution: Exercise 1
Solution: Exercise 2
C - Functions
Recursion in C
Solution: Exercise 3
Solution: Exercise 4
C - Branching Decisions
Solution: Exercise 5
C - Loops
Solution: Exercise 6
C - Arrays
Working with Arrays
Working with Loops in Arrays
Solution: Exercise 7
C - Managine memories
Introduction to C-Pointers
Basic Operation on Pointers
Pointers and Arrays
Allocating and releasing memory
C - Structures
Working with Structures
Union perations with structures
C - Files
Random Access Files
C - Custom Functions
Components of a Function
Types of Variables
Working wirh Variables
Working with Arrays
Using Other Files
Working with Conditional commands
Global Programming norms
Simple and Clear Codes
Solution: Application 1
Solution: Application 2