Read string from user using C Functions
C Programming Language / String functions in C
302Program:
#include #include int main() { int i; char arrayName[100]; gets(arrayName); for(i = 0; arrayName[i] != 0; i++) { printf("%c", arrayName[i]); } }
Output:
Hello Hello
Explanation:
You can user this code for the same program
Note: Though, gets()
 and puts()
 function handle strings, both these functions are defined in "string.h"
 header file.
#include #include int main() { int i; char arrayName[100]; gets(arrayName); puts(arrayName); }
This Particular section is dedicated to Programs only. If you want learn more about C Programming Language. Then you can visit below links to get more depth on this subject.
# C Tutorials
# JAVA Tutorials
# HTML Tutorials
# Computer Fundamental
# Data Structure
# DBMS Tutorials
SQL
# C# Language
# R Language
# PHP
# Python
# Vue JS