Tagged: example C programs

Write a program in C that reads a line of text into the computer and then writes back out in its original form 3

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

FREE C Cheatsheet - Speed Up Your C Programming.

FREE C Cheatsheet - Speed Up Your C Programming.

Download a 7-page free cheat sheet for easy and quick access to C Concepts, Snippets, and Syntax.

Thank you! Check you inbox and access your cheat-sheet