thanks! it worked qith getchar().
Type: Posts; User: tanpearl
thanks! it worked qith getchar().
i wanted to compare two strings in a conditional. but
if (string1==string2)
wont' work.
Help me guys. this is a part of my program and the scanf part doesn't function.
im using the Turbo C version.
the one that is bold is the part that doesn't work. can't locate my error. HELP!
...
thanks! the code you entered is easier to understand. and i need two arrays because it is a game im doing and im just doing it step by step. =)
Thanks for helping. It helped alot. Btw, here's the code.
#include <stdio.h>
#include <string.h>
void main ( )
{
int a;
char s[80], b[80];
I've revised my code. however after the first word, the rest won't print already.
#include <stdio.h>
void main ( )
{
int a;
char s[80], b[80];
i tried removing the for loop but when it prints, unnecessary hyphens appear and even the sigma and smiley faces aren't removed.
how can i assign the last value to be \0 ?
i'm using the old Turbo C program. How to use fgets()?
i tried using scanf() but after the first word i enter, it wont be printed already.
This is my code:
i Input characters then replace it with hyphens. however, sigma and smiley faces are produced when print it.
#include <stdio.h>
void main ( )
{
int a;
Why is it that if i use scanf for input of a string data type, the words entered after a space are not printed?