Write a program in C that reads a line of text into the computer and then writes back out in its original form
Below is the C program that reads a line of text into the computer and then writes back out in its original form
Explanation
Step 1: Read the line of text by using the library function gets()
and store it in an array
Step 2: Display the read line by using the library function puts()
Program:
#include<stdio.h> void main() { char line[80]; gets(line); puts(line); }
Output:
Learn C Online is the best tutorial website to learn C Learn C Online is the best tutorial website to learn C
Its a fabulous app
Thank you. 🙂
Learn C with the help of instructor online. Visit http://www.aptuts.com