Search Results

Showing results 1 to 40 of 59
Search took 0.01 seconds.
Search: Posts Made By: Asif_NSU ; Forum: C and child forums
Forum: C Oct 29th, 2005
Replies: 0
Views: 9,418
Posted By Asif_NSU
Gaussian elimination is designed to solve systems of linear algebraic equations,
[A][X] = [B]

This program reads input from a file which is passed as an argument when calling the program. Say...
Forum: C Apr 10th, 2005
Replies: 12
Views: 3,879
Posted By Asif_NSU
Yup, i had been extremely unlucky, it worked 100% of the times.

>>When the function returned, an automatic array would be released, and the caller would probably get garbage.
I think it's highly...
Forum: C Apr 10th, 2005
Replies: 12
Views: 3,879
Posted By Asif_NSU
I see. Thanks Narue. I really appreciate this.

In your first example you used sprintf:
#include <stdio.h>

int main ( void )
{
char buffer[20];

sprintf ( buffer, "%d", 12345 );
Forum: C Apr 10th, 2005
Replies: 12
Views: 3,879
Posted By Asif_NSU
itoa isn't a standard function, so it may not be available.
>>Hmmm, I just checked it and you are right. I wasn't aware of that.
I tried to investigate the reason behind it and found this...
Forum: C Apr 9th, 2005
Replies: 12
Views: 3,879
Posted By Asif_NSU
Just showing you how to extract digits one by one from an int

#include<stdio.h>

int main()
{
unsigned input, temp;
printf("\nEnter int: ");
scanf("%u",&input);
temp = input;
Forum: C Mar 29th, 2005
Replies: 8
Views: 2,463
Posted By Asif_NSU
Forum: C Mar 29th, 2005
Replies: 5
Views: 2,504
Posted By Asif_NSU
this is causing the crash:
list_of_lists.InsertatLast(implicant_list);

and no my InsertatLast() doesnt take reference. By the way I might have made a mistake writing the copy constructor, please...
Forum: C Mar 29th, 2005
Replies: 5
Views: 2,504
Posted By Asif_NSU
Run time error. I m sure it's related to pointers. Memory error to be specific.
Forum: C Mar 29th, 2005
Replies: 5
Views: 2,504
Posted By Asif_NSU
I have a template linked list class, eg:
LinkedList<int> list1;
LinkedList<implicant> list_imp;
Now I need a Linked List of Linked Lists, This is how I declared
LinkedList<LinkedList<implicant> >...
Forum: C Mar 3rd, 2005
Replies: 8
Views: 15,786
Posted By Asif_NSU
Yes, segmentation fault has chased me long enough when i was learning pointers. Most of the time it gotta do something with the pointers or array. It occurs when...

1. U de-reference a NULL...
Forum: C Feb 15th, 2005
Replies: 14
Views: 3,324
Posted By Asif_NSU
I cant believe u r asking for help again after Narue just did the whole thing for u. You know which letter will stand at the end, only thing left for u to do is to display it. May be u should try...
Forum: C Feb 14th, 2005
Replies: 14
Views: 3,324
Posted By Asif_NSU
According to Josephus problem the standing letter for 'flames' would be 'e', unless u r including the nul character u have in ur string. So r u considering 'flames' or 'flames\0' ?
Forum: C Feb 8th, 2005
Replies: 5
Views: 3,290
Posted By Asif_NSU
Ha ha! There are so many ways to do it. The easiest process is to try divide the number with every number less than (or half of it) and see if it has the remainder 0. If it does then check if the...
Forum: C Feb 8th, 2005
Replies: 11
Views: 103,124
Posted By Asif_NSU
Would have been better if it were a template class.
Forum: C Feb 8th, 2005
Replies: 7
Views: 14,995
Posted By Asif_NSU
Great! Although a bit more comments would have made it an easy read for the beginners.
Forum: C Jan 10th, 2005
Replies: 7
Views: 10,446
Posted By Asif_NSU
This is unbelievable. There is no reason to scuttle a project because someone used bubble sort. It just needs to be replaced with a better sorting algorithm and that's all. I am a moronic bobo but i...
Forum: C Jan 9th, 2005
Replies: 7
Views: 10,446
Posted By Asif_NSU
First I would like to make ur bubble sort implementation a bit shorter so that it doesnt look bigger than ur insertion sort which i believe u did intentionally.

void bubble_sort(int array[], int...
Forum: C Jan 9th, 2005
Replies: 7
Views: 10,446
Posted By Asif_NSU
Yes Bubble sort is the least efficient algorithm available.
However, for small data sets it doesnt matter much what sorting algorithm u use. And bubble sort does have a few good qualities. Apart...
Forum: C Jan 9th, 2005
Replies: 7
Views: 10,446
Posted By Asif_NSU
#define SIZE 10
... ... ...
int main()
{
int a[ SIZE ];
... ... ...
... ... ...

printf("enter the number of elements in an array:");
scanf("%d",&n);
Forum: C Dec 22nd, 2004
Replies: 8
Views: 13,481
Posted By Asif_NSU
to varunrathi,

I believe u need to be a little more specific with ur problem. We also need to know a few more things...

1. U r using static arrays right? Why dont u try dynamic memory...
Forum: C Nov 26th, 2004
Replies: 5
Views: 1,925
Posted By Asif_NSU
Suppose i have a linked list of say integers. So whenever i add a new integer to that linkedlist i also:
1. calculate the hash code for that integer
2. add a pointer to that integer into the...
Forum: C Nov 25th, 2004
Replies: 5
Views: 1,925
Posted By Asif_NSU
This is probably a stupid question, but i dont get the answer. Plz help me understand.

Question:
How could a linked list and a hash table be combined to allow someone to run through the list...
Forum: C Nov 25th, 2004
Replies: 17
Views: 3,280
Posted By Asif_NSU
why is everyone so much into STL?
Did i not explain why i dont want to use STL? Cos i m not into it yet. My knowledge on C++ is limited. Well what the heck, i have done it by parsing -- seems like...
Forum: C Nov 24th, 2004
Replies: 17
Views: 3,280
Posted By Asif_NSU
"EOF"
>>I did try that too. But the problem is when i signal the EOF it stops taking input alright but doesnt take any other inputs after that. Say after inserting the page numbers the user might...
Forum: C Nov 23rd, 2004
Replies: 17
Views: 3,280
Posted By Asif_NSU
Well i got ur point. Can u suggest me any other technique to read in the page numbers easily one by one untill we meet some "end condition". What would be a smart end condition?
Forum: C Nov 23rd, 2004
Replies: 17
Views: 3,280
Posted By Asif_NSU
I do have a linked list of integers and i have to insert the page numbers into it, but thats not the problem --the problem is about the end condition when it will stop inserting.
Forum: C Nov 23rd, 2004
Replies: 17
Views: 3,280
Posted By Asif_NSU
To Jwenting,
ahem ahem,:rolleyes:
Thanx for that boss,BUT
i havent learned to use STL yet, and i dont plan to use them until i study them thoroughly and that's not gonna happen anytime soon. Do u...
Forum: C Nov 23rd, 2004
Replies: 17
Views: 3,280
Posted By Asif_NSU
I want to take integer inputs separated by spaces and terminated by newline character. suppose the user will be inserting integers this way
123 566 789 45 34 8999 341 57 67 and then the user...
Forum: C Nov 23rd, 2004
Replies: 7
Views: 6,941
Posted By Asif_NSU
thanx for all that. I will be working on it and will let u know if i can pull it through.
Forum: C Nov 23rd, 2004
Replies: 7
Views: 6,941
Posted By Asif_NSU
>>I know it's weird, and yes thats just bcos it was the assignment. You said i could do this with running average, could u plz show me how?That's what i have been trying to do. Unfortunately, i dont...
Forum: C Nov 22nd, 2004
Replies: 7
Views: 6,941
Posted By Asif_NSU
i wanted to see the findaverage function independent. Most of my friends solved the problem using a global variable total and some did using static variables(none of which i liked). There are two...
Forum: C Nov 21st, 2004
Replies: 7
Views: 6,941
Posted By Asif_NSU
I need to add a recursive function, called findaverage() into BST class that takes as input the root of the BST and returns the average of the entire integer items stored in that BST of integers.
...
Forum: C Nov 14th, 2004
Replies: 10
Views: 3,114
Posted By Asif_NSU
I am not sure, but what i get from SelArom's post is that he wants to know if a variable name has any impact on the program i.e if i use
int this_is_just_for_fun_and_to_waste_ur_precious_time;...
Forum: C Nov 14th, 2004
Replies: 5
Views: 3,522
Posted By Asif_NSU
I would like to see what kind of response u get.
I just have one thing to say OMG
Forum: C Nov 14th, 2004
Replies: 8
Views: 20,116
Posted By Asif_NSU
>>This book will suck ur brain out.
Forum: C Nov 13th, 2004
Replies: 20
Views: 16,576
Posted By Asif_NSU
Whaatttt? i thought Narue was a guy!!!http://daniweb.com/techtalkforums/techtalk-images/smilies/fiyellow/icon_lol.gif

Well she is a good programmer but an even better critic.
Forum: C Nov 13th, 2004
Replies: 6
Views: 4,122
Posted By Asif_NSU
"Not unless the terminal stream supports seeking, doesn't discard previously read input, and you know exactly how many characters were read on the first pass."
>>could u plz provide me with an...
Forum: C Nov 12th, 2004
Replies: 6
Views: 4,122
Posted By Asif_NSU
hmmm, i did thought of these possibilities , but i think saving it into a file is much a easier process. So theres actually no way to read things back from console, i reckon.
Forum: C Nov 8th, 2004
Replies: 6
Views: 4,122
Posted By Asif_NSU
I have a weird situation. Suppose a string will be entered as an input. using the getchar() function i count the number of characters the string contains until a new line character is encountered. So...
Forum: C Oct 14th, 2004
Replies: 13
Views: 3,974
Posted By Asif_NSU
errr... sorry i forgot that sin() functions return value must be between -1 and 1 inclusive. What I should have said is that sin() takes a double as it's argument but takes it as if it is in radian...
Showing results 1 to 40 of 59

 


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

©2003 - 2009 DaniWeb® LLC