Wikipedia

Hasil penelusuran

Minggu, 27 September 2015

C Data Types , Input & Output.

1. Data Types

C provides various data types that can be used in your programs.  

As a beginner , I  commonly use:
  • int for most variables and "countable" things (for loop counts, variables, events) , Format :  %d
  • char for characters and strings , Format :%c / %s
  • float for general measurable things (seconds, distance, temperature) , Format  %f  

  • double  as i know ,almost the same as Float, but more precise , Format %lf

 There are still a lot of data types in C , You can check wikipedia for more precise:

https://en.wikipedia.org/wiki/C_data_types 

Here is a few  i get from other resources :

https://developer.mbed.org/handbook/C-Data-Types 





2. Input & Output

Input    : In  programming language input means to feed some data into program. This can be given in the form of file or from command line.

Output : In any programming language output means to display some data on screen, printer or in any file.



In input , I mostly use function "scanf" in the command line
 and In output , the example i can give to you is function "printf". as a beginner ill show you the example of all the above explanation in 1 pic. this the tutorial for calculating the volume of a Sphere:



 

 Other resources : 
http://www.tutorialspoint.com/ansi_c/c_input_output.htm

Hope this will help ^^ .
Peace!
  
Input Redirection :
https://chortle.ccsu.edu/java5/Notes/chap22/ch22_2.html







Tidak ada komentar:

Posting Komentar