In this tutorial we will see how we can use the gets() function to receive strings as input and how we can use puts() to display strings on the screen.
Thanks for watching!
Amazon Auto Links: No products found.
In this tutorial we will see how we can use the gets() function to receive strings as input and how we can use puts() to display strings on the screen.
Thanks for watching!
Amazon Auto Links: No products found.
Author: The Bad Tutorials
He is is using code blcok. You can download code block
Why can’t I just use printf and scanf as usual? Why were these things (puts, gets) introduced?
#include
int main()
{
char str[35];
printf(“Enter a string:”);
gets(str);
printf(“The string entered is:”);
puts(str);
return 0;
}
Here you go to check how it works
Programmers which is not from India is scares 🙂
I appreciate that man!
Well what if i want to get a users input? How would I fix char [35] so that i can input more than 35 bytes?
thanks.
Lets say I want to get the user input, how could I possibly store for than 35 bytes?
Thanks bro!!
informative, short and on point. Can’t ask for more Thankss !
Which program are you using for this?
ur gently need help
whats does [ ] mean and if i put [1] it still works why???
This is great bro, thanks 🙂
bro explain the code a bit more rather than just saying what you did or reading out the code on the screen.
thanks
gr8