Click here to Skip to main content
15,915,093 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C program to replace all the letters of a string with all 26 alphabets..... Pin
varul27-Feb-12 6:40
varul27-Feb-12 6:40 
GeneralRe: C program to replace all the letters of a string with all 26 alphabets..... Pin
Richard MacCutchan27-Feb-12 7:44
mveRichard MacCutchan27-Feb-12 7:44 
AnswerRe: C program to replace all the letters of a string with all 26 alphabets..... Pin
David Crow27-Feb-12 6:30
David Crow27-Feb-12 6:30 
GeneralRe: C program to replace all the letters of a string with all 26 alphabets..... Pin
varul27-Feb-12 6:45
varul27-Feb-12 6:45 
SuggestionRe: C program to replace all the letters of a string with all 26 alphabets..... Pin
David Crow27-Feb-12 7:06
David Crow27-Feb-12 7:06 
GeneralRe: C program to replace all the letters of a string with all 26 alphabets..... Pin
varul27-Feb-12 7:07
varul27-Feb-12 7:07 
AnswerRe: C program to replace all the letters of a string with all 26 alphabets..... Pin
varul29-Feb-12 22:43
varul29-Feb-12 22:43 
GeneralRe: C program to replace all the letters of a string with all 26 alphabets..... Pin
varul29-Feb-12 22:48
varul29-Feb-12 22:48 
The code i have so far is:

#include<stdio.h>
#include<conio.h>
#include<string.h>
main()
{
int i;
FILE *fr,*fw;
fr = fopen("input.txt","r");
fw = fopen("output.txt","w");
char *string="gavc",zev[50];
int length = strlen(string);
printf("\n %d \n",strlen(string));
char ch;
fprintf(fw,"The string is:---> ");
while(1)
{
ch = getc(fr);
if(ch==EOF)
{
break;
}
else
putc(ch,fw);
}


int *ipCount = new int[strlen(zev)];
for(int i= 0;i<strlen(zev);i++)
{
ipCount[i]=25;
}
while(ipCount[0]>=0)
{

for(int j=0;j<26;j++)
{
printf("%s\n",zev);
zev[strlen(zev)-1]++;
ipCount[strlen(zev)-1]--;

}
for(int i= 1;i<strlen(zev);i++)
{

if(ipCount[0]==0)
{
ipCount[0]=-1;
}
if(ipCount[i]==0 )
{
ipCount[i-1]=ipCount[i-1]-1;
zev[i-1]++;
for(int k=i;k<strlen(zev);k++)
ipCount[k]=25;
break;
}

}

}

fprintf("fw","\n %s \n",zev);
fprintf(fw,"\n combinations generated are:\n");
printf("\n %s \n",zev);
fclose(fr);
fclose(fw);
getch();
}
QuestionGet Notification of Wrong Password Attempt Pin
Member 857955627-Feb-12 3:45
Member 857955627-Feb-12 3:45 
AnswerRe: Get Notification of Wrong Password Attempt Pin
Richard MacCutchan27-Feb-12 4:20
mveRichard MacCutchan27-Feb-12 4:20 
AnswerRe: Get Notification of Wrong Password Attempt Pin
Maximilien27-Feb-12 4:27
Maximilien27-Feb-12 4:27 
QuestionHow to decode AT+CPBR pdu response? Pin
Le@rner27-Feb-12 0:45
Le@rner27-Feb-12 0:45 
AnswerRe: How to decode AT+CPBR pdu response? Pin
Erudite_Eric27-Feb-12 1:01
Erudite_Eric27-Feb-12 1:01 
Questiontoolbar on dialog problem need help Pin
appollosputnik26-Feb-12 21:05
appollosputnik26-Feb-12 21:05 
AnswerRe: toolbar on dialog problem need help Pin
_AnsHUMAN_ 26-Feb-12 21:38
_AnsHUMAN_ 26-Feb-12 21:38 
GeneralRe: toolbar on dialog problem need help Pin
appollosputnik26-Feb-12 22:25
appollosputnik26-Feb-12 22:25 
QuestionHow to retieve files from a folder and pass it in a functio called in a loop Pin
Faez Shingeri26-Feb-12 18:09
Faez Shingeri26-Feb-12 18:09 
AnswerRe: How to retieve files from a folder and pass it in a functio called in a loop Pin
Jochen Arndt26-Feb-12 21:09
professionalJochen Arndt26-Feb-12 21:09 
GeneralRe: How to retieve files from a folder and pass it in a functio called in a loop Pin
Faez Shingeri26-Feb-12 23:47
Faez Shingeri26-Feb-12 23:47 
AnswerRe: How to retieve files from a folder and pass it in a functio called in a loop Pin
enhzflep26-Feb-12 21:14
enhzflep26-Feb-12 21:14 
Questionhow to insert and verify digital signatures in pdf? Pin
chp84526-Feb-12 16:10
chp84526-Feb-12 16:10 
AnswerRe: how to insert and verify digital signatures in pdf? Pin
enhzflep26-Feb-12 18:06
enhzflep26-Feb-12 18:06 
GeneralRe: how to insert and verify digital signatures in pdf? Pin
chp84526-Feb-12 20:00
chp84526-Feb-12 20:00 
GeneralRe: how to insert and verify digital signatures in pdf? Pin
enhzflep26-Feb-12 20:13
enhzflep26-Feb-12 20:13 
QuestionHow can I set a string to an item of the ListCtrl(CListCtrl) as muti-line Pin
Joneeky26-Feb-12 14:06
Joneeky26-Feb-12 14:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.