Scanf ,Printf, CLRSCR, Getch, & Comments in C
  • Share this blog:

What are Scanf ,Printf, CLRSCR, Getch, & Comments in C Language


It is a predefined f’n. by using this pre-defined f’n we can read the data from user.

  • Scanf f’n can any no.of arguments but 1st argument must be within the double quotes & remaining all arguments should separated with comma(,)
  • When we are working with scanf f’n with in the double only. i.e what type of data we are reading same type of format specifier is required
  • If scanf fun argument list should be contains & symbols.



It is a pre-defined f’n, by using this f’n we can print the data on console.

  • The scientific name of the monitor is called “console”
  • When we are working with the printf, it can take any no.of arguments but 1st argument must be within the double codes and every argument should be separated with ‘,’
  • Within the double codes whatever we pass it pins assist i.e. if any format specifiers are there then copy that type of values.



By using this predefined f’n we can clear console data.

  • Using clrscr is always optional but it must be required to place after declaration part only.



It is a predefined f’n, by using this predefined f’n we can read a char from keyboard.

  • Generally we are planning the getch at end of the program. To wait the o/p screen until we are passing any char’s from keyboard.



When we are using comments that specific part of the prog will ignore by compiler.

  • Generally comments are used to provide the description about the logic
  • In a CPU they are 2 types of comments are possible i.e single line comments and multiple line. Comments.
  • Single line comments can be provide by using two forward slashes(//)
  • Multiple line comments can be provided by using /*………….*/

You liked the article?

Like : 0

Vote for difficulty

Current difficulty (Avg): Medium

Recommended Courses


About Author
Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.

Stay Updated

Get stories of change makers and innovators from the startup ecosystem in your inbox