need help about the * thing

you do guys know the atm right? now i want to make in turbo c a program that if you type the password, instead of letters will show (ABC..) it will be asterisk (***)..this is my output.. in the middle " Welcome please enter the password" then below you will enter the password..now i dont know how to make that...if you know..could you please teach me?it will be a huge thank you..coz i have to make this soon before oct 5..i got my finals at oct 6-9 so i realy need help..the next program is calculator..im still trying to think how i will do that..i need to make 3 different kinds of programs at turbo c but i havent made the 3rd yet..i need to use arithmetic operations, logical...If statement, else if...im not very good with this..but im getting the hang of it..but now its all on my own and i don't know what to do..i really need help..pls..help me..make a program with the output that i have told you...thank you

Comments

  • There is no way to do it with standard C. If you use non-standard functions you can use getch() and then print a '*' on the screen.
  • : There is no way to do it with standard C. If you use non-standard
    : functions you can use getch() and then print a '*' on the screen.



    am yeah you can...my professor just did it..now he wants us to figure it out..

  • : : There is no way to do it with standard C. If you use non-standard
    : : functions you can use getch() and then print a '*' on the screen.
    :
    :
    :
    : am yeah you can...my professor just did it..now he wants us to
    : figure it out..
    :
    :
    [color=Blue]You just got your answer:[/color]
    [code]
    int iChar1;
    int iChar2;
    int iChar3;
    int iChar4;

    iChar1 = getch ();
    putch ("*");

    iChar2 = getch ();
    putch ("*");

    iChar3 = getch ();
    putch ("*");

    iChar4 = getch ();
    putch ("*");
    [/code]
    [color=Blue]To improve it - use an array of chars and a loop.[/color]
  • : am yeah you can...my professor just did it..now he wants us to figure it out..

    No there isn't. There are plenty of ANSI compliant routines to watch for keystrokes, but each one of them has an echo (displays the char to stdout).

    Probably the closest you can get is with getch()...which is not standard.
  • To clarify...

    The C language is specified in an international standard by ISO, called "ISO C". This is sometimes also called ANSI C, which refers to the identical american standard.

    The standard is "holy", because it is the only document that defines the language itself. All compiler manufacturers must follow the standard when they create their compilers. If a program is written in pure ISO C, it can be compiled on any C compiler.

    However, there is a lot of things not mentioned in the standard, such as graphics, keyboard handling, hardware-related programming etc. Therefore compiler manufacturers make extensions to the standard. These extensions are often not portable between compilers.

    One example of such an extension is conio.h in the old Turbo compiler. So it will only work on Turbo C, but not on other compilers.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories