{"id":446,"date":"2023-02-12T02:20:47","date_gmt":"2023-02-12T02:20:47","guid":{"rendered":"https:\/\/aipsacademy.com\/blogs\/?p=446"},"modified":"2023-02-12T02:20:49","modified_gmt":"2023-02-12T02:20:49","slug":"console-input-output-in-c-with-example","status":"publish","type":"post","link":"https:\/\/aipsacademy.com\/blogs\/2023\/02\/12\/console-input-output-in-c-with-example\/","title":{"rendered":"Console Input Output in C++ with Example"},"content":{"rendered":"\n<p><strong>In this tutorial we are going to learn console input output int&nbsp;<\/strong><a href=\"https:\/\/www.nipsacademy.com\/blogs\/c-programming-language-tutorial\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>C++<\/strong><\/a><strong>&nbsp;with example in very easy way.<\/strong><\/p>\n\n\n\n<p><strong>Input through keyboard and output on the&nbsp;<\/strong><a href=\"https:\/\/en.wikipedia.org\/wiki\/Computer_monitor\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>monitor\/ screen<\/strong><\/a><strong>&nbsp;is known as console input output.<\/strong><\/p>\n\n\n\n<p><strong><ins>To perform input \/output operations , there are various&nbsp;<a href=\"https:\/\/www.nipsacademy.com\/blogs\/method-function-overloading-in-c\/\" target=\"_blank\" rel=\"noreferrer noopener\">functions.<\/a><\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>console input \/ output can be divided into two categories.<\/ins><\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li><strong><ins>Unformatted input \/ output functions<\/ins><\/strong><strong><\/strong><\/li><li><strong><em><ins>Formatted input \/ output functions<\/ins><\/em><\/strong><strong><\/strong><\/li><\/ol>\n\n\n\n<p><strong><ins>Unformatted input \/ output functions<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>It is mainly used for characters. No any control string is used.<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>Unformatted input functions<\/ins><\/strong><strong><\/strong><\/p>\n\n\n\n<p><strong><ins>1. getch()<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>It takes entry of a single character. Entered key doesn\u2019t display on the screen . It has defined in #include&lt;conio.h&gt; header file.<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>2. getche()<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>It takes a single character and very similar to getch( ). Entered character prints on the screen . It has defined in #include&lt;conio.h&gt; header file.<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>3. getchar()<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>It is used to take entry of single character form keyboard. It has defined in #include&lt;stdio.h&gt; header file.<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>4. gets()<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>It is used to take entry of a string(more than one words at a time) from the keyboard. It has defined in #include&lt;stdio.h&gt; header file.<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>Unformatted output functions<\/ins><\/strong><strong><\/strong><\/p>\n\n\n\n<p><strong><ins>1. putch( )<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>It displays the character on the screen. It has defined in #include&lt;conio.h&gt; header file.<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>2. putchar( )<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>It displays the character on the screen. It has defined in #include&lt;stdio..h&gt; header file.<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>3.puts( )<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>It is used to display string on the monitor. It has defined in #include&lt;stdio.h&gt; header file.<\/ins><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial we are going to learn console input output int&nbsp;C++&nbsp;with example in very easy way. Input through keyboard and output on the&nbsp;monitor\/ screen&nbsp;is known as console input output. To perform input \/output operations , there are various&nbsp;functions. console input \/ output can be divided into two categories. Unformatted input \/ output functions Formatted [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":447,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5,3,9,7,8,6],"tags":[],"class_list":["post-446","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-11th-computer-science","category-12th-computer-science","category-bca","category-cbse-12th-computer-science","category-cbse","category-jac-12th-computer-science","category-jac"],"_links":{"self":[{"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/posts\/446","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/comments?post=446"}],"version-history":[{"count":1,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/posts\/446\/revisions"}],"predecessor-version":[{"id":448,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/posts\/446\/revisions\/448"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/media\/447"}],"wp:attachment":[{"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/media?parent=446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/categories?post=446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/tags?post=446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}