Computing.Net > Forums > Programming > C Programming

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

Reply to Message Icon

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..



Sponsored Link
Ads by Google

Response Number 1
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

Related Posts

See More



Response Number 6
Name: Razor2.3
Date: September 12, 2009 at 06:03:43 Pacific
Reply:

You never initialize the str pointer, ershailendra.


1

Sponsored Link
Ads by Google
Reply to Message Icon

batch copy on file name s... File allocation



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: C Programming

c++ programming for novell www.computing.net/answers/programming/c-programming-for-novell/2525.html

Bike Trader C program www.computing.net/answers/programming/bike-trader-c-program/6557.html

C++ Programming Website www.computing.net/answers/programming/c-programming-website/4752.html