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

Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1.     
    #1
    Banned
    Website's:
    cityvillehelp.com

    Default Turbo C | Help Needed

    Please see this program

    I am not getting the desired output

    PHP Code: 
    #include<stdio.h>
    #include<conio.h>
    #include<string.h>
    main()
    {
        
    clrscr();
        
    char pass[32], ch;
        
    printf("Enter Password : ");
        while(
    1)
        {
        
    ch=getch();
        if(
    ch=='q' || ch=='Q')
        break;
        
    putchar('*');
        }
        
    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();

    can anyone tell what's the problem

    I am getting this output
    prateek Reviewed by prateek on . Turbo C | Help Needed Please see this program I am not getting the desired output :( #include<stdio.h> #include<conio.h> #include<string.h> main() { clrscr(); Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Banned
    Website's:
    cityvillehelp.com
    I am new in Turbo C
    so don't use any new function or any other way


  4.     
    #3
    Respected Member
    Bharat's Avatar
    Website's:
    ShineServers.Com Pickadedi.com
    Use this and it will work !

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

  5.     
    #4
    Banned
    Website's:
    cityvillehelp.com
    this is no joke @ bharat

  6.     
    #5
    Respected Member
    Bharat's Avatar
    Website's:
    ShineServers.Com Pickadedi.com
    Do you look in anyway am joking ? and drop this attitude if you want to get helped by anyone .

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

    Default It is Printing the garbage value of variable pass

    It is Printing the garbage value of variable pass..if you want to save password in variable pass,you should use scanf rather printf ..


    currently ,the variable pass has no value /garbage value..so it is printing garbage value

  8.     
    #7
    Banned
    Website's:
    cityvillehelp.com
    what attitude ??
    in my last post
    i asked for help and i saw ppl posting solutions in different functions ...
    so this time i wrote no to use diff functions ..

    u r taking in wrong way ..

  9.     
    #8
    Banned
    Website's:
    cityvillehelp.com
    thanks for your help Techking

    our teacher is teaching us the these new functions
    so we have to use this function ...
    and 2morow is my exam can't ask teacher also for help


    edit --

    any solution for this
    as we are learning password program and we have to use this functions only

  10.     
    #9
    Respected Member
    Bharat's Avatar
    Website's:
    ShineServers.Com Pickadedi.com
    Quote Originally Posted by prateek View Post
    what attitude ??
    in my last post
    i asked for help and i saw ppl posting solutions in different functions ...
    so this time i wrote no to use diff functions ..

    u r taking in wrong way ..
    So do you look in anyway i did joke or something , you should say what you needed , and i didn't changed the functions just changed its position . Thats all .

  11.     
    #10
    Member
    Website's:
    mnchost.com
    so actually you wanna print the value of password in the screen ?

Page 1 of 2 12 LastLast

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