C program to print vowels [closed] - c

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 days ago.
Improve this question
I have declared an array of vowels and is trying to compare the input string with this vowel array to count the number of vowels. It doesn't seem working. The output seems to be the multiple of input string and 5.
How to fix this?
vowels="aeiou"

Related

adding to text file without overwriting and keeping the pointer at the beginning of the file in C [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 days ago.
Improve this question
So i have a loop which itterates through this encrypted text file. It then decrypts the letter and adds that new letter to a decrypted text file. only problem is that it is backwards.
So instead of lets say "Hello my name is John", the text file looks like this "nhoJ si eman ym olleH"

Count amount of words, characters, newlines in C [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I know it is not recommended to post code as an image, since I am getting a formatting error when trying to post code on here. Anyway, I am trying to write a simple C program to count number of words, characters, newlines using do while loop. However, the output is not as expected. Please help!
Instead of a do-while, you should try using while. Since your code starts off by checking whether a is any of your if cases, it goes to the else case, and increments the New line variable. If possible, could you share the output screen.

Converting a character into a space in C arrays [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
So lets say I have received a message that resembles the following
"L2N5*8R10!11T0A1K3Y14#4W7O6O9C12R13"
and I am expected to sort out the characters in accordance to the numbers succeeding them and change the characters that are not letters into a space. I have no problem doing the sorting out part, I am only having a trouble while trying to write a function that will change those characters into space.
The out put should be something like this
TALK NOW OR CRY
but I am getting
TALK#NOW*OR!CRY
Can anyone help me figure out what my function should look like so that I can be able to change the characters into space??
Unless you show your code, we'll only be able to guess!!
However, as a general suggestion, I would recommended, you should check each entry against isalpha(). In case you got a return value of 0, replace the entry with a .

How do you type something on the same line of text in C [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I was wondering how can you type something in one line in C?
This is the normal way it outputs.
Output
>
<text>
Instead
> <text>
From your tags, I'm guessing you're using printf(). Simply leave out the "\n" character, which means "newline.".
In other words.
printf("> "); printf("text\n");
This will print:
> text

Addition of 2 numbers and give corresponding outputs depending on the number of digits got from the addition using C [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
The Question goes this way :
Add two numbers and if the addition of two numbers gives the result in single digit print YES and if the result of the two numbers is in double digit print NO
As an idea. It is enough to check whether the result of the addition is less than 10 and greater than -10 if the numbers are signed.:)

Resources