Start your programming journey with one of the most powerful and foundational languages — C. This comprehensive course is designed for absolute beginners as well as intermediate learners who want to build a solid understanding of programming using the C language. Whether you're preparing for college-level programming, cracking technical interviews, or planning to explore systems or embedded development, this course covers everything step-by-step. Through hands-on examples, real-world practice problems, and structured explanations, you’ll learn how to write clean and efficient C code — from your first printf() to advanced data structures and memory management.
Arrays in C are used to store multiple values of the same type in a single variable. They are essential for organizing large sets of data efficiently and are widely used in all types of programming tasks — from simple iteration to complex data processing.
An array is a collection of elements of the same data type placed in contiguous memory locations and accessed using an index.
int marks[5];
This declares an integer array of 5 elements: marks[0] to marks[4].
int nums[5] = {1, 2, 3, 4, 5};float prices[] = {99.5, 75.0, 60.5}; ← Compiler determines sizechar vowels[5] = {'a', 'e', 'i', 'o', 'u'};int nums[3] = {10, 20, 30};
printf("%d", nums[1]); // Output: 20
You can iterate through arrays using loops:
int i, arr[5] = {10, 20, 30, 40, 50};
for(i = 0; i < 5; i++) {
printf("%d\n", arr[i]);
}
int arr[5] = {1, 2, 3, 4, 5}, sum = 0;
for(int i = 0; i < 5; i++) {
sum += arr[i];
}
printf("Total = %d", sum);
Useful for representing matrices, grids, and tables.
int matrix[2][3] = {
{1, 2, 3},
{4, 5, 6}
};
for(int i = 0; i < 2; i++) {
for(int j = 0; j < 3; j++) {
printf("%d ", matrix[i][j]);
}
printf("\n");
}
Assume you store marks of 3 students in 5 subjects for UdaanPath's scholarship assessment:
int marks[3][5]; // 3 students, 5 subjects each
In the next chapter, we’ll explore Strings in C — how to store, manipulate, and use character arrays using string handling functions.