💻 Day 88: C Language Practice – Hinglish
💻 C Language Practice –
👉 Aaj ka day pura practice ke liye hai 💪
Taaki C programming strong ho jaye 💯
🧠 Part 1: Theory Practice Questions
✅ Short Questions:
C language kya hai?
Variable kya hota hai?
Data type kya hota hai?
Operator kya hota hai?
if-else kya hai?
Loop kya hota hai?
Error kya hota hai?
Debugging kya hai?
💻 Part 2: Simple Programs Practice
1️⃣ Program: Print Your Name
#include <stdio.h>
int main() {
printf("My name is Alok");
return 0;
}
2️⃣ Program: Add Two Numbers (User Input)
#include <stdio.h>
int main() {
int a, b;
printf("Enter two numbers: ");
scanf("%d %d", &a, &b);
printf("Sum = %d", a + b);
return 0;
}
3️⃣ Program: Largest of Two Numbers
#include <stdio.h>
int main() {
int a, b;
printf("Enter two numbers: ");
scanf("%d %d", &a, &b);
if(a > b)
printf("A is greater");
else
printf("B is greater");
return 0;
}
4️⃣ Program: Even / Odd
#include <stdio.h>
int main() {
int num;
printf("Enter a number: ");
scanf("%d", &num);
if(num % 2 == 0)
printf("Even Number");
else
printf("Odd Number");
return 0;
}
5️⃣ Program: Table Print
#include <stdio.h>
int main() {
int n, i;
printf("Enter a number: ");
scanf("%d", &n);
for(i = 1; i <= 10; i++) {
printf("%d x %d = %d\n", n, i, n*i);
}
return 0;
}
6️⃣ Program: Sum of 1 to 10
#include <stdio.h>
int main() {
int i, sum = 0;
for(i = 1; i <= 10; i++) {
sum = sum + i;
}
printf("Sum = %d", sum);
return 0;
}
🧩 Part 3: Challenge Programs (Try Yourself 😎)
👉 Ye tum khud try karo:
Factorial of a number
Largest of 3 numbers
Prime number check
Reverse a number
Palindrome number
📝 Short Notes
👉 Practice = Success in programming
👉 Logic + Coding = Perfect programmer