C provides various types of data-types which allow the programmer to select the appropriate type for the variable to set its value. Data-type is used to identify the type of the variable when it declare. And also used in identify the type of the value returned by the function.
C have three type of the data-type:-
- Primary (built-in ) data types:- Void , int , char, float, double.
- Derived data Types :- Array , pointer .
- User define data types :- structure , union and enumeration .
Void:- It holds no value and is generally used for specifying the type of function or what it returns. If the function has a void type, it means that the function will not return any value.
Int :- It is used to declare the integer type values. For int we use %d .
Char :- it is used for character type values. For char we use %c .
float , Double :- It is used for floating numbers. For float we use %f and for double we use %lf.
All the data type have a specific range they can not store the value greater than that range value . and range of the data type is depending on the compiler (16 bit or 32 bit) .
Video Lecture:-
<<Pre - warmup program Next - Operators in C>>
Recommended Post:
Hackerearth Problems:-
- Very Cool numbers | Hacker earth solution
- Vowel Recognition | Hackerearth practice problem solution
- Birthday party | Hacker earth solution
- Most frequent | hacker earth problem solution
- program to find symetric difference of two sets
- cost of balloons | Hacker earth problem solution
- Chacha o chacha | hacker earth problem solution
- jadu and dna | hacker earth solution
- Bricks game | hacker earth problem
- Anti-Palindrome strings | hacker earth solution
- connected components in the graph | hacker earth data structure
- odd one out || hacker earth problem solution
- Minimum addition | Hackerearth Practice problem
- The magical mountain | Hackerearth Practice problem
- The first overtake | Hackerearth Practice problem
Data structure:-
- Program to find cycle in the graph
- Implementation of singly link list
- Implementation of queue by using link list
- Algorithm of quick sort
- stack by using link list
- program to find preorder post order and inorder of the binary search tree
- Minimum weight of spanning tree
- Preorder, inorder and post order traversal of the tree
Key points:-
- How to set limit in the floating value in python
- What is boolean data type
- How to print any character without using format specifier
MCQs:-
0 Comments