{"id":362,"date":"2018-04-06T07:06:46","date_gmt":"2018-04-06T07:06:46","guid":{"rendered":"http:\/\/www.vsit.in\/vsit-blog\/?p=362"},"modified":"2018-04-06T07:11:47","modified_gmt":"2018-04-06T07:11:47","slug":"usage-of-getch-function-in-c-or-c","status":"publish","type":"post","link":"https:\/\/www.vsit.in\/vsit-blog\/usage-of-getch-function-in-c-or-c\/","title":{"rendered":"Usage of getch() Function in C or C++"},"content":{"rendered":"<p>Usage of getch() Function in C or C++ : Like a scanf() function in c, getch() is also a predefined function to accept input and define in conio.h header file. scanf() accept only number or character as input, but getch() accept any key as input and work further.<\/p>\n<p><code><\/code><\/p>\n<pre>#include&lt;stdio.h&gt;\r\n#include&lt;conio.h&gt;\r\nvoid main()\r\n{\r\n\tchar ch;\r\n\tch=getch();\r\n\tprintf(\"\\n ASCII Code of Key : %d\",ch);\r\n}\r\n\r\nNote : Work with Turboc Editor\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Usage of getch() Function in C or C++ : Like a scanf() function in c, getch() is also a predefined [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-362","post","type-post","status-publish","format-standard","hentry","category-j2ee-training"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"shubhranshu shekhar","author_link":"https:\/\/www.vsit.in\/vsit-blog\/author\/shekhar\/"},"uagb_comment_info":0,"uagb_excerpt":"Usage of getch() Function in C or C++ : Like a scanf() function in c, getch() is also a predefined [&hellip;]","_links":{"self":[{"href":"https:\/\/www.vsit.in\/vsit-blog\/wp-json\/wp\/v2\/posts\/362","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vsit.in\/vsit-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vsit.in\/vsit-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vsit.in\/vsit-blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vsit.in\/vsit-blog\/wp-json\/wp\/v2\/comments?post=362"}],"version-history":[{"count":5,"href":"https:\/\/www.vsit.in\/vsit-blog\/wp-json\/wp\/v2\/posts\/362\/revisions"}],"predecessor-version":[{"id":367,"href":"https:\/\/www.vsit.in\/vsit-blog\/wp-json\/wp\/v2\/posts\/362\/revisions\/367"}],"wp:attachment":[{"href":"https:\/\/www.vsit.in\/vsit-blog\/wp-json\/wp\/v2\/media?parent=362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vsit.in\/vsit-blog\/wp-json\/wp\/v2\/categories?post=362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vsit.in\/vsit-blog\/wp-json\/wp\/v2\/tags?post=362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}