User Profile

Collapse

Profile Sidebar

Collapse
APmore
APmore
Last Activity: Dec 19 '10, 07:35 AM
Joined: Jul 31 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • APmore
    replied to Bus Error(core dumped)
    in C
    .. ::Pop()
    {
    if (size_ == 0) {std::cerr << "Stack is empty'\n'";}
    else {return data_[size_-1];} //size_ is initialized to 0 and incremented when item are pushed to the stack and decremented when they are popped
    }


    so when stack is empty, and you are calling pop..you are returning data[-1].{crossed array bounds} .Hence you are getting seg fault because of invalid memory access.

    ~k...
    See more | Go to post

    Leave a comment:


  • APmore
    replied to what does !!a means in C programming
    in C
    That sort of coding is OK.it depends on the context of coding.

    say he might be converting that decimal number to fit in binary logic.
    See more | Go to post

    Leave a comment:


  • so you have to compare two strings: string in record [s1] and user input string[s2]

    Compare the lengths of these two strings;If they are unequal, they dont match.

    If they are equal, compare the characters of these two strings one by one till you encounter '\0'.At any point of character comparision of strings, if they are not equal, these strings don't match.

    Repeat this procedure for each of the strings in the...
    See more | Go to post

    Leave a comment:


  • APmore
    replied to Size of primitive types platform vs language
    in C
    many thanks for the good explanation.

    ......but it deliberately allows compilers to tune the sizes to make best use of the underlying hardware platform.

    What is seen in hardware platform to set the sizes of data types?..like opcode size or memory ..?

    And what about java?how come its machine independent?

    Regards,
    Kishore...
    See more | Go to post

    Leave a comment:


  • APmore
    started a topic Size of primitive types platform vs language
    in C

    Size of primitive types platform vs language

    Hi all,
    I am new to programming.I read the following lines:

    "Size of primitive types in Java is defined in the language specification, whereas in C and C++ it depends on the platform"

    Can somebody explain this clearly?

    thanks in advance,
    Kishore
    See more | Go to post

  • APmore
    replied to How to detect mouse click in C?
    in C
    Thanks for the solution,

    Regards,
    kishore...
    See more | Go to post

    Leave a comment:


  • APmore
    started a topic How to detect mouse click in C?
    in C

    How to detect mouse click in C?

    Hi,

    I am using windows(XP).

    In C, we can use scanf statement to accept any character.

    I want to accept only mouse click as input.

    How can I do in C?

    Thanks in Advance,

    Kishore
    See more | Go to post

  • APmore
    replied to Efficient program ?
    in C
    Sorry for delay--I was with fever.

    I am using the following tutorial for profiling:
    http://www.netbeans.org/kb/docs/cnd/...?intcmp=925655

    kindly, suggest if any better tutorials are there...


    Regards,
    Kishore...
    See more | Go to post

    Leave a comment:


  • APmore
    APmore posted a Visitor Message for kvrajasekar
    Hi,

    I am a new to assembly language programming.
    You said you have 1 year ex in assembly programming;cou ld you tell how learning assembly will help you write efficient c language code?

    whats your assembly platform anyways?

    Regards,
    Kishore
    See more | Go to post

  • APmore
    started a topic Efficient program ?
    in C

    Efficient program ?

    Hi all,

    After writing a program, how do you check whether your program is:
    1. CPU efficient
    2. memory efficient


    How can assembly language learning help in writing an efficient program?


    Regards,
    Kishore
    See more | Go to post

  • APmore
    replied to Flash a random number
    in C
    Yaa ..I think this is a good alternative..

    Keep it up!!

    Thanks,
    Kishore...
    See more | Go to post

    Leave a comment:


  • APmore
    replied to Flash a random number
    in C
    How to wait for 10ms exactly?...
    See more | Go to post

    Leave a comment:


  • APmore
    replied to Flash a random number
    in C
    yaa blink the number on console...
    See more | Go to post

    Leave a comment:


  • APmore
    replied to Flash a random number
    in C
    I mean to blink a random number on screen for every 10ms...


    Ok?

    Thanks,
    kishore...
    See more | Go to post

    Leave a comment:


  • APmore
    started a topic Flash a random number
    in C

    Flash a random number

    Hi all,

    How to flash a random number in c/c++?

    Kindly help...

    Regards,
    Kishore
    See more | Go to post
No activity results to display
Show More
Working...