Changing AIEMD

Would you like to react to this message? Create an account in a few clicks or log in to continue.

The forum is dedicated to all the Aryan who believe in change and want to be changed

Latest topics

» is india lagging behind china??
strings problem no problem EmptyMon Sep 07, 2009 5:15 am by help

» how to install jdk effectively?
strings problem no problem EmptyMon Sep 07, 2009 5:13 am by help

» Money is not everything
strings problem no problem EmptySun Aug 16, 2009 4:42 am by Admin

» general knowledge test 4
strings problem no problem EmptyWed Jul 01, 2009 2:28 am by Admin

» loop problem...
strings problem no problem EmptyMon Apr 27, 2009 12:40 am by help

» companies address with hr email ids
strings problem no problem EmptyMon Apr 27, 2009 12:36 am by help

» Here is a new trick how to hack windows xp's admin password...
strings problem no problem EmptyWed Apr 22, 2009 1:42 pm by Soumen

» Gate Preparation
strings problem no problem EmptyFri Apr 17, 2009 5:40 pm by shubajit

» Now answer this.....
strings problem no problem EmptyWed Apr 15, 2009 7:40 pm by shubajit

HIt counter


2 posters

    strings problem no problem

    avatar
    Diwakar_Rock


    Posts : 8
    Join date : 2009-03-31
    Location : durgapur

    strings problem no problem Empty strings problem no problem

    Post  Diwakar_Rock Thu Apr 02, 2009 3:52 pm

    hi.could any one write a c/c++ program which revers the input string word wise as for example-if inputted string is
    diwakar kumar jha
    output must be-rakawid ramuk ahj Arrow lol!
    avatar
    angshuman


    Posts : 1
    Join date : 2009-04-05

    strings problem no problem Empty RE:strings problem no problem

    Post  angshuman Sun Apr 05, 2009 12:13 am

    #include<stdio.h>
    #include<conio.h>
    #include<string.h>
    void main()
    {
    char nx[100],nz[100];
    int ln,i,k,p=0,n=0;
    printf("enter the string ");
    gets(nx);
    ln=strlen(nx);
    for(i=0;nx[i]!='\0';i++)
    {

    if(nx[i]== ' ')
    {

    for(k=i-1;k>=i-n;k--,p++)
    {
    nz[p]=nx[k];
    }

    nz[p++]=' ' ;
    n=0;
    }


    else
    {
    n++;
    }

    }
    for(k=ln-1;nx[k]!=' ';k--)
    {
    nz[p]=nx[k];
    p++;
    }

    nz[p]='\0';
    clrscr();
    puts(nz);
    getch();
    }
    avatar
    Diwakar_Rock


    Posts : 8
    Join date : 2009-03-31
    Location : durgapur

    strings problem no problem Empty strings problem no problem

    Post  Diwakar_Rock Sun Apr 05, 2009 12:26 am

    good boos keep it up..god bless you..........

    Sponsored content


    strings problem no problem Empty Re: strings problem no problem

    Post  Sponsored content

      Similar topics

      -

      Current date/time is Thu Mar 28, 2024 3:57 pm