|1. Introduction to C
Chapter 1C Language Tutorial~1 min read

Introduction to C

C Language म्हणजे काय?

C ही एक general-purpose, compiled programming language आहे. Dennis M. Ritchie यांनी 1970 च्या दशकात Bell Laboratories मध्ये बनवली. UNIX operating system पूर्णपणे C मध्ये लिहिला आहे. C ही सगळ्या modern languages ची आई आहे — Python, Java, C++ सगळ्यांवर C चा प्रभाव आहे.

Marathi Analogy

C म्हणजे सायकल शिकण्यासारखे आहे — कठीण वाटते, पण एकदा शिकलो की bike, car, truck सगळे सोपे होते. C शिकलो की Python, Java, C++ खूप लवकर शिकता येते!

C कुठे वापरतात?

  • Operating Systems — Linux, Windows kernel C मध्ये आहे
  • Embedded Systems — मायक्रोवेव्ह, washing machine, car ECU
  • Databases — MySQL, PostgreSQL C मध्ये लिहिला
  • Web Servers — Apache, NGINX
  • Programming Languages — Python interpreter C मध्ये आहे!
  • Game engines आणि graphics libraries

C चे Features

  • Fast — Python/Java पेक्षा खूप जलद — directly machine code होतो
  • Portable — एकदा लिहा, सगळ्या platforms वर run होतो
  • Low-level control — memory directly manage करता येते
  • Structured — functions वापरून organized code लिहिता येतो
  • Foundation — C++ आणि Java चा syntax C वरूनच आला

C चा पहिला program — Hello World

c
#include <stdio.h>   // Standard Input/Output header

int main() {         // main function — program इथून सुरू होतो
    printf("नमस्कार! C Language मध्ये स्वागत!\n");
    printf("Hello, World!\n");
    return 0;        // 0 = program successfully संपले
}
📌

#include <stdio.h> — हे header file import करतो ज्यात printf() आणि scanf() functions आहेत. C मध्ये हे विसरले तर compile होणार नाही.

Key Points — लक्षात ठेवा

  • C = Dennis Ritchie, Bell Labs, 1970s — UNIX साठी बनवली
  • Compiled language — source code → machine code → execute
  • Fast, portable, low-level memory control
  • main() — program चा entry point
  • #include <stdio.h> — input/output साठी header
  • return 0 — program successfully संपले हे OS ला सांगतो
0/12 chapters पूर्ण