Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

changing alphabet (string) order

Status
Not open for further replies.

firipu

Newbie level 4
Newbie level 4
Joined
Oct 30, 2007
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,306
i want to creat a new string with other alphabet order
for example instead of starting with a to start with r(order o 3)and end with abc
Code:
int main(void)
{
  char alf[]="abcdefghijklmnopqrstuvwxyz";
  char ncifra[ALF];
  int i,j,nchave;
  
  printf("Chave (posicoes a transpor):");
  scanf("%d",&nchave);
           
  for(i=nchave;i<ALF;i++) {
     j=0;
     ncifra[j]=alf[i];
     j++;
  }
  for(i=0;i<nchave;i++) {
     j=26-nchave;
     ncifra[j]=alf[i];
     j++;
  }
return 0;
}
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top