Tag Archives: C-Basic

C Comments

Prerequisite – C Language Introduction C comments explain code and improve readability. These do not affect program execution. You can use comments in C to clarify code and describe algorithms. There are two types of comments in C: single-line (//) commnets and multi-line (/* */) comments. 1. Single-line comments start with “//” and end at the end of the… Read More »

C Programming Language Standard

Prerequisite – C Language Introduction The C programming language has various versions: C89/C90, C99, C11, and C18. C89/C90: Released in 1989/1990. It introduced key language features. C99: This brought new features like variable-length arrays and complex numbers. C11: This added _Generic, static_assert, and library updates. C18: It is latest standard, with clarifications and updates. Advantages: 1. Efficiency: C… Read More »

C Language Introduction

C is a programming language developed by Dennis Ritchie in 1972. It has a significant historical impact. It was originally created at Bell Laboratories of AT&T Labs for building the UNIX operating system. Key Features of C C is a versatile and general-purpose programming language. It is portable across different systems and platforms. So it suitable for various… Read More »

What is string.h and why do we use?

The string.h header defines one variable type, one macro, and various functions for manipulating arrays of characters. Functions provided by string.h The string.h header file declares a set of functions to work strings. To perform operations like comparison, concatenation, and copying, this string.h library is widely used. This header file defines several functions to manipulate C strings and… Read More »

What is math.h and why do we use?

math.h is a header file in the C Standard Library, which is commonly used in C programming. It is designed for basic mathematical operations. This header file defines a set of functions and macros that provide mathematical functions capabilities for C programs. Some of the most commonly used functions in math.h are sqrt, log, sin, cos, tan, exp,… Read More »

String in C

In C programming language, a string is a sequence of characters that are stored in an array of characters. The string is terminated with a null character (‘\0’) which marks the end of the string. In C, strings are stored as arrays of characters, and each character in the array represents a character in the string. For example,… Read More »

C Literals

In the C programming language, a literal is a value that appears directly in the source code. There are several types of literals in C, including: Integer literals – An integer literal is a whole number without a fractional component, such as 42 or -17. int a = 42; long b = -17; unsigned int c = 123456;… Read More »

C Basic Commands

C is a high-level programming language that was developed in the 1970s and is still widely used today. It is used to develop a wide range of applications, including system software, games, and desktop and mobile applications. Here are some of the most commonly used C commands: printf: This function is used to display output on the screen.… Read More »

Variables in C | Set 1

Variables in C In C, a variable is a storage location that has a name and holds a value. A variable must be declared before it is used in a program. The syntax for declaring a variable in C is: where data_type is the type of the data that the variable will store, and variable_name is the name… Read More »

Best C Compilers

Here are some of the best C compilers: GCC (GNU Compiler Collection): GCC is one of the most popular and widely used compilers for C and other programming languages. It is an open-source compiler and supports multiple platforms including Windows, Linux, and macOS. Clang: Clang is an open-source compiler that is developed by the LLVM project. It is… Read More »