Completely Solved C, C++ Programs Assignment.




C Program to accept a string and print by trailing spaces.

Filed Under:

Problem 99. C Program to accept a string and print by trailing spaces.
#include<conio.h>
#include<stdio.h>
main( )
{
char n,n1;
clrscr ( );
printf(“enter a string;”);
while((n=getchar( )!=’n’)
if(n>=’a’ && n<=’z’)
putchar(n);
else
if(n>=’a’ && n<=’z’)
putchar(n);
getch( );
}

C compiler: gcc 4.1.2

 Back to main directory: Sample C Program | Software Practical | Solved C Assignment


Get Free Programming Tutorials and Solved assignments