Click here to Skip to main content
15,902,636 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: To make an interacting user game on *Tower of hanoi* . Pin
Jochen Arndt15-Jan-18 1:11
professionalJochen Arndt15-Jan-18 1:11 
AnswerRe: To make an interacting user game on *Tower of hanoi* . Pin
Richard MacCutchan15-Jan-18 1:06
mveRichard MacCutchan15-Jan-18 1:06 
GeneralRe: To make an interacting user game on *Tower of hanoi* . Pin
Tarun Jha15-Jan-18 1:21
Tarun Jha15-Jan-18 1:21 
GeneralRe: To make an interacting user game on *Tower of hanoi* . Pin
David Crow15-Jan-18 2:42
David Crow15-Jan-18 2:42 
GeneralRe: To make an interacting user game on *Tower of hanoi* . Pin
Richard MacCutchan15-Jan-18 5:00
mveRichard MacCutchan15-Jan-18 5:00 
QuestionSort digits of number Pin
Anonygeeker14-Jan-18 22:41
Anonygeeker14-Jan-18 22:41 
AnswerRe: Sort digits of number Pin
CPallini14-Jan-18 23:00
mveCPallini14-Jan-18 23:00 
AnswerRe: Sort digits of number Pin
Richard MacCutchan14-Jan-18 23:06
mveRichard MacCutchan14-Jan-18 23:06 
Questionconversion error Pin
Anonygeeker14-Jan-18 20:28
Anonygeeker14-Jan-18 20:28 
AnswerRe: conversion error Pin
Jochen Arndt14-Jan-18 21:19
professionalJochen Arndt14-Jan-18 21:19 
AnswerRe: conversion error Pin
Richard MacCutchan14-Jan-18 21:36
mveRichard MacCutchan14-Jan-18 21:36 
QuestionI couldn't think a good title for this.Simple question Pin
Emrah Duatepe14-Jan-18 7:37
Emrah Duatepe14-Jan-18 7:37 
AnswerRe: I couldn't think a good title for this.Simple question Pin
Jochen Arndt14-Jan-18 21:37
professionalJochen Arndt14-Jan-18 21:37 
GeneralRe: I couldn't think a good title for this.Simple question Pin
Emrah Duatepe14-Jan-18 21:44
Emrah Duatepe14-Jan-18 21:44 
GeneralRe: I couldn't think a good title for this.Simple question Pin
Jochen Arndt14-Jan-18 22:18
professionalJochen Arndt14-Jan-18 22:18 
GeneralRe: I couldn't think a good title for this.Simple question Pin
Emrah Duatepe14-Jan-18 23:37
Emrah Duatepe14-Jan-18 23:37 
GeneralRe: I couldn't think a good title for this.Simple question Pin
Jochen Arndt15-Jan-18 0:20
professionalJochen Arndt15-Jan-18 0:20 
GeneralRe: I couldn't think a good title for this.Simple question Pin
Emrah Duatepe15-Jan-18 0:30
Emrah Duatepe15-Jan-18 0:30 
GeneralRe: I couldn't think a good title for this.Simple question Pin
Jochen Arndt15-Jan-18 0:48
professionalJochen Arndt15-Jan-18 0:48 
GeneralRe: I couldn't think a good title for this.Simple question Pin
Emrah Duatepe15-Jan-18 0:39
Emrah Duatepe15-Jan-18 0:39 
GeneralRe: I couldn't think a good title for this.Simple question Pin
Jochen Arndt15-Jan-18 0:54
professionalJochen Arndt15-Jan-18 0:54 
GeneralRe: I couldn't think a good title for this.Simple question Pin
Emrah Duatepe15-Jan-18 1:10
Emrah Duatepe15-Jan-18 1:10 
AnswerRe: I couldn't think a good title for this.Simple question Pin
Richard MacCutchan14-Jan-18 21:39
mveRichard MacCutchan14-Jan-18 21:39 
GeneralRe: I couldn't think a good title for this.Simple question Pin
Emrah Duatepe14-Jan-18 21:45
Emrah Duatepe14-Jan-18 21:45 
Questionfinding longest word Pin
Anonygeeker10-Jan-18 22:05
Anonygeeker10-Jan-18 22:05 
This is my logic to find the longest word in C.

void find_long(char *a)
{
int l,i,l1=0,j=0,l2=0;
char b[50],c[50];
l=strlen(a);
for(i=0;i<l;i++){
if(a[i]!=" " ){
="" b[j]="a[i];
" printf("%c="" ",b[j]);
="" j++;}
="" else="" if(a[i]="='" '){
="" ;
="" if(strlen(b)="">l1){
strcpy(c,b);
l1=strlen(b);
j=0;
}
else{
printf("\nEOF");}
}
}
printf("\nlongest is \n");
printf(c);


But it is not taking the last word I am giving. What is wrong here?

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.