The Explanation of each data types in C



         In the C programming languange, the functions of data types is for declaring variables or functions of every different data types. 

Let's Check it out !

Data Types

1. Int

Basic signed integer type. Capable of containing at least the [−32767 s/d +32767] range. It is at least 16 bits in size.

The format of Int is %d

2. Char

Actually this data type can be either signed or unsigned depending on the implementation.

The format of Char is %c

3. Float

This data type usually reffered to as a single float type and used for decimal number of  mathematic problems.

The format of Float is %f 

4. Double

The float type, usually referred to as a double-precision floating-point type. Actual properties unspecified (except minimum limits). the different float with double is the range data.

The format of Double is %lf

   

Scanf ()
  
For reading the input from the users we use scanf. because scanf reads formatted byte input from stdin.

Printf ()

For Writing an output we use Printf, because Printf prints formatted byte output to stdout, a file stream or a buffer.

The format can be a simple constant string, but you can specify %d, %c, %f, %lf, etc. to print or read integer, character or float respectively. There are many other formatting options available which can be used based on requirements.

0 komentar:

Posting Komentar

Diberdayakan oleh Blogger.

Text Widget

Popular Posts

Recent Posts

Copyright © 2025/ Learn About C / C++

Template by : Urangkurai / powered by :blogger