Those are neither doubts nor questions. I doubt your intentions are anything but those of a cheater looking for free code to get through assignments without any effort. I also doubt that helping you would be anything but a waste of my time because you'll do one of two things:Run off with any code that's given to you, never to be seen again.
Bitch and moan about being helpless and stupid if I try to teach you how to write code yourself.
Can you alleviate those doubts? No? Then go cheat somewhere else.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
>if you dont want to help then dont make such comments.
I'd love to help you. But I'm not going to waste my time on a lost cause. If you can prove that you're not a lost cause, you'll find me to be an excellent resource. However, posting your assignment without any kind of attempt or specific question strongly suggests that you're yet another lazy cheater (we get a lot of them around here) looking for a free ride.
>in future, you also might need some help in something and i hope at that time,
>if you get the same reply as you said now to me, you will remember me then..
I remember people like you every time I help myself or teach myself something new. Would it interest you to know that I taught myself C through trial and error? I didn't discover all of the wonderful resources on the web until long after I had overcome the difficulties you're experiencing now, so your "I'm just a beginner wah wah wah" defense is falling on deaf ears.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
1) Write a program to count the number of blank spaces in a given string.
2) Write a program to abbreviate a given string (e.g. if the input is Amar Akbar Anthony, the output will be AAA)
1. Go through the string, and increment a counter when you encounter a blank space.
2. Go through the string, and store the first letter of each word (let the word be a string of letters between blank spaces) inside an array of characters.
You need to find out how to do the above in C. For this, you need some knowledge of how strings are stored, how to loop through a string (and how to look for the end of a string), and conditional statements. I can give you the highlight for the first program:
#include <stdio.h>
int main(void) {
/* Declare the variables */
/* Get the string */
/* Go through the string */
/* If you encounter a white space */
/* Increment the counter */
return 0;
}
Replace the comments with actual code. Write the comments version for the second task, and then replace the comments with actual code.
creeps
Junior Poster in Training
82 posts since Jul 2010
Reputation Points: 85
Solved Threads: 8