Courses
Tutorials
Interview Prep
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.4K+ articles
Python
19.6K+ articles
Experiences
15.8K+ articles
Difference Between
3.1K+ articles
C Language
1.3K+ articles
Articles
132+ articles
secure-coding
26+ articles
C Array and String
17+ articles
C-programming
10+ articles
gets
2 posts
Recent Articles
scanf("%[^\n]s", str) Vs gets(str) in C with Examples
Last Updated: 12 July 2025
gets()gets is a more convenient method of reading a string of text containing whitespaces.Unlike scanf(), it does not skip whitespaces.It is used to read the input until i...
read more
Difference Between
C Language
gets
gets() is risky to use!
Last Updated: 23 July 2025
Consider the below program. C void read(){ char str[20]; gets(str); printf("%s", str); return;} The code looks simple, it reads string from standard ...
read more
Articles
C Language
C-programming
gets
secure-coding
C Array and String