Day 1 Highlights:
- Introduction and History: Dive into the fascinating history of the C programming language and understand its evolution.
- Structure of C Programs: Learn the fundamental structure that every C program follows. Discover the key components that make up a C program.
- Setting Up Your Environment: Get your hands dirty by setting up a C programming environment. We’ll guide you through the process to ensure you’re ready to start coding.
- Variables and Data Types: Understand the basics of variables, data types, and how to declare them in C. Lay the groundwork for efficient data manipulation in your programs.
Presentation (PPT):
Youtube Video :
🔗 Day 1 Agenda:
- 01:53 – Introduction
- 03:50 – History of C
- 06:30 – Importance of C programming
- 09:07 – Structure of C Programs
- 14:50 – Setting Up Your Environment
- 15:51 – Variables and Data Types
- 21:53 – Hands-On Coding Exercise on Datatypes
Code on variables and Datatypes :
#include <stdio.h>
int main() {
// Integer data types
int integerVar = 42;
short int shortVar = 12345;
long int longVar = 1234567890L;
long long int longLongVar = 123456789012345LL;
// Floating-point data types
float floatVar = 3.14159;
double doubleVar = 2.718281828459045;
long double longDoubleVar = 1.2345678901234567890L;
// Character data type
char charVar = 'A';
// Boolean data type (C99 and later)
_Bool boolVar = 1; // true
// Enumeration data type
enum Color { RED, GREEN, BLUE };
enum Color favoriteColor = BLUE;
// Output values
printf("Integer: %d\n", integerVar);
printf("Short Integer: %hd\n", shortVar);
printf("Long Integer: %ld\n", longVar);
printf("Long Long Integer: %lld\n", longLongVar);
printf("Float: %f\n", floatVar);
printf("Double: %lf\n", doubleVar);
printf("Long Double: %Lf\n", longDoubleVar);
printf("Character: %c\n", charVar);
printf("Boolean: %d\n", boolVar);
printf("Favorite Color: %d\n", favoriteColor);
return 0;
}