Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

C scanf() to read a string

#include <stdio.h>
int main()
{
    char name[20];
    printf("Enter name: ");
    scanf("%s", name);
    printf("Your name is %s.", name);
    return 0;
}
 
PREVIOUS NEXT
Tagged: #C #read #string
ADD COMMENT
Topic
Name
5+5 =