This is what I have attempted so far:
#include <string.h>
int main (void)
{
char name [20];
printf("Enter name\n");
scanf("%s", &name [20]);
}




Posted 04 October 2012 - 04:15 PM
#include <string.h>
int main (void)
{
char name [20];
printf("Enter name\n");
scanf("%s", &name [20]);
}
Posted 04 October 2012 - 04:18 PM
#include <string.h>
int main (void)
{
char name [20];
printf("Enter name\n");
scanf("%s", name); //no need to take the address of with &
}
This post has been edited by jjl: 04 October 2012 - 04:19 PM
|
|
Query failed: connection to localhost:3312 failed (errno=111, msg=Connection refused).
|
