User Profile

Collapse

Profile Sidebar

Collapse
vinayvaka
vinayvaka
Last Activity: May 11 '10, 06:32 AM
Joined: Nov 27 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • vinayvaka
    replied to C programming Language : Array
    in C
    i have changed the lineno 7 and 13. it will work.. check

    main();
    {

    int a[100], n, i;
    printf("Enter the number of elements\n");
    scanf("%d", &n);
    for(i=0; i<n; i++)

    {
    scanf("%d", &a[i]);
    }

    for(i=0; i<n; i++)

    {
    if(a[i]%2==0)...
    See more | Go to post

    Leave a comment:


  • vinayvaka
    replied to Using clrscr() without conio.h header file
    in C
    yes it is true that clrscr() function will be in conio.h
    but some times compiler will include this hedder file automatically, i have faced same situation 2years back.Still its our responsibility to include all hedder files where our function definitions are there.
    so dont waste time on this things.
    See more | Go to post

    Leave a comment:


  • vinayvaka
    replied to how this is possible in c(const variable)
    in C
    thanks a lot for all ur replys..

    after reading all messages(9,12,1 5)
    the const variable which is declare in main will save in either code sigment or in flashmem(i accept this two :-)

    no my question is:
    in case of flashmemory we cannot change it because it is read only so leave that part
    in case of codesigment:
    after refering all C books " the variable wich is declare as CONST is saved...
    See more | Go to post

    Leave a comment:


  • vinayvaka
    replied to how this is possible in c(const variable)
    in C
    yes thanks a lot............ ............... ..........
    See more | Go to post

    Leave a comment:


  • vinayvaka
    replied to how this is possible in c(const variable)
    in C
    fine tassos
    const int var =10;
    int *p=&var;
    *p=15;
    if i print the value of var i will give 15 right??
    here what my question is we are changing the value saved in "code sigment" that is readonly memory "var" how its possible..
    hope i understood what i'm tell right??
    please let me know if not??...
    See more | Go to post

    Leave a comment:


  • vinayvaka
    replied to how this is possible in c(const variable)
    in C
    yes.. that was my proble only.. but here we are changing the value saved in code sigment right?? how its possible??...
    See more | Go to post

    Leave a comment:


  • vinayvaka
    replied to how this is possible in c(const variable)
    in C
    i am taking about c not c++. in c i will allow...
    See more | Go to post

    Leave a comment:


  • vinayvaka
    replied to What does this FOR loop means?
    in C
    for (;a!=0;a=a>>1)
    st1;


    first compiler check the value of a; if it is not equal to zero it will proced after that st1 will execute then a will be right shift(>> is a right shift operator) once i.e lets take a value is 8, then binary is 1000 after right shift it will be 0100, so compiler will check the a value again now its value is 4, it will repeate till a value zero.
    See more | Go to post

    Leave a comment:


  • vinayvaka
    started a topic how this is possible in c(const variable)
    in C

    how this is possible in c(const variable)

    hi to all
    i have stuggled a lot with the below code. just see the code and explanation and please tell me ur input on this

    i have a code like this
    void main()
    {
    const int i=10;
    int *p=&i;
    *p++;
    Printf("%d",i);
    }

    value it will display is 10.


    so here my question is accoriding to dennis the variable wich declare as const will...
    See more | Go to post

  • vinayvaka
    replied to How To Learn C And C++ Code Easily
    in C
    that all depends on ur interest. start doing practice in different style you will get it very soon..
    See more | Go to post

    Leave a comment:


  • vinayvaka
    replied to How to pass by reference in C++ .net?
    in C
    It should work.
    call by referece means you have to take like that only
    void mul(int a, int& sum)
    {
    sum=a*a;
    }

    void main()
    {
    int a=10;
    int sum;
    mul(a,sum);
    printf("%d",sum );
    }

    in this case i will print 100 thats sure.. i wont give any error try this agian and let me know if not............ ...
    See more | Go to post

    Leave a comment:


  • vinayvaka
    replied to c++ text book
    in C
    complete reference c++ by Bjarne Stroustrup is really good.
    See more | Go to post

    Leave a comment:


  • vinayvaka
    replied to c++ doubt
    in C
    namespace is the user space where we can define our own data types.
    main use of namespace is to reduce the configs of global. let me explain in detail when we try to declare the global variable, if the same name already exits then we gets the problem, so to avoid this confilgs c++ allowing users to create our own namespace where we can declare our global variables and we can include this namespace in the program.
    using namespace vinay;...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...