C Logic Builder – Part 1: 25 Programs to Think Like a Programmer
25 C programs that are asked again and again in interviews, explained step by step: understanding the problem, analysis, algorithm, dry run and code.
- Level
- Beginner
- Language
- English
- Lessons
- 62, 22 hr 23 min
What you’ll learn
- Read and analyse any programming problem methodically
- Identify inputs, outputs and edge cases
- Write an algorithm before coding and check it with a dry run
- Use the modulus operator, digit extraction and the "largest so far" pattern
- Solve loop problems such as prime, Fibonacci, Armstrong and GCD
- Solve common interview questions on arrays and strings
- Change values through functions and pointers, and sort with bubble sort
- Test programs with normal, boundary and special test cases
About this course
This course is for learners who know the basics of C (variables, input, if-else, loops) and want to solve interview programs on their own. The goal is not to memorise code, but to be able to build the logic yourself when a new problem appears.It begins with a six-step method for solving any programming problem. Then 25 programs follow, from easy to harder, in four levels: conditions, loops and number logic, arrays and strings, and functions and pointers. All the usual questions are here: even/odd, leap year, palindrome, prime, Armstrong, GCD, second-largest element, duplicates, bubble sort, missing number and more.
Every program is taught in the same order: problem statement, problem analysis and edge cases, solution and dry run, algorithm, the C program, a line-by-line code explanation, test cases, common mistakes, a checkpoint and a practice variation.
Every program in the notes has been compiled and run, so the outputs and test results you see are real. Each program ends with practice tasks and a quiz. Pass the final quiz to earn a certificate that anyone can verify online by scanning its QR code.
Course content
Introduction: How to Solve a Programming Problem 3 lessons
- Video Introduction Video Preview 6 min
- Notes Notes: How to Solve a Programming Problem Preview 30 min
- Reading Practice: Use the method yourself 15 min
- Quiz Unit quiz: pass it to open the next unit
Program 01: Even or Odd 3 lessons
- Notes Notes: Check whether a number is even or odd Preview 30 min
- Video Video Even Odd 5 min
- Reading Practice: Program 01 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 02: Largest of Two Numbers 3 lessons
- Notes Notes: Find the larger of two numbers 30 min
- Video Video Largest of 2 4 min
- Reading Practice: Program 02 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 03: Largest of Three Numbers 3 lessons
- Notes Notes: Find the largest of three numbers 30 min
- Video Video Largest of 3 5 min
- Reading Practice: Program 03 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 04: Leap Year 3 lessons
- Notes Notes: Check whether a year is a leap year 30 min
- Video Video on Leap Year 5 min
- Reading Practice: Program 04 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 05: Positive, Negative or Zero 3 lessons
- Notes Notes: Is the number positive, negative or zero? 30 min
- Video Video on Positive Negative 3 min
- Reading Practice: Program 05 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 06: Divisible by 5 and 11 3 lessons
- Notes Notes: Check divisibility by both 5 and 11 30 min
- Video Video 5 min
- Reading Practice: Program 06 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 07: Swap Without a Third Variable 3 lessons
- Notes Notes: Swap two numbers without a third variable 30 min
- Video Video on Swap 5 min
- Reading Practice: Program 07 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 08: Sum of Digits 3 lessons
- Notes Notes: Sum of the digits of a number 30 min
- Video Video 5 min
- Reading Practice: Program 08 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 09: Reverse a Number 3 lessons
- Notes Notes: Reverse the digits of a number 30 min
- Video Video on Reverse a number 5 min
- Reading Practice: Program 09 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 10: Palindrome Number 2 lessons
- Notes Notes: Check whether a number is a palindrome 30 min
- Reading Practice: Program 10 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 11: Count the Digits 2 lessons
- Notes Notes: Count the digits in a number 30 min
- Reading Practice: Program 11 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 12: Factorial 2 lessons
- Notes Notes: Find the factorial of a number 30 min
- Reading Practice: Program 12 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 13: Prime Number 2 lessons
- Notes Notes: Check whether a number is prime 30 min
- Reading Practice: Program 13 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 14: Fibonacci Series 2 lessons
- Notes Notes: Print the Fibonacci series 30 min
- Reading Practice: Program 14 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 15: Armstrong Number 2 lessons
- Notes Notes: Check whether a number is an Armstrong number 30 min
- Reading Practice: Program 15 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 16: GCD (Euclidean Algorithm) 2 lessons
- Notes Notes: Find the GCD of two numbers 30 min
- Reading Practice: Program 16 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 17: Largest Element in an Array 2 lessons
- Notes Notes: Find the largest element in an array 30 min
- Reading Practice: Program 17 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 18: Second-Largest Distinct Element 2 lessons
- Notes Notes: Find the second-largest distinct element 30 min
- Reading Practice: Program 18 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 19: Reverse an Array 2 lessons
- Notes Notes: Reverse an array in place 30 min
- Reading Practice: Program 19 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 20: Duplicate Elements 2 lessons
- Notes Notes: Find the duplicate elements in an array 30 min
- Reading Practice: Program 20 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 21: String Length Without strlen() 2 lessons
- Notes Notes: Find the length of a string without strlen() 30 min
- Reading Practice: Program 21 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 22: Palindrome String 2 lessons
- Notes Notes: Check whether a string is a palindrome 30 min
- Reading Practice: Program 22 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 23: Swap Using a Function 2 lessons
- Notes Notes: Swap two numbers using a function and pointers 30 min
- Reading Practice: Program 23 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 24: Bubble Sort (Ascending) 2 lessons
- Notes Notes: Sort an array in ascending order 30 min
- Reading Practice: Program 24 variations 20 min
- Quiz Unit quiz: pass it to open the next unit
Program 25: Missing Number in an Array 2 lessons
- Notes Notes: Find the missing number from 1 to N 30 min
- Reading Practice: Program 25 variations 20 min
- Quiz Unit quiz: pass it to open the next unit