Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   output of the program (http://www.go4expert.com/forums/output-program-t2044/)

karun_happy 29Nov2006 01:24

output of the program
 
Help me out her i m new to C
i have made one program and i m not getting its output... can anybody tell me how to get it's output..herew is the sorce code

Code:

#include<stdio.h>
#include<conio.h>
void main()
{
int i=0;
char ch[25],c;
printf("enter ur name n press 0 to exit");
do{
c=getch();
ch[i]=c;
i++;
}while(c!='0');
i=i-1;
ch[i]='\0';
}

in this program i want to ask the user his/her name and enter each character the name one by one and after entering the name end the program as i have done in this program.in this program,i have used 0 to end it...problem i m getting is that everything is fine--its compiling and when i enter any character it doesnot enter anything and when i press 0 to end it,it ends,,,so tell me how i can get its output...or is ther any other way to do this .
plz suggest
thanxs
Regards Karun

shabbir 29Nov2006 10:16

Re: output of the program
 
You have posted it as an Article under the Article / Source code section. I have moved it to the Queries and Discussion forum.

Duplicate of help me. Thread closed.


All times are GMT +5.5. The time now is 01:30.