0% found this document useful (0 votes)
2 views3 pages

C Programming Beginner Notes

This document provides beginner notes on C programming, covering fundamental concepts such as data types, expressions, operators, arrays, pointers, and functions. It also explains file handling, sorting techniques, and the differences between structures and unions. Key syntax examples and definitions are included to aid understanding.

Uploaded by

preethambk3
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)
2 views3 pages

C Programming Beginner Notes

This document provides beginner notes on C programming, covering fundamental concepts such as data types, expressions, operators, arrays, pointers, and functions. It also explains file handling, sorting techniques, and the differences between structures and unions. Key syntax examples and definitions are included to aid understanding.

Uploaded by

preethambk3
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

C Programming - Simple Beginner Notes (Part A)

1. What is a data type?


Data type tells the computer what kind of data a variable stores.
Examples: int (whole numbers), char (single letter).

2. What is an expression?
An expression is a combination of values, variables, and operators that gives a result.
Example: a + b

3. What is an operator?
An operator is a symbol used to do work like addition or comparison.
Examples: +, -, *, /

4. What is an array?
An array stores many values of the same type in one variable.
Example: int num[3] = {10,20,30};

5. What is a two-dimensional array?


A two-dimensional array stores data in rows and columns like a table.

6. Return statement
Return statement sends a value back from a function.
Syntax: return value;

7. Pointer to pointer
A pointer to pointer stores the address of another pointer.

8. Variable
A variable is a name used to store data.
Example: char a='A'; char b='B';

9. Sorting techniques
Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, Quick Sort.

10. Pointer
A pointer stores the address of another variable.
Example: float *p1; float *p2;
11. Structure vs Union
Structure: separate memory for members.
Union: same memory shared.

12. Union
A union is a data type where all members share the same memory.

13. putc()
putc() writes one character to a file.
Syntax: putc(character, file_pointer);

14. Why structures are used?


Structures store different types of data together.

15. File in C
A file stores data permanently in a computer.

16. fopen()
Used to open a file.
Syntax: fopen("filename", "mode");

17. Linear Search


Checks items one by one until found.

18. Elements of user-defined function


Function declaration, function definition, function call.

19. Elements of user-defined function


Function declaration, function definition, function call.

20. Loop
A loop repeats code again and again.

21. String in C
A string is a group of characters.
Example: char name[] = "Hello";

22. Function
A function is a block of code that performs a task.
23. Pointer
A pointer stores the address of another variable.

24. Array of structures


Stores many structure records together.
Example: struct student s[5];

25. Union in C
A data type where members share same memory.

26. File opening mode


Tells how a file opens. Example: r (read), w (write), a (append).

27. fwrite()
Writes data to a file.
Syntax: fwrite(data, size, number, file_pointer);

28. fread()
Reads data from a file.
Syntax: fread(data, size, number, file_pointer);

29. Sequential Search


Another name for Linear Search. Checks items one by one.

You might also like