Monday, January 9, 2017
Knowing data mode input and output in C
Knowing data mode input and output in C
Knowing data mode, input and output in C++ is suitable for newbie.
1. Constants.
Constants is a variable that has permanent value. There are two contants : numeric and text.
Numeric Constants.
- Integer constatns. (example : 1,2,3....n)
- Floating point contant. (example : 5.57)
- Double precision constants (similar with floating point but it has biggest value than floating point)
- Character : only contains a character.
- String : combination of character.
- const data_type contants_name = value_of_cantants;
- example : const int x = 89;
Variable is a place to save a data or constants temporarily in the memory. The value can be change when the program is running. Variable must be written one word, not space, can be written with _ and cant be written by starting with numeric or aritmetic.
The types of variables is also same with constants, numeric variable and text variable.
How to declare a variable :
Declartion : data_type name_of_variable;
Example : int x_ray; char grade; float average;
3. Output Task.
Did you know what output task is ?
Output task in c++ is used to show the output of the program you have made.
There are some standart output task that often be used are :
1. printf();
2. puts();
3. putchar();
4. cout<<;
5. getch();
6. getche();
4. Ouput task.
Did you know what output task is ?
Output task in c++ is used to input impotant data that you need in the program that you have made.
There are some Standart input task that often be used are :
1. cin>>;
2. scanf();
For this chance I share that definition, in order to show you C++ genereally.
For the usage of output or input task, I will show in the next chance.
To be continue..
I will continue this Knowing data mode, input and ou.tput in C++ in the next time...
Available link for download