answersLogoWhite

0


Best Answer

Sure, you can write a function in C to convert a string to Pig Latin without using pointers by passing the string as a parameter and manipulating it directly within the function. You can split the string into words, check if a word starts with a vowel or consonant, and then apply the appropriate transformation following the rules of Pig Latin. Remember to allocate enough memory for the modified string to prevent buffer overflow.

User Avatar

AnswerBot

4d ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Piglatin string in c without using pointer?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Process an entire string as one unit?

may...we can try by using pointer........... gets


Why pointer is used to reference a string of characters write C plus plus statements that display the text hello using pointer to a string notation?

We use a pointer to reference a string because a string is an array of characters where every element is a char (or a wchar_t if using UNICODE strings). Passing arrays by value would require the entire array to be copied, but passing a pointer variable to an array only copies the pointer, which is effectively the same as passing the array by reference. #include <iostream> int main() { char * psz = "hello"; // pointer to a null-terminated string. std::cout << psz; // pass the pointer (by value) to the insertion operator. return( 0 ); }


What is inventory pointer c?

// Inventory Pointer // Demonstrates returning a pointer #include <iostream> #include <string> #include <vector> using namespace std; //returns a pointer to a string element string * ptrToElement(vector<string>* const pVec, int i); int main() { vector<string> inventory; inventory.push_back( "sword"); inventory.push_back( "armor"); inventory.push_back( "shield"); //displays string object that the returned pointer points to cout << "Sending the objected pointed to by returned pointer:\n"; cout << *(ptrToElement(&inventory, 0)) << "\n\n"; //assigns one pointer to another - inexpensive assignment cout << "Assigning the returned pointer to another pointer.\n"; string* pStr = ptrToElement(&inventory, 1); cout << "Sending the object pointed to by new pointer to cout:\n"; cout << *pStr << "\n\n"; //copies a string object - expensive assignment cout << "Assigning object pointed by pointer to a string object.\n"; string str = *(ptrToElement(&inventory, 2)); cout << "Sending the new string object to cout:\n"; cout << str << "\n\n"; //altering the string object through a returned pointer cout << "Altering an object through a returned pointer.\n"; *pStr = "Healing Potion"; cout << "Sending the altered object to cout:\n"; cout << inventory[1] << endl; return 0; } string * ptrToElement(vector<string>* const pVec, int i) { //returns address of the string in position i of vector that pVec points to return &((*pVec)[i]); }


Reverse of a string without using string handling function?

shashi


Concat a string without using any inbuilt function in java?

Use "+". Example: String string = "does this answer " + "your question?";


How can you create a language on Facebook?

You could try using piglatin its fun to use :D


Find length of the string without using loops and control structures?

length = strlen(string);


How to perform string operations like concatenation compare etc without using built in functions?

performing string operation using pointers


How do you replace an electric guitar string without using a string winder?

You don't be lazy and use your fingers!


How do you scramble a string in java?

Take out one letter, using a random number. Then replace the string with the new string, without the extracted letter. Repeat, until the remaining string has a length of zero. The extracted letters get added to a new string.Take out one letter, using a random number. Then replace the string with the new string, without the extracted letter. Repeat, until the remaining string has a length of zero. The extracted letters get added to a new string.Take out one letter, using a random number. Then replace the string with the new string, without the extracted letter. Repeat, until the remaining string has a length of zero. The extracted letters get added to a new string.Take out one letter, using a random number. Then replace the string with the new string, without the extracted letter. Repeat, until the remaining string has a length of zero. The extracted letters get added to a new string.


Write a program convert a string from uppercase to lower case and vice-versa without using string tolower and string toupper commands in TCL?

[ string toupper $str ] or [ string tolower $str ]


Why and is not using ' and ' in reading a string using scanf?

I guess you wanted to ask, why is it scanf ("%s", array)and not scanf ("%s", &array).Well, array is by definition a pointer to the first element: array = &array[0]