This repository contains programs in the C programming language.
![](https://private-user-images.githubusercontent.com/105432776/260073578-1a5ed510-e769-4f8d-9f73-e53bc738d14b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzMDYxNjYsIm5iZiI6MTcyNDMwNTg2NiwicGF0aCI6Ii8xMDU0MzI3NzYvMjYwMDczNTc4LTFhNWVkNTEwLWU3NjktNGY4ZC05ZjczLWU1M2JjNzM4ZDE0Yi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyMlQwNTUxMDZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05ZTA0MmI1M2Q0MGMwMmE2NDAyYTAyOWUzZmIxNDg3NWUwMzlmYWQyODQzOTBjZjdjODYyOWQ2NGE5OWI3NWYyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.h8dVl2xOqL898nbVwDk86AEiHMOpfo6kS3rzpik6yHU)
--> C is a general-purpose programming language.
--> It is Procedural Programming language.
--> It has been used to develop operating systems, databases and applications.
--> It is Middle Level Programming language and gives more control to Programmer.
--> GCC stands for GNU C/C++ Compiler.
--> To begin with GCC, visit the official website
--> Download GCC according to the platform being used like Linux, MacOs or Windows.
--> Follow the setup wizard.
--> Write c code in any text editor or IDE and save it with .c extention.
--> Then just open the console and run this command -
gcc filename.c -o Output
--> Filename is the name of the C script file and Output is the name of the output file.
--> After this command is executed, if the code is successfully compiled output file will be saved in the same location as the code file.
--> Once this Output file is executed in command prompt, the output will be displayed.
Primitive data types are the most basic data types that are used for representing simple values such as integers, float, characters, etc.
--> The integer datatype in C is used to store the whole numbers without decimal values.
--> Octal values, hexadecimal values, and decimal values can be stored in int data type in C.
- Range: -2,147,483,648 to 2,147,483,647
- Size: 4 bytes
- Format Specifier: %d
--> Float in C is used to store decimal and exponential values.
--> It is used to store decimal numbers (numbers with floating point values) with single precision.
- Range: 1.2E-38 to 3.4E+38
- Size: 4 bytes
- Format Specifier: %f
--> The size of the character is 1 byte. It is the most basic data type in C.
--> It stores a single character and requires a single byte of memory in almost all compilers.
- Range: (-128 to 127) or (0 to 255)
- Size: 1 byte
- Format Specifier: %c
--> It does not provide a result value to its caller.
--> It has no values and no operations.
--> It is used to represent nothing. Void is used in multiple ways as function return type, function arguments as void, and pointers to void.
--> In computer programming, an enumerated type (also called enumeration) is a data type consisting of a set of named values called elements, members, enumeral, or enumerators of the type.
--> The enumerator names are usually identifiers that behave as constants in the language.
--> Enumeration (or enum) is a user defined data type in C. It is mainly used to assign names to integral constants, the names make a program easy to read and maintain.
--> The keyword ‘enum’ is used to declare new enumeration types in C.
The data-types that are derived from the primitive or built-in datatypes are referred to as Derived Data Types. --> An array in C is a fixed-size collection of similar data items stored in contiguous memory locations.
--> It can be used to store the collection of primitive data types such as int, char, float, etc., and also derived and user-defined data types such as pointers, structures, etc.
--> Pointers are symbolic representations of addresses.
--> They enable programs to simulate call-by-reference as well as to create and manipulate dynamic data structures.
--> Iterating over elements in arrays or other data structures is one of the main use of pointers.
--> The structure in C is a user-defined data type that can be used to group items of possibly different types into a single type.
--> The struct keyword is used to define the structure in the C programming language.
--> The items in the structure are called its member and they can be of any valid data type.
--> A union is a special data type available in C that allows to store different data types in the same memory location.
--> Union can be defined with many members, but only one member can contain a value at any given time.
--> Unions provide an efficient way of using the same memory location for multiple-purpose.
- Drop a 🌟 if you find this repository useful.
- If you have any doubts or suggestions, feel free to reach me.
📫 How to reach me: - Contribute and Discuss: Feel free to open issues 🐛, submit pull requests 🛠️, or start discussions 💬 to help improve this repository!