Miscellaneous › Others › bugs in c programming › many problems in your
August 2, 2014 at 8:04 pm
#11972
Participant
many problems in your code
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf(“enter your name n “);
( you have to define it just after main)
char name [74];
char person [74];
(in scanf you have to pass the address of variable like &name)
scanf(“%[^n]s”,name);// scanf can deal in this case with multi word
(use gets and puts for string operations)
printf(“Hello %s! n “,name);
printf(“enter your name n “);
gets(person);
getchar();
puts(“hello “);
puts(person);// a run time problem
}