How to use PigLatin() function in C programming? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to use PigLatin() function in C programming?

I want to use function PigLatin but i didn't get how to use it. Can anyone give me a hint that how can i use it.

3rd Jan 2020, 2:04 PM
Sanjeet Kumar
Sanjeet Kumar - avatar
3 Answers
+ 1
Hi Sanjeet Kumar Did you defined the function PigLatin() before or after the main() function? If you defined it after the main() the compiler will not recognise it when you call it from the main(). A simple solution is to put a declaration of the function before the main().
4th Jan 2020, 1:59 AM
Mark
+ 1
You can take up input word by word, storing them in char arrays, for example with scanf. And then, for each word you print them out just as the task describes it, by indexing the letters you need, in a loop. You have finished the C tutorial, you definitely should have what it takes. Think about it! Try! Experiment! Find a way!
3rd Jan 2020, 5:24 PM
HonFu
HonFu - avatar
+ 1
Sir HonFu, you gives the idea that how i can create a program for Pig Latin. But as you write " PigLatin " the compiler takes it as a predefined funtion which i want to use.
3rd Jan 2020, 5:58 PM
Sanjeet Kumar
Sanjeet Kumar - avatar