lol yes, that would be the physical limit and in real world perhaps not many end users would like to match that limit.
Anoop.
Type: Posts; User: anoopks
lol yes, that would be the physical limit and in real world perhaps not many end users would like to match that limit.
Anoop.
Hi,
First of all apologies if this is not the right forum.
This is a first of its kind for me. There is an existing 32 bit C application that needs to be ported to a 64 bit machine. Now...
Thanks a lot :)
:) That was a reply to SMurf who wanted t o know what exactly I had meant by that. As I said, I would try out Nyda's code. I did. Now I am hunting for resources on the net on those functions,...
Thanks a lot.
I wanted to know how is main() called by the compiler. I guess I should have mentioned the OS I am using. Fedore Core 2. I will try the piece of code Nyda has given. Thanks a lot for...
Hi,
Was wondering how to locate resources on the net that tell me the internals of C, how the main() is called? I tried googling with "C internals", "how main() is called" and the like but in...
take a bow.
And the queue one is really elegant.
Let me find out which guy interviewed my friend and make sure he interviews me if I indeed apply in that company. ;>)
Thanks,
Anoop
yep. Good one.
Thanks,
Anoop
>>I think you may be missing a requirement. Single linked lists cannot be travered backward unless a forward traversal has already been stacked explicitly or with recursion.
Thats precisely the...
Nope.
But just thinking, ummmm would it matter? Anyway you can go only in the forward direction and whether you come to the end of the list by testing if
tmp-> next == NULL or ...
One of my friends was asked the following question in an interview, just a couple of days back.
Given a single linked list, how can you find out the nth element, from the end, while traversing...
>I think you read the code wrong. My copy shows "N--;" inside of the last loop:
Precisely. I am also refering to the same statement. I am unable to comprehend the need for N--;
Anoop.
I am sorry, if this is a wrong question in this forum.
It has been quite a while since I have coded in C and last week, I decided to finish atleast one Algo book cover to cover(or atleast try),...
Okie that ";" obviously was a typo. Sorry for that.
As tzuchan has pointed out, it exists in C.
Now, defining N might not work since the compiler would look for
#define TOKEN VALUE
and...
Can I find the factorial of a number using conditional operator in a macro definition?
#define fact(n) ( n == 0 ? 1 ; (n*(fact(n-1) ) ) )
since recursive definition is not allowed in macros,...
Suddenly my english has become worse from bad.
>>>>is it possible to open another source code as a program with the current source code you are editting?
I did not understand the question.
...
You can use strtok() for the same. Look up the man pages.
Anoop.
A standard practice in such cases is using 'enum' 's. You can look up for it in any book or google.
Anoop.
What compiler you are using? I am not sure if system() command works on microsoft platforms. And from "copy" it looks like microsoft platform. Anyways, its a very expensive command.
Instead you...
>>>>It may be that printf doesn't recognize your data type as an integer.
If its typedef'ed, I dont think it should be a problem. But thats only a guess. Could you post the entire/relevant code...
If you know the size, which I am sure, you wont, you could have declared a double array.
however you can either declare char **str; and simulate it or you can declare a linked list.
A little...
>>how do i initialize a char array, so i'll be able to put words in it at a runtime?
Do you want to initialize it or do you want to take it at run time? If you initialize it, you will fix the size...
>>>well then let me see you convert a 10000 line C++/C program to ASM and let me see how effeciently it will run.. obviously you can not convert all that in an optimized manner..
He never said...
Can you post your code?
Anoop.
>>>PS: If there are any glaring errors or just bad practices in my code, I be grateful if someone would let me know.
Just that it would be nice to do away with as many global variables as...