0% found this document useful (0 votes)
17 views20 pages

Understanding the Void Data Type in C

The document discusses primitive data types in C, including char, int, float, and double, which are used to store characters, integers, and decimal numbers with varying precision. It also explains the void data type, which indicates the absence of a value and is commonly used for functions that do not return a value or have empty parameters. Additionally, the document references the syntax of the printf() function.

Uploaded by

azraasalim143
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)
17 views20 pages

Understanding the Void Data Type in C

The document discusses primitive data types in C, including char, int, float, and double, which are used to store characters, integers, and decimal numbers with varying precision. It also explains the void data type, which indicates the absence of a value and is commonly used for functions that do not return a value or have empty parameters. Additionally, the document references the syntax of the printf() function.

Uploaded by

azraasalim143
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

4.

Void data type

I. Primitive Data Types


char: The most basic data type in C. It stores a single character and requires a single byte
of memory in almost all compilers.
int: As the name suggests, an int variable is used to store an integer.
float: It is used to store decimal numbers (numbers with floating point value) with single
precision.
double: It is used to store decimal numbers (numbers with floating point value) with
double precision.

void data type

The void data type means nothing or no value. Generally, the void is used to specify a function
which does not return any value. We also use the void data type to specify empty parameters of a
function.
The syntax of printf() function is given below:

You might also like