Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
72 views6 pages

C Language Detailed Short Notes Hinglish

This document provides detailed notes on the C programming language, covering its introduction, structure, data types, variables, input/output, operators, control statements, loops, arrays, functions, pointers, strings, structures, and file handling. Each section includes definitions, syntax, and examples to illustrate the concepts. The notes are presented in Hinglish, making them accessible to a wider audience.

Uploaded by

DANISH Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views6 pages

C Language Detailed Short Notes Hinglish

This document provides detailed notes on the C programming language, covering its introduction, structure, data types, variables, input/output, operators, control statements, loops, arrays, functions, pointers, strings, structures, and file handling. Each section includes definitions, syntax, and examples to illustrate the concepts. The notes are presented in Hinglish, making them accessible to a wider audience.

Uploaded by

DANISH Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

C Language Short Notes (Hinglish) - Detailed

1. Introduction to C

Definition:

C ek general-purpose programming language hai jo fast, efficient aur system-level programming ke liye use

hoti hai.

Syntax:

Koi specific syntax nahi hota introduction ka, lekin har C program ka structure fix hota hai.

Example:

Ek simple hello world program:

#include <stdio.h>

int main() {

printf("Hello World");

return 0;

2. Structure of C Program

Definition:

Har C program kuch basic parts mein divided hota hai: Header files, main function, statements.

Syntax:

#include <header_file>

int main() {

// code

return 0;

Example:

#include <stdio.h>

int main() {

printf("C Program Structure");

return 0;

}
C Language Short Notes (Hinglish) - Detailed

3. Data Types

Definition:

Data types batate hain ki kisi variable mein kis type ka data store hoga (int, float, char, etc).

Syntax:

data_type variable_name;

Example:

int a = 10;

float b = 3.14;

char ch = 'A';

4. Variables and Constants

Definition:

Variable ek container hota hai jo data ko store karta hai. Constant ki value program ke dauraan change nahi

hoti.

Syntax:

int x = 5;

const float pi = 3.14;

Example:

int age = 18;

const int roll = 101;

5. Input/Output

Definition:

Input lene ke liye scanf() aur output dene ke liye printf() ka use hota hai.

Syntax:

scanf("%d", &var);

printf("%d", var);

Example:

int a;

scanf("%d", &a);
C Language Short Notes (Hinglish) - Detailed

printf("Value = %d", a);

6. Operators

Definition:

Operators program mein calculations aur comparisons ke liye use hote hain.

Syntax:

a + b, a - b, a * b, a / b, a % b

Example:

int a = 10, b = 5;

printf("Sum = %d", a + b);

7. Control Statements

Definition:

Yeh statements program ke flow ko control karte hain jaise decision making.

Syntax:

if(condition) {...} else {...}

switch(variable) {...}

Example:

int a = 10;

if(a > 5) {

printf("Greater than 5");

} else {

printf("Less or equal to 5");

8. Loops

Definition:

Looping se ek block of code baar baar execute hota hai jab tak condition true ho.

Syntax:

for(init; cond; inc) {...}


C Language Short Notes (Hinglish) - Detailed

while(cond) {...}

do {...} while(cond);

Example:

for(int i = 1; i <= 5; i++) {

printf("%d ", i);

9. Arrays

Definition:

Array ek collection hota hai similar type ke elements ka.

Syntax:

data_type array_name[size];

Example:

int arr[3] = {10, 20, 30};

printf("%d", arr[1]);

10. Functions

Definition:

Function ek reusable block of code hota hai jo specific task perform karta hai.

Syntax:

return_type function_name(parameters) {...}

Example:

int add(int a, int b) {

return a + b;

11. Pointers

Definition:

Pointer ek variable hota hai jo kisi aur variable ke address ko store karta hai.

Syntax:
C Language Short Notes (Hinglish) - Detailed

data_type *ptr = &var;

Example:

int a = 5;

int *p = &a;

printf("%d", *p);

12. Strings

Definition:

String character ka array hota hai jo last mein '\0' se terminate hota hai.

Syntax:

char str[] = "Hello";

Example:

char name[10] = "Amit";

printf("%s", name);

13. Structures

Definition:

Structure user-defined data type hai jo different type ke variables ko ek saath store karta hai.

Syntax:

struct structure_name {

data_type member1;

};

Example:

struct student {

int id;

char name[20];

};

14. File Handling

Definition:
C Language Short Notes (Hinglish) - Detailed

File handling se hum external files read/write kar sakte hain.

Syntax:

FILE *fp = fopen("file.txt", "r");

fclose(fp);

Example:

FILE *fp;

fp = fopen("data.txt", "w");

fprintf(fp, "Hello File");

fclose(fp);

You might also like