While Steven was reading other messages, Cyber Con wrote:
CC> Hello...
Hey there, CC...
CC> ok i know how you have some one enter a number
CC> scanf , but will this work for words.
Yes, it also works for characters...
CC> so could someone write me a exp. program that does the following.
Something along the lines of:
#include
main()
{
char name;
printf("Enter your name >");
scanf("%s", name); // This inputs an expected string, a bunch of
// characters followed by a NULL (\0)
if(name == "Cyber Con")
{
printf("Hello Cyber Con!");
}
}
Steven Lei
From: Las Vegas, Nevada, USA
E-mail = SpewMuffin@juno.com
... Drop your carrier ... we have you surrounded!
___ Blue Wave/DOS v2.30 [NR]
--- Hyper No Mo Mail!
---------------
* Origin: (1:209/218)
|