Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.
C Programming
Name: perplexed Date: September 8, 2009 at 07:27:11 Pacific OS: Windows XP Subcategory: C/C++ Tags:XP
Comment:
Is it possible to make a program using a c programming language which if I will ask the user to enter a word then the program will evaluate if how many characters or letters? is it possible? please help me..
Name: wizard-fred Date: September 8, 2009 at 07:33:20 Pacific
Reply:
It's possible. Basic string handling in almost every language.
0
Response Number 2
Name: perplexed Date: September 8, 2009 at 16:45:54 Pacific
Reply:
yeahh...really but the question is how to make it? can i have the codes..thank you
0
Response Number 3
Name: donever Date: September 8, 2009 at 19:14:29 Pacific
Reply:
C# version
using System; class Program {static void Main() { Console.Write("Please enter you name!"); string name = Convert.ToString(Console.ReadLine()); int length = name.Length; Console.Write("There are {0} characters in you name!", length); Console.ReadLine(); } }
1
Response Number 4
Name: perplexed Date: September 8, 2009 at 19:44:53 Pacific
Reply:
what are the codes if it is in c programming?
1
Response Number 5
Name: ershailendra Date: September 12, 2009 at 05:53:21 Pacific
Reply:
Yep u may write in c #include<string.h> #include<stdio.h> #include<stdlib.h> #include<conio.h> void main(){ char *str; printf("enter the string : "); scanf("%s",str); //if u wanna store single word gets(str); // if u wanna store multiple words printf("\nThe length of string is %d",strlen(str)); getch(); }
1
Response Number 6
Name: Razor2.3 Date: September 12, 2009 at 06:03:43 Pacific
Reply:
You never initialize the str pointer, ershailendra.
Summary: Hello all, i'm having a bit of trouble with my basic C program. I'm not all to good with C as it stands anyway, so managed to find this place. I've been asked to make a program that is a little like a...