I believe that if anyone knows one structural and one object-oriented language very deeply he/she can migrate to any language at any time.
I am making this step by step self-learning guide with coding exercises for the following people
- Who are very new to C programming (Basically 1st-year student)
- Who are senior but somehow missed to learn the basic programming
- Who doesn't want to learn C programming in 20/30 minutes
- Who knows C programming but now trying to solve some exercise to brush up their knowledge
Contents:
Step 0: Read Me First
- For writing any code in C Programming language you need an IDE or can say a software. Personally, I prefer Codeblocks IDE. If you don't have any IDE and don't know how to install it from here.
- In this blog, I will guide you to learn but I'm not going to teach anything. Follow each step, there you will find Reference books or Youtube Playlists. Gather knowledge. After gathering knowledge from references try to appear diagnostic test then solve the programming examples. Believe me, you are sufficient enough to learn from the given references.
- Try to solve the problem in order. If you find it difficult to solve, skip it for the moment and try again later. Don't try to find the answer on google unless trying to solve it for 2 days.
- Moreover, I think these simple problems can be solved by any further languages in the future. For example, if you want to learn Python or Javascript, learn the topics and solve the given problems of this blog.
Step 1: Basics of C
(Basically for the theory part of your exam) You can read the topics from any of the Ref.[2~6] or if you are confident enough then start from belowDiagnostic Test:
- What is structural programming?
- What are the basic data types in C?
- What are the common C keywords? (important of true false)
- Rules for declaring a valid C constant.
- Rules for declaring a valid C variable.
Step 2: Variables
Diagnostic Test:
- What is header and why they are necessary?
- How many types of variables are there?
- How to declare a variable?
- Different types of built in functions. e.x. printf, scanf, pow, abs
- How to print and scan a variable? (specially char)
- Different types of operator
- Type casting int to float or vice versa.
- Hierarchy of operations
- What is garbage value?
Step 3: Conditional Statements
Diagnostic Test:
- How to write a block of code and what is the scope of a variable?
- What is relational operator and what are they?
- What is logical operator and what are they?
- The truth table of different logical operators.
- How to write if, else if, and else statements?
- How to write a nested if-else?
- Advantages and disadvantages of switch case over control statements like if/else
- Is nested if a substitute of else if?
Step 4: Loops
Diagnostic Test:
- How many types of loops are there in C? How to write each of them?
- What is the scope of a variable?
- What is initialization, condition, and increment/decrement of a loop? Read them for each of the loops (for, while, do-while)
- What is the difference between pre-increment and post-increment?
- Difference between 'While' loop and 'Do While' loop (click here)
- What is nested loop? How to write them (for, while, do-while)?
- What is an infinite loop?
- What is break and continue statement? how to use them?
- How to print patterns using loop? (click here)
- How many times the following for loop will execute?
int i;for(i = 2; i <=1;i++){ printf("anik\n");}
Step 5: Functions
Diagnostic Test:
- What is a function? How many types of functions in C? (user-defined and builtin function)
- Why should we use functions?
- What is prototype of a function? What is prototype name?
- What is return type, function name, param list?
- Passing value to a function (function call)
- Order of passing values
- Return a value from a function
- Scope of a variable (Local and Global variable)
- How to write a user define function?
- How to pass an array and string to any function?
- Use of different types of library functions
Step 6: Array
Diagnostic Test:
- What is an array? Why this is so important?
- How many types of array can you declare? (by data types, by dimension)
- How to take input and print an array? (covers array traversing, element accessing)
- How to declare a 2D array? Access, Travers, print, scan a 2D array.
Step 7: Strings
Diagnostic Test:
- What is string? What is a null character?
- How to take input a string? (Try all possible ways E.x. %s, char array traversing, gets())
- How to print a string? (Try all possible ways E.x. %s, char array traversing, puts())
- How to take input of a string containing space (E.x. "Anik Chowdhury")
- How to take input of a string followed by an integer. (E.x. "Anik Chowdhury" 5)
Step 8: Pointers
Diagnostic Test:
- What is the difference between call by value and call by reference?
- What is a Pointer in C? What is the difference between a pointer variable and a normal variable?
- What do you mean by referencing and dereferencing?
- What is memory leak?
- Function calling using a pointer value.
- Write a function to swap the value of two variables using pointers.
- "If we change the value of an integer variable inside any user define function it does not make any change to the main function but if we change an integer array it makes impact in the main function."-why?
Step 9: Structures
Diagnostic Test:
- What is structures in C? Why should we use structure?
- Declaring a structure
- Accessing the elements of a structure
- How to declare an array of structure
- How to declare a nested structure
- What is pointer of a structure? How to use it?
Step 10: Recursion
Diagnostic Test:
- What is recursion? What is the difference between a normal function and a recursive function?
- How a recursive call works?
- [Youtube Playlist] C programming by Tamim Shahriar (Bangla)
- [Book] Computer Programming by Tamim Shahriar Subeen (Rokomari Link) (Bangla)
- [Book] Let Us C by Yashavant Kanetkar (English)
- [Book] Teach Yourself C by Herb Schildt (English)
- [Book] Programming With C by Gottfried (English)
- [Book] Programming In Ansi C by E. Balagurusamy (English)
- [Youtube Playlist] Pointers in C/C++ (English)
- [Blog] recursion_and_dp (Bangla)
- [Blog] Attacking Recursions (English)
- [Blog] Practice Recursions (English)
It is a proficient blog that you have shared here about C++ Homework Help I got some unique and valuable information from your blog. Thankful to you for sharing this blog here.
ReplyDelete