Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

OUTPUT :BCDA
CDAB
DABC

Answers were Sorted based on User's Feedback



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

Answer / sky

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

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

Answer / rajan

Circular queue

Is This Answer Correct ?    6 Yes 3 No

Post New Answer

More C Interview Questions

What is merge sort in c?

0 Answers  


Write a program to print the prime numbers from 1 to 100?

7 Answers  


Explain what does the format %10.2 mean when included in a printf statement?

0 Answers  


Is main an identifier in c?

0 Answers  


in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above

0 Answers  


Would you rather wait for the results of a quicksort, a linear search, or a bubble sort on a 200000 element array? 1) Quicksort 2) Linear Search 3) Bubble Sort

3 Answers  


In C language what is a 'dangling pointer'?

0 Answers   Accenture,


what are the different storage classes in c?

0 Answers   TCS,


helllo sir , what is the main use of the pointer ,array ,and the structure with the example of a programe

2 Answers  


What is a loop?

0 Answers  


What is storage class?

0 Answers  


How can you determine the maximum value that a numeric variable can hold?

0 Answers  


Categories