Activity Stream
48,167 MEMBERS
6778 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1.     
    #11
    Banned
    Website's:
    cityvillehelp.com
    i don't have time to play with you , just leave my post

  2.   Sponsored Links

  3.     
    #12
    Banned
    Website's:
    cityvillehelp.com
    Quote Originally Posted by Techking View Post
    so actually you wanna print the value of password in the screen ?
    when the user inputs the values
    the text is shown in astricks
    one astrik for one character (this cannot be done using scanf function that is why i am using the purchar function and getch function )

    and after storing the password in the array

    quit entering password when Q or q is typed

    then we have to display the password


    the getch() function inputs the text from user without echoing ..

  4.     
    #13
    Banned
    Website's:
    cityvillehelp.com
    I modified the progoram

    and now the output is somewhat working
    but still not fully working

    here is the new code

    PHP Code: 
    #include<stdio.h>
    #include<conio.h>
    #include<string.h>
    main()
    {
        
    clrscr();
        
    char pass[32], ch;
        
    printf("Enter Password : ");
        
    int j=0;
        while(
    1)
        {
        
    ch=getch();
        if(
    ch=='q' || ch=='Q')
        break;
        
    pass[j]=ch;
        
    putchar('*');
        
    j=j+1;
        }
        
    printf("\n\n Password is : %s",pass);
        
    printf("\n\n Displaying pass is diff way");
        for(
    int i=0i<=32i++)
        
    printf("%c",pass[i]);
        
    getch();


    outout is



    typed prateek as password

  5.     
    #14
    Banned
    Website's:
    cityvillehelp.com
    Hello,

    Program more simplified by me

    there is only one last problem
    why is the @ sign OR ANY OTHER GRABAGE VALUE comming at the end of the password ??

    PHP Code: 
    #include<stdio.h>
    #include<conio.h>
    #include<string.h>
    main()
    {
        
    clrscr();
        
    char pass[32], ch;
        
    printf("Enter Password : ");
        
    int j=0;
        while(
    1)
        {
        
    ch=getch();
        if(
    ch=='q' || ch=='Q')
        break;
        
    pass[j]=ch;
        
    putchar('*');
        
    j=j+1;
        }
        
    j=j+1;
        
    pass[j]='\0';
        
    printf("\n\n Password is : %s",pass);
        
    getch();



    OUTPUT

  6.     
    #15
    Member
    Website's:
    mnchost.com

    Default try this

    // test.cpp : Defines the entry point for the console application.
    //



    #include<stdio.h>
    #include<conio.h>
    #include<string.h>



    void main()
    {
    int k=0,j=0;
    char pass[32], ch=' ';
    printf("Enter Password : ");

    while(1)
    {
    ch = getch();
    k=k+1;

    if(ch=='q' || ch=='Q')
    {
    pass[j]='\0'; j=j+1; break;}
    else if(((int)ch >32 && (int)ch <123 ) && (ch!='q' || ch!='Q'))
    {
    putchar('*');
    pass[j]=ch;
    j=j+1;
    }


    }
    printf("\n\n Password is : %s",pass);
    printf("\n\n Displaying pass is diff way ");

    for(int i=0; i<j; i++)

    printf("%c",pass[i]);
    getch();

    }

    //complied in Oracle studio Enterprise Edition

  7.     
    #16
    Banned
    Website's:
    cityvillehelp.com
    thxxxxx

    nice buddy

  8.     
    #17
    Banned
    Website's:
    cityvillehelp.com
    rep +1

  9.     
    #18
    Banned
    Website's:
    cityvillehelp.com
    My sir also solved the problem

    the working program is nw
    PHP Code: 
    #include<stdio.h>
    #include<conio.h>
    #include<string.h>
    main()
    {
        
    clrscr();
        
    char pass[32], ch;
        
    printf("Enter Password : ");
        
    int j=0;
        while(
    1)
        {
        
    ch=getch();
        if(
    ch=='q' || ch=='Q')
        break;
        
    pass[j]=ch;
        
    putchar('*');
        
    j=j+1;
        }
        
    pass[j]='\0';
        
    printf("\n\n Password is : %s",pass);
        
    getch();


Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Md5 generation on Turbo C
    By prateek in forum Web Development Area
    Replies: 5
    Last Post: 14th Feb 2012, 08:42 PM
  2. Turbo C | scanf() | strange
    By prateek in forum Web Development Area
    Replies: 14
    Last Post: 14th Feb 2012, 04:24 PM
  3. Turbo C | Weird and amazing
    By prateek in forum Web Development Area
    Replies: 13
    Last Post: 11th Feb 2012, 04:57 PM
  4. Replies: 9
    Last Post: 2nd Dec 2010, 05:00 AM
  5. DEDICATED,ACTIVE NEEDED - Moderators/GM's Needed with BENEFITS
    By robert in forum Community Cooperative
    Replies: 0
    Last Post: 18th Jul 2010, 03:36 PM

Tags for this Thread

BE SOCIAL