User Profile

Collapse

Profile Sidebar

Collapse
Manjiri
Manjiri
Last Activity: Feb 20 '08, 09:13 AM
Joined: Nov 24 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Manjiri
    replied to problem on implementing pointer on string
    in C
    Hello Friend..

    You want to do it by using pointers right...?
    Then first use two character pointers...
    Use two char variables to read the two strings..
    Assign their addresses to character pointers..
    Now pass their address to function by using poiter variables...

    Function strcmp will return 0 if they are equal else any nonzero integer..
    Here you are returning
    ...
    See more | Go to post

    Leave a comment:


  • Manjiri
    replied to Program design
    in C
    Hey it's easy... you just start with it... whatever you have idea you try it to bring it out... later if you face any problem then you can ask hints or help.. And then thescripts memebers will be always ready to sort out with modifications and updations.......
    See more | Go to post

    Leave a comment:


  • Manjiri
    replied to Find Twin Primes between 1 and 1000
    in C
    Ok... it's good then.......
    See more | Go to post

    Leave a comment:


  • Manjiri
    replied to Write this as a single expression help?
    in C
    hello friend here i have the solution...
    Just see is it required one...?#include <stdio.h>

    Code:
    int c;
    int twice(int);
    int main()
    {
    long int num;
    printf("Enter the number\n");
    scanf("%ld",&num);
    c=num;
    num=twice(twice(twice(twice(twice(twice(twice(num)))))));
    printf("Result : %ld\n",num);
    return 0;
    }
    ...
    See more | Go to post

    Leave a comment:


  • Manjiri
    replied to Find Twin Primes between 1 and 1000
    in C
    Ohhh........ Got it.. it's ok......
    See more | Go to post

    Leave a comment:


  • Manjiri
    replied to Find Twin Primes between 1 and 1000
    in C
    Hello friend... here i have the solution... you can see...

    Code:
    /* Find Twin Primes between 1 and 1000 */
    
    #include<iostream.h>
    
    int main()
    {
    int i,j,n,flag=0,prime_number=0,temp;
    cout<<"Enter the number up to which you want to search the twin prime numbers"<<endl;
    cin>>n;
    for(i=3; i<=n; i++)
    {
    for(j=2; j<i; j++)
    ...
    See more | Go to post

    Leave a comment:


  • Manjiri
    started a topic stack operation in recursive function
    in C

    stack operation in recursive function

    Hello everybody...


    I want to know stack operation for recurssive factorilal function..... Means how it exactly returns value and over all calcultion will be carried out...U can follow the below code and explain...

    Code:
    #include<stdio.h>
    int fact(int);
    int main()
    {
    int f,n;
    printf("Enter the number whose factorial you want to find..\n");
    scanf("%d",&n);
    ...
    See more | Go to post

  • This problem has already solved once...
    Just review the history......
    See more | Go to post

    Leave a comment:


  • well friends I am talking about any function which calculates the factorail of given number recursively...

    Any way here is my code... Plz see and exlpain....

    Code:
    #include<stdio.h>
    int fact(int);
    int main()
    {
    int f,n;
    printf("Enter the number whose factorial you want to find..\n");
    scanf("%d",&n);
    f=fact(n);
    printf("Factorial of given
    ...
    See more | Go to post

    Leave a comment:


  • Manjiri
    started a topic stack operation for recurssive factorial function
    in C

    stack operation for recurssive factorial function

    Hello everybody...


    I want to know stack operation for recurssive factorilal function..... Means how it exactly returns value and over all calcultion will be carried out...

    Plz let me know...

    Thank you,
    Manjiri
    See more | Go to post

  • Manjiri
    replied to Flipping a section of an array
    in C
    Hello Friend... This logic will help you to get the result...
    So try it out... I have done little modification in your code.. And whole logic resides in while loop....

    Code:
    #include <stdio.h>
    int  main (void)
    
    {
            int array[5],i,flip,n,f,l,temp;
            printf("How many numbers\n");
            scanf("%d",&n);
            printf("Please enter
    ...
    See more | Go to post

    Leave a comment:


  • Manjiri
    replied to Convert time represented as a string to seconds
    in C
    Fetch the hour field, mins field ans seconds field separately by using memcpy function and then convert each to atoi... you will get the ans.......
    See more | Go to post

    Leave a comment:


  • what those dots represents in public section....?
    If you can include some functions in there then u can call from public member function na.......
    See more | Go to post

    Leave a comment:


  • Manjiri
    replied to factorial
    in C
    Hey Friend it's very easy.... Try it...
    Here i have the solution u can see... But before to that u can try...

    Code:
    #include<stdio.h>
    
    int main()
    {
    int n,i,j,f=1,L=0;
    printf("Enter the number\n");
    scanf("%d",&n);
    for(i=0; i<=n; i++)
    {
    for(j=1; j<=i;j++)
    {
    f=f*j;
    }
    L=L+f;
    f=1;
    }
    printf("%d",L);
    ...
    See more | Go to post

    Leave a comment:


  • Manjiri
    replied to Why the value is getting changed...?
    in C
    Ok............. .. Now i got know.. Thanks friend... I appreciate your talent...

    Manjiri...
    See more | Go to post

    Leave a comment:


  • Manjiri
    replied to Why the value is getting changed...?
    in C
    Hey friend if i execute the same program in c(with index initialised from 1) it is getting executed then how come it is possible...?...
    See more | Go to post

    Leave a comment:


  • Manjiri
    replied to Why the value is getting changed...?
    in C
    Hello friend

    Thank you very much.... it worked but i am not yet cleared with the thing..
    What happens if indexes start with 0 also... why the value n gets changed..?
    Plz clear this also......
    See more | Go to post

    Leave a comment:


  • Manjiri
    started a topic Why the value is getting changed...?
    in C

    Why the value is getting changed...?

    Hello Everybody...

    Here i have the program which prints how many number of times the element appears in the array....
    The code is as follows...

    Code:
    #include<iostream.h>
    
    
    class Count
    {
    
    int a[100],b[100],n;
    
    public:
    void getdata();
    void cal();
    void show();
    
    };
    
    void Count::getdata()
    {
    ...
    See more | Go to post

  • Manjiri
    replied to counting fractional part of a real number
    in C
    Hello here i have the solution... Plz see whether this is required by you....

    Code:
    #include<iostream.h>
    
    int main()
    {
    int i=0,j=0,cnt=0;
    char ch[20],ch1[20];
    cout<<"Enter the floating point value..."<<endl;
    cin>>ch;
    while(ch[i]!='.')
    {
    i++;
    }
    i++;
    while(ch[i]!='\0')
    {
    ch1[j]=ch[i];
    cnt++;
    ...
    See more | Go to post

    Leave a comment:


  • Hello it's very easy... Just think on it and try.. If then too u did'nt get then look on this following solution...

    Code:
    #include<stdio.h>
    int pw(int,int);
    int main()
    {
    int x,n,ans;
    printf("Enter the numbers:base and power\n");
    scanf("%d%d",&x,&n);
    ans=pw(x,n);
    printf("The ans is:  %d\n",ans);
    return 0;
    }
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...