0% found this document useful (0 votes)
4 views

c_programming_notes

C is a general-purpose programming language developed in the 1970s, known for its low-level memory access and use in system/software development. The document outlines the basic structure of a C program, data types, control structures, functions, pointers, arrays, structures, and file handling. Key concepts include the syntax for defining functions, using pointers, and performing file operations.

Uploaded by

Soumya Mahbub
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)
4 views

c_programming_notes

C is a general-purpose programming language developed in the 1970s, known for its low-level memory access and use in system/software development. The document outlines the basic structure of a C program, data types, control structures, functions, pointers, arrays, structures, and file handling. Key concepts include the syntax for defining functions, using pointers, and performing file operations.

Uploaded by

Soumya Mahbub
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/ 2

C Programming Notes

1. Introduction to C

C is a general-purpose, procedural programming language developed in the early 1970s by Dennis

Ritchie. It provides low-level access to memory and is widely used for system/software

development.

2. Basic Structure of a C Program

#include <stdio.h>

int main() {

printf("Hello, World!\n");

return 0;

3. Data Types in C

Primary data types: int, float, char, double

Derived data types: array, pointer, structure, union

Qualifiers: signed, unsigned, long, short

4. Control Structures

Conditional: if, if-else, switch

Loops: for, while, do-while

Jump: break, continue, goto, return

5. Functions

A function is a block of code that performs a specific task. Syntax:

return_type function_name(parameters) {

// body
}

6. Pointers

A pointer is a variable that stores the memory address of another variable. Use * for value at

address, & for address of a variable.

7. Arrays and Strings

Array is a collection of elements of the same type. Strings are arrays of characters ending with a null

character '\0'.

8. Structures

Structures are user-defined data types that group related variables of different types. Syntax:

struct StructName {

int a;

char b;

};

9. File Handling

C provides functions like fopen, fclose, fprintf, fscanf for file operations. Modes include "r", "w", "a",

"r+", etc.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy