Click here to Skip to main content
15,890,527 members
Home / Discussions / C#
   

C#

 
GeneralRe: convert List<typethatimplementsinterface> to List<interface>, is there a simple way to do this? Pin
Richard Deeming17-Apr-14 2:30
mveRichard Deeming17-Apr-14 2:30 
GeneralRe: convert List<typethatimplementsinterface> to List<interface>, is there a simple way to do this? Pin
Nico Haegens17-Apr-14 3:26
professionalNico Haegens17-Apr-14 3:26 
GeneralRe: convert List<typethatimplementsinterface> to List<interface>, is there a simple way to do this? Pin
Richard Deeming17-Apr-14 3:31
mveRichard Deeming17-Apr-14 3:31 
QuestionHow To Fetch User information and show in a page ? Pin
krish099116-Apr-14 6:04
krish099116-Apr-14 6:04 
AnswerRe: How To Fetch User information and show in a page ? Pin
OriginalGriff16-Apr-14 6:13
mveOriginalGriff16-Apr-14 6:13 
QuestionHow to change login button to logout in c# ? Pin
krish099116-Apr-14 6:02
krish099116-Apr-14 6:02 
AnswerRe: How to change login button to logout in c# ? Pin
OriginalGriff16-Apr-14 6:12
mveOriginalGriff16-Apr-14 6:12 
QuestionMultiple functions Pin
cstudent116-Apr-14 5:41
cstudent116-Apr-14 5:41 
Hi, I am hoping someone can help me with this. I need a program that counts char,vowels and words. I can get it to do all those things alone, but I am at a loss on how to make it all work together. Please help. Thanks!



This is the program to count char, it works fine.....
#include <stdio.h>
#include <string.h>
#define MAXNUM 1000

int countchar(char[]);
int main()
{

char message [MAXNUM];
int numchar;

printf("\nType in any number of characters : ");
gets(message);
numchar = countchar(message);
printf("\nThe number of characters is %d",numchar);

return 0;
}
int countchar(char list [])
{
int i, count = 0;

for(i=0; list[i] != '\0'; i++)
count++;

return(count);
}


This is the program to count vowels, it worked fine until i tried to add the char count.....


#include<stdio.h>
int main()
{
char str, line[150];
int i,v,c,ch,d,s,o,l, countchar, count, list;
o=v=c=ch=l=d=s=0;
printf("Enter a line of string:\n");
gets(line);
for(i=0;line[i]!='\0';++i)
{
if(line[i]=='a' || line[i]=='e' || line[i]=='i' || line[i]=='o' || line[i]=='u' || line[i]=='A' || line[i]=='E' || line[i]=='I' || line[i]=='O' || line[i]=='U')
++v;
}

{
int countchar(char list [])


int i, count = 0;
for(i=0; list[i] != '\0'; i++)
count++;

return(count);
}

printf("Vowels: %d",v);
printf("characters %d",countchar);
return 0;
}
AnswerRe: Multiple functions Pin
OriginalGriff16-Apr-14 5:51
mveOriginalGriff16-Apr-14 5:51 
AnswerRe: Multiple functions Pin
Richard MacCutchan16-Apr-14 5:57
mveRichard MacCutchan16-Apr-14 5:57 
GeneralRe: Multiple functions Pin
cstudent116-Apr-14 6:30
cstudent116-Apr-14 6:30 
GeneralRe: Multiple functions Pin
cstudent116-Apr-14 6:45
cstudent116-Apr-14 6:45 
GeneralRe: Multiple functions Pin
Richard MacCutchan16-Apr-14 6:55
mveRichard MacCutchan16-Apr-14 6:55 
QuestionAn entity object cannot be referenced by multiple instances of IEntityChangeTracker Pin
Šangeet Šhah15-Apr-14 20:56
professionalŠangeet Šhah15-Apr-14 20:56 
AnswerRe: An entity object cannot be referenced by multiple instances of IEntityChangeTracker Pin
Dave Kreskowiak16-Apr-14 1:31
mveDave Kreskowiak16-Apr-14 1:31 
Questionhow to access built - in class Pin
Member 1034709215-Apr-14 18:54
Member 1034709215-Apr-14 18:54 
AnswerRe: how to access built - in class Pin
Mycroft Holmes15-Apr-14 20:08
professionalMycroft Holmes15-Apr-14 20:08 
AnswerRe: how to access built - in class Pin
OriginalGriff15-Apr-14 21:07
mveOriginalGriff15-Apr-14 21:07 
QuestionRegarding Tabs Pin
Mahesh Devikar15-Apr-14 17:43
Mahesh Devikar15-Apr-14 17:43 
AnswerRe: Regarding Tabs Pin
Dave Kreskowiak15-Apr-14 17:58
mveDave Kreskowiak15-Apr-14 17:58 
QuestionExport & Import database Pin
Member 1072402015-Apr-14 10:38
Member 1072402015-Apr-14 10:38 
AnswerRe: Export & Import database Pin
Richard MacCutchan15-Apr-14 11:57
mveRichard MacCutchan15-Apr-14 11:57 
AnswerRe: Export & Import database Pin
Bernhard Hiller15-Apr-14 22:17
Bernhard Hiller15-Apr-14 22:17 
QuestionIncorrect syntax near ',' Pin
Syafiqah Zahirah15-Apr-14 6:05
Syafiqah Zahirah15-Apr-14 6:05 
AnswerRe: Incorrect syntax near ',' Pin
Eddy Vluggen15-Apr-14 6:15
professionalEddy Vluggen15-Apr-14 6:15 

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.