• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

Scanf ,Printf, CLRSCR, Getch, & Comments in C

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

Scanf:-

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.

 

Printf():-

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.

 

CLRSCR:-

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.

 

 

Getch:-

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.

 

Comments:-

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 /*………….*/
Summary
Review Date
Reviewed Item
Scanf ,Printf, CLRSCR, Getch, & Comments in C
Author Rating
5

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

1 Responses on Scanf ,Printf, CLRSCR, Getch, & Comments in C"

  1. farahan khan says:

    Nice…

Leave a Message

Your email address will not be published. Required fields are marked *

Site Disclaimer, Copyright © 2016 - All Rights Reserved.