Re: i need help about Turbo C
- From: "Manmeet Mittal" <manmeet_mittal@xxxxxxxxx>
- Date: 17 Jul 2006 11:49:44 -0700
sarathy wrote:
pipito wrote:
Hi...i am a beginner in C programming...
my question is like this...
im using the scanf in C to accept input data in output area,
printf("name: ");scanf("%s",name);
printf(Address: ");scanf("%s",address);
printf("age: ");scanf("%d",age);
when i run the program, i use a spacebar in the input data, the
following string after i press the space bar doesnt read anymore or it
skip and going to the next line
name: pipito otso
address: manila philippines
age: 18
Hi Pipito, This is manmeet Mittal, U can also write the code as follows :-
printf("\n Name"); scanf("%s",name);
printf("\n Address"); scanf("%s",address);
printf("\n Age"); scanf("%d",&age);
' \n ' is an escape sequence which causes the output in new line. In input of age u can >> use ' & ' ampersand. U can also write code to input a string as follows :-
puts("\n Name"); gets(name);
I think it will serve your purpose. If u have any query then send ur queris.
Name :-Kumar Gaurav
address :-India
age 19
.
- Follow-Ups:
- Re: i need help about Turbo C
- From: Simon Biber
- Re: i need help about Turbo C
- References:
- i need help about Turbo C
- From: pipito
- Re: i need help about Turbo C
- From: sarathy
- i need help about Turbo C
- Prev by Date: Re: i need help about Turbo C
- Next by Date: Re: How to write a small graceful gcd function?
- Previous by thread: Re: i need help about Turbo C
- Next by thread: Re: i need help about Turbo C
- Index(es):
Relevant Pages
|