Saturday, October 24, 2026

Input Output in C Language scanf printf in Telugu Part-3

Input & Output in C Language | scanf() & printf() in Telugu

Part-3: User nundi data ela teesukovali? - LearnTechSoft

💡 Real Life Example: ATM machine lo - Screen meeda chupinchadam Output, Pin kotadam Input - Ade C lo kuda!

1. printf() - Output Function

printf() = Print Format - Screen meeda emaina chupinchali ante printf() vadali.

printf("Hello World");
printf("My age is %d", 22);

2. scanf() - Input Function - SUPER IMPORTANT!

scanf() = Scan Format - User nundi value teesukodaniki vadetadi. & (Ampersand) marchipokandi!

⚠️ Golden Rule: scanf lo & symbol compulsory!
scanf("%d", &age); ✅ Correct
scanf("%d", age); ❌ Wrong - Program crash avtundi

3. Full Example - Sum of Two Numbers

#include <stdio.h>

int main() {
    int a, b, sum;
    
    printf("Enter first number: ");
    scanf("%d", &a);
    
    printf("Enter second number: ");
    scanf("%d", &b);
    
    sum = a + b;
    
    printf("Sum = %d", sum);
    
    return 0;
}
Output - User 5 & 10 type chesthe:
Enter first number: 5
Enter second number: 10
Sum = 15

4. Different Data Types Input

TypeCode
intscanf("%d", &num);
floatscanf("%f", &marks);
charscanf(" %c", &ch); // Space important
Stringscanf("%s", name); // & vaddu

5. Practice Task for You!

🎯 Task: User nundi Name, Age, Marks teesukoni - Print cheyandi

Expected Output:
Enter your name: Suresh
Enter age: 22
Enter marks: 88.5

Name: Suresh, Age: 22, Marks: 88.5

🎯 Next Post: Operators in C Language - Full List with Examples

Task complete chesi comment cheyandi - Doubt unte adagandi!

No comments:

Post a Comment

Abstraction in Java - Explained in Simple Words with Examples in Telugu | LearnTechSoft Abstraction in Java - Explained in Simpl...