Search Results

Showing results 1 to 40 of 62
Search took 0.02 seconds.
Search: Posts Made By: ddanbe ; Forum: C and child forums
Forum: C Aug 5th, 2009
Replies: 5
Views: 360
Posted By ddanbe
Please use code tags!
When it is only one line of code I usually post them in bold.
Form your second code listing(just changed one value):
int data[] = { 0, 100, 2, 3, 4, 5, 3, 7 }; /* initialise...
Forum: C May 11th, 2009
Replies: 4
Views: 376
Posted By ddanbe
:icon_exclaim: :icon_rolleyes: :icon_mrgreen:
Forum: C May 8th, 2009
Replies: 2
Views: 647
Posted By ddanbe
I will not complain. This is very good to start with, but if you like this sort of things, please try to learn more about it! That is if you can and if you want to. It can be a very exciting journey!
Forum: C Apr 5th, 2009
Replies: 2
Views: 286
Posted By ddanbe
Leap year : A year is a leap year if it is divisible by 4. Except if it is also divisble by 100, then it can only be a leap year if it is divisible by 400.
Forum: C Mar 23rd, 2009
Replies: 5
Views: 434
Posted By ddanbe
DON'T SHOUT SO LOUD!
I have delicate ears you know...
Forum: C Feb 24th, 2009
Replies: 3
Views: 267
Posted By ddanbe
The syntax is called a ternary operator. It acts on 3 "things".
condition ? do something if condition is true : do something if condition is false.
It is some kind of "shorthand" which is quite...
Forum: C Feb 14th, 2009
Replies: 6
Views: 442
Posted By ddanbe
I think you are referring to your course notes here.
I hope you can read your own language : Habla espagnol?

I googled with bit operations in C the first hit I got was
...
Forum: C Feb 14th, 2009
Replies: 6
Views: 442
Posted By ddanbe
THe best tutorial I can think of is your course notes and your textbook. Or are you missing both?
At least show us what you already have. Please?
Forum: C Feb 2nd, 2009
Replies: 5
Views: 469
Posted By ddanbe
Write say 20 digits down on paper and another 20 or so digits.
Now add them.
Do the same in your compurter program but use arrays and for loops and so on.
Happy computing
Forum: C Jan 24th, 2009
Replies: 4
Views: 328
Posted By ddanbe
Sorry, I thought the last brace was the end of your main function.
Did you not interchange the vars hours and total?
Should
scanf("%d", &hours);
calctotal(total);
not be more something like...
Forum: C Jan 23rd, 2009
Replies: 4
Views: 328
Posted By ddanbe
Put your return statement in your function, not outside. Or what is that curly brace doing before it?
Forum: C Jan 21st, 2009
Replies: 4
Views: 1,697
Posted By ddanbe
Nice. But why make your a string global? Why not pass it to your fn_print() function! It would make it more portable.
Forum: C Jan 19th, 2009
Replies: 5
Views: 1,264
Posted By ddanbe
You do not need to free local variables when the function ends. Where would they be anyway? Who or what could still access them?
Forum: C Jan 13th, 2009
Replies: 13
Views: 785
Posted By ddanbe
Then explain your definition of a subsequence. Would 1,3,5 and 1,2,6 be allright?
Forum: C Jan 13th, 2009
Replies: 13
Views: 785
Posted By ddanbe
You do not have to use ALL the numbers in your subsequences!
So 1,2,3 is a subsequence and 6 is a subsequence, so OK!
Other example 3,5 and 2,6. etc.
Forum: C Jan 13th, 2009
Replies: 13
Views: 785
Posted By ddanbe
What code have you tried yet?
Forum: C Jan 10th, 2009
Replies: 4
Views: 499
Posted By ddanbe
I don't know if it's any help but it won't hurt :
http://www.amazon.com/Expert-NET-2-0-IL-Assembler/dp/1590596463/ref=wl_it_dp?ie=UTF8&coliid=I2QC16YY6G77L6&colid=L6872TYA346B
Most compilers under...
Forum: C Jan 5th, 2009
Replies: 1
Views: 333
Posted By ddanbe
Read all about it: http://en.wikipedia.org/wiki/C_preprocessor
Forum: C Jan 4th, 2009
Replies: 15
Views: 974
Posted By ddanbe
The thing is that enum in C are a sort of integer constants.
So you could also use #define Sunday 0 to accomplish the same thing. You could let the user input a number or character and then add a...
Forum: C Jan 4th, 2009
Replies: 15
Views: 974
Posted By ddanbe
Comment out the scanf for the moment.
Forum: C Jan 4th, 2009
Replies: 15
Views: 974
Posted By ddanbe
Try
today = Sunday; or today = Friday;
Forum: C Jan 4th, 2009
Replies: 15
Views: 974
Posted By ddanbe
An enum under the hood is stored by most compilers as an integer so the name Sunday is really a placeholder for the integer value 0. Monay evaluates to 1, Tuesday to 2 and so on.
You are giving the...
Forum: C Nov 26th, 2008
Replies: 25
Views: 1,812
Posted By ddanbe
Yeah surrealistic!
Ceci n'est pas une pipe!
Forum: C Nov 23rd, 2008
Replies: 4
Views: 1,696
Posted By ddanbe
lol Anyone in for a goose feather?
Forum: C Nov 22nd, 2008
Replies: 25
Views: 1,812
Posted By ddanbe
Well all I can say you is that, this is the rest off the world(excluding Pakistan) and anything can happen here...
Forum: C Nov 19th, 2008
Replies: 25
Views: 1,812
Posted By ddanbe
WHICH ASSIGNMENT??????????

WHAT KIND OF GRAPHICS????????????
Forum: C Nov 17th, 2008
Replies: 1
Views: 1,533
Posted By ddanbe
Start reading!
e.g. Wikipedia.
Search for PREFIX,INFIX and POSTFIX.
Forum: C Nov 9th, 2008
Replies: 2
Views: 1,776
Posted By ddanbe
You want to print a table with the powers of 2 and you want your integers to be signed and unsigned. You're making it to complicated I think, use \t to separate your output. Or use something like...
Forum: C Nov 8th, 2008
Replies: 9
Views: 613
Posted By ddanbe
Hey ArkM, no offense intended.
But be it C, C++ or C# basically they are all the same. I am more proficient in C# than in C, so I expressed myself that way.
Google this latin from my signature :...
Forum: C Nov 8th, 2008
Replies: 5
Views: 586
Posted By ddanbe
C and assembly can make it easier to implement an OS, but in the end it's all machine code :0000101010100000100010100101010101010000011111010101001....
Forum: C Nov 8th, 2008
Replies: 9
Views: 613
Posted By ddanbe
Here is my implementation of a selection sort(in C#)
static void StraightInsertionSort(int[] listtosort)
{
int element;
int ic; //index of element to be...
Forum: C Nov 8th, 2008
Replies: 9
Views: 613
Posted By ddanbe
Have you read : http://en.wikipedia.org/wiki/Knapsack_problem ?

Why are you not able to do so? Please explain.
Forum: C Nov 7th, 2008
Replies: 4
Views: 495
Posted By ddanbe
Well, try this one http://www.is.wayne.edu/olmt/binary/page3.htm
Don't you see a pattern that you can use to count the zeros?
Forum: C Nov 7th, 2008
Replies: 4
Views: 495
Posted By ddanbe
This site might help : http://www.cs.plattsburgh.edu/~salvador/csc453/projects/project1/html/dec2bin_demo1.html
Happy programming!
Forum: C Nov 6th, 2008
Replies: 3
Views: 416
Posted By ddanbe
Follow the suggestion of your friend. A string is an array of char.
Forum: C Nov 6th, 2008
Replies: 3
Views: 416
Posted By ddanbe
Thanks for the recipes!
But what do you really want to do?
I don't understand your question very well.
Have you tried something for yourself in C?
I like to know.
Forum: C Nov 5th, 2008
Replies: 3
Views: 556
Posted By ddanbe
Your swap function has a missing } at the end.
Forum: C Nov 1st, 2008
Replies: 3
Views: 1,356
Posted By ddanbe
Your variable real_root should be b*b - 4*a*c.(Notice the minus sign) Most of the time we call it a "Discriminant", but hey what's in a name.
You might also want to check...
Forum: C Oct 31st, 2008
Replies: 5
Views: 573
Posted By ddanbe
maybe this site will help you out :
http://www.nrbook.com/a/bookcpdf/c4-2.pdf
Forum: C Oct 30th, 2008
Replies: 10
Views: 862
Posted By ddanbe
You are a kind person after all! Peace man!
Showing results 1 to 40 of 62

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC