Ask your own question, for FREE!
Computer Science 18 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
Graysonunderwoods: Have you even been beaten by a wet spaghetti noodle by your girlfriend because sh
2 minutes ago 48 Replies 1 Medal
AsianPanda08: What should i eat for dinner tonight? I can't choose
1 hour ago 51 Replies 2 Medals
Nina001: Trying 2 figure out what is the square root of 8746685
33 minutes ago 30 Replies 2 Medals
SnowyBreaks: Is it bad to lose 3.8 pounds in less than 2 days?
1 hour ago 43 Replies 0 Medals
kaelynw: tried a lil smt, the arm is off but i like the other stuff
18 minutes ago 15 Replies 2 Medals
laylasnii13: Who wanna write or make a song with me???
5 hours ago 8 Replies 0 Medals
kaelynw: art igg
13 hours ago 13 Replies 2 Medals
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!