Posts

Showing posts with the label C

Data type in C Programming Language

Data Types in C : C supports the following basic data types: int: integer, a whole number. float: floating point, a number with a fractional part. double: double-precision floating point value. char: single character. The amount of storage required for each of these types varies by platform. C has a built-in sizeof operator that gives the memory requirements for a particular data type. For example: #include <stdio.h> int main() {     printf("int: %ld \n", sizeof(int));     printf("float: %ld \n", sizeof(float));     printf("double: %ld \n", sizeof(double));     printf("char: %ld \n", sizeof(char));     return 0; } The program output displays the corresponding size in bytes for each data type. The printf statements in this program have two arguments. The first is the output string with a format specifier (%ld), while the next argument returns the sizeof value. In the final output, the %ld (for long decimal) ...

Introduction of C programming language

C is a general-purpose programming language that has been around for nearly 50 years. C has been used to write everything from operating systems (including Windows and many others) to complex programs like the Python interpreter, Git, Oracle database, and more. The versatility of C is by design. It is a low-level language that relates closely to the way machines work while still being easy to learn.