santosh yadav


{ City } belgaum
< Country > india
* Profession * software engineer
User No # 97841
Total Questions Posted # 0
Total Answers Posted # 1

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 18
Users Marked my Answers as Wrong # 4
Questions / { santosh yadav }
Questions Answers Category Views Company eMail




Answers / { santosh yadav }

Question { Mphasis, 11108 }

please tell me the logic for this C program :
INPUT (string):ABCD

OUTPUT :BCDA
CDAB
DABC


Answer

char str[]="ABCD";
len = strlen(str);
for (i=1; i < len; ++i )
{
j=i;
for( count=0; count < len; ++count, ++j )
{
if(j == len )
j=0;
printf("%c", (*str)+j);
}

printf("\n");
}

Is This Answer Correct ?    18 Yes 4 No