Ask your own question, for FREE!
Computer Science 26 Online
OpenStudy (anonymous):

why use fflush(stdin) in C programming language?

OpenStudy (e.mccormick):

You don't. I have answered this about 20 times. Just Google it There are lots of documents on why it breaks things.

OpenStudy (anonymous):

int i=0; gotoxy(15,15); printf("Enter password:"); gotoxy(15,16); printf("***************"); gotoxy(30,15); while(ch!=13)// 13 ascii code for enter {ch=getch(); if(ch!=13) {putch('*'); pass[i]=ch; i++; }} pass[i]='\0'; if(strcmp(pass,Password)==0) { gotoxy(40,16); printf("password matched"); Sleep(2000); system("cls"); main_menu();} else {system("cls"); gotoxy(15,18); printf("Wrong password"); char p; gotoxy(15,19); printf("Do you want to re-enter password(Y/N):"); p=getche(); if(p=='Y') {system("cls"); password(); } else exit(0); } }plz explain the func \

OpenStudy (e.mccormick):

Well, what part of it are you having trouble with? Also, this looks like incomplete code.

OpenStudy (anonymous):

yes thz is only password func i want to ask that why we do pass[i]=NULL outside the loop why n t inside

OpenStudy (e.mccormick):

It is a null terminated string. Inside the loop you are doing the string. Outside, you terminate with a null.

OpenStudy (anonymous):

ok thanks for ur concern :-)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
whiteybulger: Should I drop this song i made last night in the studio
5 hours ago 50 Replies 0 Medals
Stewart: How do you know which tribe belongs to which reservation?
10 hours ago 2 Replies 0 Medals
Breathless: What is vaka blast made out of?
19 hours ago 3 Replies 0 Medals
EdwinJsHispanic: another singing vid but for the people who knows spanish
19 hours ago 16 Replies 1 Medal
EdwinJsHispanic: another singing vid, please give me your thoughts on it
1 day ago 20 Replies 2 Medals
SwaggyMark: Need help on process of annuity problem
2 days ago 3 Replies 0 Medals
SwaggyMark: Need guidance on how to solve this annuity problem
2 days ago 25 Replies 1 Medal
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!