/*AN IMPLEMENTATION TO PRINT THE STRING WITH DIFFRENT CONDITIONS USED ..*/
#include<stdio.h>
#include<string.h>
int main()
{
int ret=0,k=0,len=0,i;
char arr[50];
printf("ENTER THE COMENT:\n");
k=scanf("%4000[^\n]",arr);//^\\n will print a single character..//
printf("k=%d\n",k);
printf("%s\n",arr);
k=scanf("%490[^\n]s",arr);//^\\n will print a single character..//no diffrence with 490
printf("%50.6s\n",arr);//IT LEAVES THE SPACE OF 50
len=strlen(arr);
for(i=0;arr[i]!='\0';i++)
printf("%c",arr[i]);
printf("\n");
for(i=0;arr[i]!='\n';i++)//^\n means negated \n it will put whole of string with whitespace also ...with '\0' character at end but it will not print '\n' character at end of string..//
printf("%c",arr[i]);
printf("\n");
printf("\n");
printf("\n");
//fgets(arr,sizeof(arr),stdin);
for(i=0;arr[i]!='\n';i++)//^\n means negated \n it will put whole of string with whitespace also ...with '\0' character at end but it will not print '\n' character at end of string..//