Bhanu Priya

Bhanu Priya

1,061 Articles Published

Articles by Bhanu Priya

Page 107 of 107

Write a C program to work on statements using functions and loops

Bhanu Priya
Bhanu Priya
Updated on 10-Mar-2021 215 Views

ProblemHow to print the long lines into two or more short lines based on specified length in the program using C Language?SolutionLet’s write a code to read a long line and print into two or more short lines according to the mentioned size in the program.The built in functions that we take in this program readline() function, is used to store text in array and returns the size of line.The logic we use to read a short sentence is explained below −while((charcter=readtext())>0){    if(charcter>length){       count=0;       a=0;       while(alength){          count=0;          a=0;          while(a

Read More
Showing 1061–1061 of 1,061 articles
« Prev 1 103 104 105 106 107 Next »
Advertisements