๐Ÿ  Session 1 Homework

Hello World & C Basics

๐Ÿ“š What You'll Practice

This homework focuses on understanding the basic structure of C programs and getting comfortable with your development environment.

Goal: Master the fundamentals of C programming and write your first programs!

๐Ÿ“‹ Instructions

๐Ÿ‘‹ Program 1: Basic Hello World

Your very first C program!

What it does:

Displays "Hello, World!" on the screen. This is the traditional first program in any programming language.

#include <stdio.h> int main() { printf("Hello, World!\n"); return 0; }

๐Ÿงช Expected Output

  • Hello, World!

๐Ÿ‘ค Program 2: Personal Greeting

Add your name to the greeting!

What it does:

Displays a personalized greeting message with your name.

#include <stdio.h> int main() { printf("Hello, my name is Rahul!\n"); printf("I am learning C programming!\n"); return 0; }

๐Ÿงช Expected Output

  • Hello, my name is Rahul!
  • I am learning C programming!

๐Ÿ’ฌ Program 3: Multiple Messages

Display several messages in one program!

What it does:

Shows multiple printf statements to display several lines of text.

#include <stdio.h> int main() { printf("Welcome to C Programming!\n"); printf("This is my first program.\n"); printf("I am excited to learn more!\n"); printf("Programming is fun!\n"); return 0; }

๐Ÿงช Expected Output

  • Welcome to C Programming!
  • This is my first program.
  • I am excited to learn more!
  • Programming is fun!

๐ŸŽจ Program 4: ASCII Art

Create simple ASCII art using printf!

What it does:

Uses multiple printf statements to create a simple ASCII art pattern.

#include <stdio.h> int main() { printf(" *\n"); printf(" ***\n"); printf(" *****\n"); printf(" *******\n"); printf("*********\n"); return 0; }

๐Ÿงช Expected Output

  • *
  • ***
  • *****
  • *******
  • *********

โ„น๏ธ Program 5: Program Information

Display information about your program!

What it does:

Shows program details and information in a formatted way.

#include <stdio.h> int main() { printf("================================\n"); printf(" C Programming Course\n"); printf(" Session 1 Homework\n"); printf(" Student: Rahul\n"); printf("================================\n"); return 0; }

๐Ÿงช Expected Output

  • ================================
  • C Programming Course
  • Session 1 Homework
  • Student: Rahul
  • ================================