Technology, Web & Business Forum

You are here: Technology, Web & Business Forum : Web Development : Programming : Can someone help me with this C question?


Welcome to the Technology, Web & Business Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.


Programming Discuss programming languages such as .NET, PHP, PERL, ASP, ColdFusion, C++


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-16-2010
Junior Member
 
Join Date: Mar 2010
Posts: 2
Default Can someone help me with this C question?

Hi this is a question that i need help with, i need to write this in C not C++. The question is:

Write a program with 3 short strings about 6 characters each, and use strcpy() to copy "one" , "two", "three" into them.
Concatenate the three strings into one string and print the results out 10 times.
Thanks for the help.
Reply With Quote
  #2 (permalink)  
Old 05-23-2010
Junior Member
 
Join Date: May 2010
Posts: 1
Default hai

Hi,

Here is a program to solve your problem.

#include <stdio.h>
#include <string.h>

int main(){
char first[6] = {0};
char second[6] = {0};
char third[6] = {0};
char big[19] = {0};
int i = 0;
strcpy(first, "one");
strcpy(second, "two");
strcpy(third, "three");
strcat(big, first);
strcat(big, second);
strcat(big, third);
for(i = 0; i < 10; i++){
printf("%s\n", big);
}
return 0;
}
__________________
miami wedding photographer
Reply With Quote
  #3 (permalink)  
Old 07-26-2010
Senior Member
 
Join Date: Mar 2010
Posts: 186
Default Card games

Hi,
Card games - This is a very popular selection among avid online game players. Card games like Blackjack, Baccarat, canasta and poker are extremely popular. Playing poker online has taken a large turn in the last few years. Add that to the sites hosting Texas Hold 'em games and the possibilities are nearly endless. You can play free card games online at many major sites including Yahoo and MSN.
'How to Play Better Canasta is extremely useful for those who play Canasta online.
I can recommend you a good Canasta Site to play online and help you recording Top Score in this game. If you play Canasta for fun, here's your opportunity to 'spice-up' the game and use your skill to try and win some money!
Thanks
__________________
Reply With Quote
  #4 (permalink)  
Old 12-12-2010
Junior Member
 
Join Date: Dec 2010
Posts: 5
Default

When I have multiple choice questions and the answers appear to be definition based I just look up the defnition and make sure I understand all the terms. The point of the question is to make sure you understand the difference between similar items.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 10:19 AM.