Thursday, July 30, 2009

What is String Concantenation in Turbo C programming?

I really need your response. Thanks a lot. godbless.

What is String Concantenation in Turbo C programming?
in addition to pick m answer, yes, it does combine two words into one and concatenation is a function that combines two or more string to one word. ^_^





i just realized...i didnt add any information except to tell you that it is a function in Turbo C ^_^
Reply:it combines two strings and leaves out any spaces.





Example





"me %26amp; you" + "me" = me%26amp;youme


Will the c programming language ever implement the string data type from c++?

I doubt it.





C++ was written as an extension to C





It's not common for an older language to inherit from a newer language, especially when that newer language was an extension on the previous.

Will the c programming language ever implement the string data type from c++?
it is not possible
Reply:Please C is sooo dial-up! Even C++ is outdated C# is the future embrace it and love it!
Reply:nope. that's why there's a c-post increment.


What are the variable factors that affect the pitch (frequency) of a vibrating string? How are these factors c

What are the variable factors that affect the pitch (frequency) of a vibrating string? How are these factors controlled in a stringed musical instrument such as a violin?

What are the variable factors that affect the pitch (frequency) of a vibrating string? How are these factors c
On a violin, the factors that control the pitch, assuming that it is adequately constructed, would be how the string is made to vibrate, that is a bow or finger plucking, and where you place your fingers on the fretboard. Of course, the quality of the sound depends on the player.
Reply:Tension on the strings simple as that. The tighter the string the higher the frequency of vibration and thusly the higher the pitch.

florist shop

Random String/Word Generator in C++?

I'm trying to figure out how to generate random words. They don't need to make sense. For instance: it can generate "dfgag" "sge" sdvbsvdv". It would be perferable to make it generate less than 7 chars.





I've tried looking online but I can't find anyone who has done this.





Does anyone have a function, a place online, or even pseudo code that can point me in the right direction?

Random String/Word Generator in C++?
#include %26lt;stdlib.h%26gt;


#include %26lt;time.h%26gt;





void rword (char *word)


{


int len = rand () % 6 + 1;


word [len] = 0;


while (len) word [--len] = 'a' + rand () % 26;


}





int main ()


{


char word[7];


srand(time(0));


while (1) {rword(word); printf ("%s\n", word);}


}
Reply:I would strongly encourage you to take a good C++ course or follow some tutorials.





#include %26lt;stdio.h%26gt;


#include %26lt;stdlib.h%26gt;


#include %26lt;time.h%26gt;








static short getRandomNbr(short low, short high)


{


return(low + (short) ((double)(1 + high - low) * ((double)rand() / 100.0) / ((double)RAND_MAX / 100.0)));


} /* getRandomNbr() */








main()


{


register short i;


unsigned char answer[8];


unsigned int luck; // :)





memset(answer, 0, 8);





srand((unsigned int)(time((time_t *) 0)));





usleep((luck = 1000 + 80 * getRandomNbr(1, 10000)));





srand((unsigned int)(time((time_t *) 0)) + luck);





for (i = 0; i %26lt; getRandomNbr(1, 7); i ++)


{


answer[i] = (unsigned char) getRandomNbr((short)'a', (short)'z');


} // for





printf("%s\n", answer);





} // main()


What is the code for displaying reverse of a string using recursive function in C?

In C.

What is the code for displaying reverse of a string using recursive function in C?
printrestofstringbackwards()


{


if (last letter)


{


print letter


}


else


printrestofstringbackwards()


}








there's some psuedocode...have fun. see how you print something backwards is you print the rest of the word backwards then you print the first letter. and how you print the remainder backwards is you print the rest of it backwards, then the first letter...and so on until no word is left.
Reply:You only need to ask once. Reported as spam.


Write a function min that has three string parameters a, b, and c and returns the smallest?

(alphabetically). Use C language.


In C++, how do I use either string or char to input first & last name using only one variable?

The console should ask for an author name, then the user enters both first and last name together (eg. John Doe), then the console should display both first and last name, but only one variable must be used. I've tried declaring char[20] or string but neither will allow for whitespace between the names. Any help is appreciated, thanks.

In C++, how do I use either string or char to input first %26amp; last name using only one variable?
#include %26lt;stdio.h%26gt;


#include %26lt;stdlib.h%26gt;


#include %26lt;string.h%26gt;


#include %26lt;iostream%26gt;








using namespace std;





int main (int argc,char* argv[]){


char name[80];





do{





int opcion;


cout%26lt;%26lt;"Selecione lo que desea hacer: "%26lt;%26lt;endl;


cout%26lt;%26lt;"Push 1 for put name %26amp; last name."%26lt;%26lt;endl;


cout%26lt;%26lt;"Push 2 for view the name %26amp; last name, you entered."%26lt;%26lt;endl;


cout%26lt;%26lt;"Push 3 for exit."%26lt;%26lt;endl;


cin%26gt;%26gt;opcion;


switch(opcion){


case 1:


cout%26lt;%26lt;"write the name and the lastname"%26lt;%26lt;endl;


/*jump exact 1 character used for the opcion*/


cin.ignore(1);


/*you can use cin.getline for take a chain of characters


con.getline take teh char array for put in came,


the number of characters , and the last the cahracter for delimited


*/


cin.getline(name,80,'\n');


break;


case 2:


cout%26lt;%26lt;"the name and the lastname youe entered are: "%26lt;%26lt;endl;


cout%26lt;%26lt;name%26lt;%26lt;endl;


break;





case 3:


exit(0);


break;


default:


cout%26lt;%26lt;" invalid"%26lt;%26lt;endl;


break;


}





}while(true);


return 0;


}





with cin.getline() you can take all the incomming data bye

sympathy flowers