There are several types of data used in a code, all with different characteristics, uses and parameters. The main basic types are: characters, integers, floating points and boolean. In order to determine the type of data, one must first declare a variable which is done by writting:<\/p>\n
Type NameofVariable;<\/p>\n
Type would be:<\/p>\n
–Character<\/strong>: Characters are any symbol such as letters or numbers. They are declared by writting char and at they aren’t recommended to be used in operations since they only represent a character. They are useful if you wish to input a symbol. In case you want to input a message or code you could use a string in which case you would need to include the library string.\u00a0<\/p>\n –Integer:\u00a0<\/strong>Any number without decimals. They are declared by writting the type int and are useful for mathematical operations and determining conditionals. In case a value with a decimal is declared as an int, the program will turn it to the lower bound, for instance 1.999 would be 1.\u00a0<\/p>\n –Floating Point:\u00a0<\/strong>A floating point is any number, including decimals. They are declared by writting float or in case of a bigger number double. They are useful in cases which require precision with numbers such as the area of a circle or a logarithm.\u00a0<\/p>\n –Boolean:\u00a0<\/strong>Might only hold a value of 1 or 0. It’s declared by writting bool before the name of the variable. They are useful in conditionals, to determine wether an action should be done or not by acting as a true or false statement.\u00a0<\/p>\n Here’s an example of the types in a code:<\/p>\n <\/p>\n \u00a0<\/p>\n I did a research and found this page which explains the types and their parameters: http:\/ Thanks for watching! #TC1017<\/a> #Mastery9<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":" There are several types of data used in a code, all with different characteristics, uses and parameters. The main basic types are: characters, integers, floating points and boolean. In order to determine the type of data, one must first declare a variable which is done by writting:<\/p>\n Type NameofVariable;<\/p>\n Type would be:<\/p>\n –Character<\/strong>: Characters are any symbol such as letters or numbers. They are declared by writting char and at they aren’t recommended to be used in operations since they only represent a character. They are useful if you wish to input a symbol. In case you want to input a message or code you could use a string in which case you would need to include the library string. <\/p>\n –Integer: <\/strong>Any number without decimals. They are declared by writting the type int and are useful for mathematical operations and determining conditionals. In case a value with a decimal is declared as an int, the program will turn it to the lower bound, for instance 1.999 would be 1. <\/p>\n –Floating Point: <\/strong>A floating point is any number, including decimals. They are declared by writting float or in case of a bigger number double. They are useful in cases which require precision with numbers such as the area of a circle or a logarithm. <\/p>\n –Boolean: <\/strong>Might only hold a value of 1 or 0. It’s declared by writting bool before the name of the variable. They are useful in conditionals, to determine wether an action should be done or not by acting as a true or false statement. <\/p>\n Here’s an example of the types in a code:<\/p>\n <\/p>\n <\/p>\n I did a research and found this page which explains the types and their parameters: http:\/\/www.cplusplus.com\/doc\/tutorial\/variables\/<\/a><\/p>\n Thanks for watching! #TC1017<\/a> #Mastery9<\/a><\/p>\n<\/div>\n","protected":false},"author":226,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3],"tags":[40,372],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/20933"}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/users\/226"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/comments?post=20933"}],"version-history":[{"count":3,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/20933\/revisions"}],"predecessor-version":[{"id":22494,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/20933\/revisions\/22494"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media?parent=20933"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/categories?post=20933"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/tags?post=20933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}