{"id":17,"date":"2017-12-18T10:17:03","date_gmt":"2017-12-18T10:17:03","guid":{"rendered":"http:\/\/lotusithub.com\/blog\/?p=17"},"modified":"2017-12-18T10:17:03","modified_gmt":"2017-12-18T10:17:03","slug":"c-programming","status":"publish","type":"post","link":"https:\/\/lotusithub.com\/blog\/c-programming\/","title":{"rendered":"C Programming"},"content":{"rendered":"<p><a href=\"http:\/\/lotusithub.com\/c-cpp-training-course-pune.html\">C is a programming language <\/a> developed at AT&amp;T\u2019s Bell Laboratories of USA in 1972.It was designed and written by a man named Dennis Ritchie.<br \/>\nThere were many languages discovered before C like BCPL IN 1969,B in 1970 but all were failed in the long run.<\/p>\n<h3>Facts about C<\/h3>\n<p>\u2022 C was invented to write an operating system called UNIX.<br \/>\n\u2022 The language was formalized in 1988 by the American National Standard Institute (ANSI).<br \/>\n\u2022 Today\u2019s most popular Linux OS and RDBMS MySQL have been written in C.<br \/>\n\u2022 Iphone ,Twitter website and most of the antiviruses are also written in C.<br \/>\n\u2022 Turbo C++ is a popular compiler for C language.<\/p>\n<h3>Features of C<\/h3>\n<p>\u2022 C is a middle-level programming language.<br \/>\n\u2022 C is the mother level of other programming languages.<br \/>\n\u2022 C is a case-sensitive language.<br \/>\n\u2022 C is a procedure-oriented language.<br \/>\n\u2022 C supports top to bottom process.<br \/>\nUses of C in daily life<\/p>\n<p>\u2022 Major parts of operating systems like Windows,UNIX,Linux and Android are written in C.<br \/>\n\u2022 Mobile devices like Smartphones and tablets are getting smarter due to programs and operating systems which are builded by C language.<br \/>\n\u2022 Most of the 3D computer games are fast just<br \/>\nBecause of C which is the builder of most of the gaming frameworks.<\/p>\n<h3>Getting Started With C<\/h3>\n<p>\u2022 Preprocessor-The preprocessor offers several features called preprocessor directives.Each of these begins with a # symbol and are often placed at the beginning of the program.<br \/>\n\u2022 Header file-is a library file which contains all the functions.<br \/>\n# include is the preprocessor directive for C and C++,which contains all header files which contains functions.<br \/>\nis a type of header file which means \u2018standard input and output\u2019.It contains all the functions like printf ,scanf.<br \/>\nis a type of header file which means \u2018console input and output\u2019 .It contains all the functions like getch();clrscr().<br \/>\n\u2018.h\u2019 is the extension for header files.<br \/>\nKeywords-There are 32 keywords reserved in C language.<br \/>\n\u2018void\u2019 is a keyword which does not return anything.<br \/>\nmain() means startup of a code.<br \/>\n\u2018printf\u2019 is used to get the output whereas\u2019 scanf\u2019 is used to give the input with respect to a certain function and a symbol of &amp;(ampersand) is used with the variable inside the \u2018scanf\u2019 function.<br \/>\n\u2018comment\u2019 is used to hide the line.<\/p>\n<h3>Symbol of comment-\u2018\/\/\u2019<\/h3>\n<p>\u2018getch()\u2019-is used to identify the function.<br \/>\n&#8211; Is used to hold the console screen.<br \/>\n{-\u2018start\u2019<br \/>\n}-\u2018closure of the source code\u2019<\/p>\n<h3>Data Type<\/h3>\n<p>Data type refers to an extensive system used for declaring variables or functions of different types.Data type is used for memory allocation which stores some data.<\/p>\n<table style=\"    border: 1px solid black;\">\n<tbody>\n<tr>\n<td width=\"101\">\n<p>Nature<\/p>\n<\/td>\n<td width=\"90\">\n<p>Values<\/p>\n<\/td>\n<td width=\"91\">\n<p>Datatype<\/p>\n<\/td>\n<td width=\"97\">\n<p>Size<\/p>\n<\/td>\n<td width=\"172\">\n<p>Range<\/p>\n<\/td>\n<td width=\"86\">\n<p>Format Specifire<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"101\">\n<p>Integer<\/p>\n<\/td>\n<td width=\"90\">\n<p>10<\/p>\n<\/td>\n<td width=\"91\">\n<p>int<\/p>\n<\/td>\n<td width=\"97\">\n<p>2 bytes<\/p>\n<\/td>\n<td width=\"172\">\n<p>-32768to32768<\/p>\n<\/td>\n<td width=\"86\">\n<p>%d<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"101\">\n<p>Decimal<\/p>\n<\/td>\n<td width=\"90\">\n<p>22.24<\/p>\n<\/td>\n<td width=\"91\">\n<p>float<\/p>\n<\/td>\n<td width=\"97\">\n<p>4 bytes<\/p>\n<\/td>\n<td width=\"172\">\n<p>-3.4*e^10^(-8) to 3.4*e^10(8)<\/p>\n<\/td>\n<td width=\"86\">\n<p>%f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"101\">\n<p>Character<\/p>\n<\/td>\n<td width=\"90\">\n<p>&lsquo;a&rsquo;<\/p>\n<\/td>\n<td width=\"91\">\n<p>char<\/p>\n<\/td>\n<td width=\"97\">\n<p>1 byte<\/p>\n<\/td>\n<td width=\"172\">\n<p>-128 to 127<\/p>\n<\/td>\n<td width=\"86\">\n<p>% c<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Some symbols-\\t \u2013used for space<br \/>\n\\n-used for newline<\/p>\n<h3>Operators<\/h3>\n<p>An operator is a symbol that tells the compiler to perform specific mathematical or logical functions.<br \/>\n<b>Types of operators-<\/b><\/p>\n<ol>\n<li>\n Arithmetic Operators- +,-,*,\/<\/li>\n<li> Relational Operators- a&lt;b,a&gt;b,a&lt;=b,a&gt;=b,a==b\n<li> Logical Operators-AND, OR, NOT\n<li>Bitwise Operators-&gt;&gt; which means if 9&gt;&gt;2;9\/2*2=2<br \/>\n&lt;&lt; which means if 2&lt;&lt;0;2*2*0=2<\/p>\n<li>Assignment Operators-<br \/>\nIf a=10 and a=b implies that \u2018b\u2019 is assigned to \u2018a\u2019(right to left).<br \/>\nAlso , a+ =a+b<\/p>\n<li>Procedure Association-<br \/>\na=10+20-5*7\/9%2;<br \/>\nb=100*100+100*100;<\/li>\n<li> Increment or Decrement-<\/li>\n<p>These are of two types-<br \/>\nPre increment (or pre decrement) and Post decrement(or post decrement).<\/p>\n<h4><a href=\"http:\/\/lotusithub.com\/c-cpp-training-course-pune.html\"> C++ Classes in Pune<\/a><\/h4>\n","protected":false},"excerpt":{"rendered":"<p>C is a programming language developed at AT&amp;T\u2019s Bell Laboratories of USA in 1972.It was&hellip;<\/p>\n","protected":false},"author":1,"featured_media":36,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-17","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-programing"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/lotusithub.com\/blog\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lotusithub.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lotusithub.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lotusithub.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lotusithub.com\/blog\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":0,"href":"https:\/\/lotusithub.com\/blog\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lotusithub.com\/blog\/wp-json\/wp\/v2\/media\/36"}],"wp:attachment":[{"href":"https:\/\/lotusithub.com\/blog\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lotusithub.com\/blog\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lotusithub.com\/blog\/wp-json\/wp\/v2\/tags?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}