scanf() to read a string
C Programming Language / String in C Language
959Program:
/* Author: Atnyla Developer */ #include int main() { char name[20]; printf("Enter Your name: "); scanf("%s", name); printf("Your name is %s.", name); return 0; }
Output:
Enter Your name: Rambo Azmi Your name is Rambo.
Explanation:
This C program illustrates how to read string from terminal.
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