computer science fundamentals in C Programming 1

Nikhila973430 0 views 1 slides Sep 30, 2025
Slide 1
Slide 1 of 1
Slide 1
1

About This Presentation

computer science fundamentals


Slide Content

Week 6: Introduction to C Programming
Lab Title: Writing Your First C Program in Code::Blocks
Objective: To help students open a new C project, write a basic C program, and understand its
structure using the Code::Blocks IDE.
What You Should Know Before This Lab:
• You should have basic typing skills and understand how to use a keyboard and mouse.
• You should know how to open and close programs on your computer.
Instructions:
1. Open Code::Blocks from the Start Menu or desktop icon.
2. Select File → New → Project and choose "Console Application".
3. Choose the C language and name your project (e.g., Lab6_YourName).
4. Click Finish and open the main.c file that appears.
5. In the editor, type a simple program that displays your name and class.
6. Click Build and Run (gear icon) to compile and see your program output.
7. Observe the key parts of the program structure:
1. #include <stdio.h> – Includes the standard input/output library
2. int main() – The starting point of the program
3. printf() – Used to print output to the screen
Tasks:
• Create a new C project.
• Type a basic program that prints your name and class.
• Build and run the program.
• Identify each part of the code and explain its function briefly.
Submission:
• Show your working program to the instructor.
Reflection:
• Which part of the program made sense, and which part was confusing?
Tags