Format Specifiers
Format specifiers are used to describe the format of input and output in formatted string. It is different for different data types. It always starts with %
The following is the list of some commonly used format specifiers in C:
Format Specifier |
Description |
---|---|
%c |
For b type. |
%d |
For signed integer type. |
%f |
For float type. |
%lf |
Double |
%p |
Pointer |
%s |
String |
%u |
Unsigned int |
%% |
Prints % character |
C Cheat Sheet
This C Cheat Sheet provides an overview of both basic and advanced concepts of the C language. Whether you’re a beginner or an experienced programmer, this cheat sheet will help you revise and quickly go through the core principles of the C language.
In this Cheat Sheet, we will delve into the basics of the C language, exploring its fundamental concepts that lay the groundwork for programming. We will cover topics such as variables, data types, and operators, providing you with a solid understanding of the building blocks of C programming.