Explain the input /output functions.
A. Input output functions are divided into two types
1. Formatted functions
2. Unformated functions
1.printf().
It is a output function is used to display the message or out put on the monitor
It is a callby value function. It is predefined in <stdio.h>.
Syntax.
printf(“control string”, variable);
It is used to read the data from keyboard at run time
It is a input ()
It is predefined in <stdio.h>
Syntax.
scanf(“control string”,&var1,&var2);
scanf(“%d%d”,&a,&b);
1.put char()
2.get char()
3.puts()
4.gets()
It is a similar to printf()
It is used to display the single character or variable on the screen
In this unformatted () are no need to use format specifiers
Ex int ch=10;
putchar(ch);
getchar()
It is used to read a character from the keyboard and stores into the lefthand side variable.
Ex char ch;
ch=getchar();
puts()
It is also similar to printf()
It displays the output on the screen and curser comes to next line automatically
Ex float d=10.56f;
puts(d);
You may like the following posts:
You may like the following posts:
No comments:
Post a Comment