Answer the question
In order to leave comments, you need to log in
How to compare and add strings in "C"?
In the "C" language, there are the following strings, one of which is obtained by typing from the keyboard:
string stringOne, stringTwo;
stringOne = GetString();
stringTwo[0] = stringOne[6];
int position, n;
do{
if(stringOne[n] == "*"){
printf("%d", position);
}else n++;
}while(n <= 50);
Answer the question
In order to leave comments, you need to log in
Or maybe it's C++? ... did you try to put a dot after stringOne?
strncat takes pointers to char (the beginning of the string) as arguments, and in C strings are usually represented as char arrays. Figure out what the string type is for you, because if my memory serves me, it is not in pure C
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question