DMCA.com Protection Status C Programming – Day 1 | Basics, Structure & First C Program for Beginners - ZAREEN TECH WAVE -Largest Tutorials Website For Freelancer ZAREEN TECH WAVE -Largest Tutorials Website For Freelancer

Header Ads

C Programming – Day 1 | Basics, Structure & First C Program for Beginners

C PROGRAMMING BASIC (INTERACTIVE)

DAY - 1


🎯 Today’s Learning:

1️⃣ Structure of a C Program
2️⃣ printf() & scanf()
3️⃣ Variables + Data Types
4️⃣ Practice Task + Quiz


✅ 1. Structure of a C Program

#include <stdio.h> // Header File int main() { // Main Function // Code goes here return 0; }

✔ Every C program must have main()
#include <stdio.h> allows input & output


✅ 2. Output: printf()

printf("Hello World!");

✅ 3. Input: scanf()

int age; scanf("%d", &age);

📌 Note: Use & before variable name in scanf()


✅ 4. Variables & Data Types

Data TypeKeywordExample
Integerint10
Floatfloat10.5
Characterchar'A'
Stringchar[]"Hello"
Doubledouble20.123456

🧪 Example Program (Input + Output)

#include <stdio.h> int main() { char name[20]; int age; printf("Enter your name: "); scanf("%s", name); printf("Enter your age: "); scanf("%d", &age); printf("Name: %s\nAge: %d", name, age); return 0; }

✅ Task 1 (Please Solve)

Write a program that takes:

✔ Your country name (string)
✔ Your year of birth (integer)

Then print like:

Country: Bangladesh Year of Birth: 2005

You can type your code here — I will check and correct it ✅


📝 Quick Quiz (Answer in Chat)

1️⃣ Which function is used to take input in C?
A) print()
B) printf()
C) scanf()

2️⃣ Which data type is correct for storing decimal values?
A) int
B) float
C) char

3️⃣ Which line starts input/output system?
A) #include <stdio.h>
B) main()
C) return 0;

Write answers like: 1C, 2B, 3A


✅ After your task + quiz → I will update Day-1 completed.

Reply with:

➡ Your Task 1 Code
➡ Quiz Answers



No comments

Thank You For Visit My Website.
I Will Contact As Soon As Possible.

Theme images by 5ugarless. Powered by Blogger.