Ask your own question, for FREE!
Computer Science 8 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
XShawtyX: Art, Short Writing Assignment: Imagining Landscapes
6 hours ago 2 Replies 0 Medals
XShawtyX: Chemistry, Help ud83dude4fud83cudffe
7 hours ago 13 Replies 1 Medal
kaelynw: tried a lil smt, the arm is off but i like the other stuff
17 hours ago 27 Replies 3 Medals
kaelynw: art igg
16 hours ago 14 Replies 2 Medals
XShawtyX: Art
3 days ago 6 Replies 0 Medals
Nina001: teach me how to draw or just tell me the basics
3 days ago 2 Replies 1 Medal
XShawtyX: We doing another drawing gimme ideas to add to this
3 days ago 9 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!