User Profile

Collapse

Profile Sidebar

Collapse
Rakesh Mutharaju
Rakesh Mutharaju
Last Activity: Sep 22 '06, 04:53 AM
Joined: Sep 1 '06
Location: India
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Rakesh Mutharaju
    replied to changing the date format
    in C
    can u post ur complete code..if the below is not what u want..

    if the input date is 180906 integer.


    unsigned date = 180906;
    char Date_in_DDMONYY[8];
    int date_month = date / 100;
    int month = date_month % 100;
    int date = date_month /100;
    int Digit_in_day = date /10;
    int year = date%1000;
    switch(Digit_in _day)
    {
    case 0:
    Date_in_DDMONYY[0]...
    See more | Go to post

    Leave a comment:


  • Rakesh Mutharaju
    replied to need help
    in C
    one small change..

    in the method void print_num_in_en glish(int num)

    string result is not printed.

    before return; statment add cout<<result;
    See more | Go to post

    Leave a comment:


  • Rakesh Mutharaju
    replied to Nested Loop
    in C
    sorry. But the initialization need not be in place [
    for(initializat ion;condition;i nc/decre) ] if the variable is not altered or need to be reset.



    #include<stdio. h>
    #include<conio. h>
    main()
    {
    int Line_number =1,maxnumber_of stars=6,StarsPe rLine=1;
    clrscr();
    for(;Line_numbe r <= maxnumber_ofsta rs;Line_number+ +)
    {
    for (;StarsPerLine <= Line_number;...
    See more | Go to post

    Leave a comment:


  • To add to this one more hint.,

    PREVIOUS_NODE;
    TEMP_NODE; //
    TEMP_NODE->PTR = NEXT_NODE->PTR;
    if(CURRENT_NODE->VALUE < NEXT_NODE->VALUE)
    {
    NEXT_NODE->PTR = PREVIOUS_NODE->PTR;
    PREVIOUS_NODE->PTR = CURRENT_NODE->PTR;
    CURRENT_NODE->PTR = TEMP_NODE->PTR ;
    }




    ALL the 4 TEMP_NODE,PREVI OUS_NODE,CURREN T_NODE,NEXT_NOD E...
    See more | Go to post

    Leave a comment:


  • Rakesh Mutharaju
    replied to interchange two number
    in C
    yes you are very much right.. i was just considering the case of the particular input which he has mentioned....
    See more | Go to post

    Leave a comment:


  • Rakesh Mutharaju
    replied to Nested Loop
    in C
    Did you give a try?

    that is a simrple task..

    steps:

    int Line_number =1,maxnumber_of stars=6,StarsPe rLine=1;

    for(;Line_numbe r <= maxnumber_ofsta rs;Line_number+ +)
    {
    for (;StarsPerLine <= Line_number; StarsPerLine++)
    {
    printf("*");
    }
    printf("\n");
    }

    for the next sequence.. change the first for...
    See more | Go to post

    Leave a comment:


  • Rakesh Mutharaju
    replied to interchange two number
    in C
    to add something more..

    a= a*b;
    b=a/b;
    a=a/b;

    will also yeild the same desired output...!!
    See more | Go to post

    Leave a comment:


  • Rakesh Mutharaju
    replied to interchange two number
    in C
    int a, b;
    a= 5;
    b= 7;

    a= a+b;
    b=a-b;
    a=a-b;

    this will give the requied solution.. there are couple of more solutions to this..
    the XOR suggested above is also correct.!! :)
    See more | Go to post

    Leave a comment:


  • Rakesh Mutharaju
    replied to cascading increment operator in c++
    in C
    Banfa " Well I actually get 12 11 12" can you explain how this output is evaluated?

    i got 12 11 11. i used a printf statement.

    printf(" %d %d %d" ,i,i++,++i);
    can you explain how the printf will be evaluated?
    See more | Go to post

    Leave a comment:


  • Hey i give a clue.. u give a try urself.
    consider
    ptr [ current node after which u want to insert or delete]
    ptrnew [ is the node to be inserted/deleted]

    Insertion:
    ptrnew->next = ptr->next;
    ptr->next = &ptrnew;

    deletion:

    ptr->next = ptrnew->next;
    free(ptrnew);

    try with this clue.., :D
    See more | Go to post

    Leave a comment:


  • Rakesh Mutharaju
    replied to Problems.
    in C
    #include<time.h >
    #include<stdio. h>
    #include<conio. h>

    void main()
    {
    long time1;
    struct tm strtm;
    clrscr();
    time(&time1);
    strtm = *localtime(&tim e1);
    printf(" \n time %ld",time1);

    printf(" \n time.tm_sec %d ",strtm.tm_sec) ;
    printf(" \n time.tm_min %d",strtm.tm_mi n);
    printf("...
    See more | Go to post

    Leave a comment:


  • Rakesh Mutharaju
    replied to string manipulation
    in C
    #include<conio. h>
    #include<string .h>
    #include<stdio. h>

    void main()
    {
    int i,j,ct=1;
    char c,a[100];
    clrscr();
    printf(" Enter the string: ");
    scanf("%s",a);
    printf("\n string length %d \n",strlen(a) );
    printf("Output :");
    for(i=0;i<strle n(a);i++)
    {
    if( a[i]==a[i+1])
    ct=ct+1;
    ...
    See more | Go to post
    Last edited by Rakesh Mutharaju; Sep 4 '06, 03:01 AM. Reason: wanted to add more explanation..

    Leave a comment:


  • Rakesh Mutharaju
    replied to string manipulation
    in C
    for the first question try doing this..
    1. check for the reappearance of each char in the given string.
    2. sort the list based on the char, check the value of the reappearance is well associated when you sort.

    for the sencond question, small correction in the solution you have tired.

    else
    {
    cout<<a[i]<<ct;//print out the previous letter along with ct
    ct =1; // reset the...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...