Posts
 
Reputation
Joined
Last Seen
Ranked #440
Strength to Increase Rep
+7
Strength to Decrease Rep
-1
66% Quality Score
Upvotes Received
38
Posts with Upvotes
25
Upvoting Members
22
Downvotes Received
23
Posts with Downvotes
14
Downvoting Members
10
13 Commented Posts
~55.5K People Reached
About Me

I'm the type of guy who says "I don't know the answer" if I really don't know the answer and who says "You're right and I'm wrong" if I really think so. And no, I didn't copy this from "In Pursuit Of Happiness".…

Interests
Varied
PC Specs
Computer Specs - Beyond hopeless! OS Flavor - Windows XP but I like the MAC OS (which means a hole through…
Favorite Forums
Favorite Tags
c x 122
c++ x 28

76 Posted Topics

Member Avatar for kittycat07us

This type of problem is best solved with the help of recursion Here is the algorithm accept [number] if number is greater than 9 extract numbers and multiply them together till the original [number] becomes zero send the result as parameter to this function if number is not greater than …

Member Avatar for Hassan_39
0
11K
Member Avatar for ~s.o.s~

Even after starting C, most books (or links) only say what we should do. But the user(for me example) remains ignorant about the "DO NOTS", and by mistake, might indulge into the wrong programming practices. [URL="http://www.ibm.com/developerworks/aix/library/au-hook_duttaC.html"]This[/URL] link will surely help.

Member Avatar for mack1
29
5K
Member Avatar for Vandithar

Use [URL="http://sourceforge.net/projects/codeblocks/"]Code::Blocks [/URL] No problems and no hassles!

Member Avatar for maha harshini
0
407
Member Avatar for nakul_pancholi

[QUOTE=jonsca]I don't believe there is any standard method for reducing the text size.[/QUOTE] This is the crux of the problem. You cannot view more than 50 lines at a time in DOS mode (as far as i know). But there is a trick. It involves pausing the screen after every …

Member Avatar for arulgee6
0
1K
Member Avatar for xavier666

I've tried to make a [URL="http://en.wikipedia.org/wiki/Deque"]DEQUE[/URL] program. My book on data structures (Seymour Lipschutz) doesn't have an algorithm on DEQUES. Neither does [URL="http://www.itl.nist.gov/div897/sqg/dads/HTML/deque.html"]DADS[/URL] give a good description. All I heard was that it could be implemented better with two lists (one forward and one backward) & there are 2 types …

Member Avatar for WaltP
0
261
Member Avatar for dhsn

I would suggest [URL="http://sourceforge.net/projects/codeblocks/"]Code::Blocks[/URL]

Member Avatar for nilay2141992
0
306
Member Avatar for bantex07

I hate bringing up old threads but I was thinking about this but did not have the courage of asking a MOD but this seems like a good opportunity. So, can i make a list of Common malpractices of C?

Member Avatar for WaltP
-2
153
Member Avatar for maverick405

There you go [CODE]#include <iostream.h> #include <conio.h> int i; int a[10]; int main() { cout<<"\n\n\tEnter The 10 Numbers : \n"; for(i=0;i<10;i++) { cout<<"\t"; cin>>a[i]; } cout<<"\n\n\tThe 10 Numbers In Reverse : \n\t"; for(i=9;i>=0;i--) { cout<<a[i]<<"\t"; } return 0; }[/CODE]

Member Avatar for Rootz
0
154
Member Avatar for xavier666

I was writing a file copying program. Mind you this is an any file copier. That is, at this moment, this function can copy only text files but i'm trying to copy mp3 files, avi files, mkv files etc, which this cannot. Here is just the copying function. However it …

Member Avatar for ronnieaka
0
118
Member Avatar for vanan4u

Hello vanan4u These are your errors 1) You have declared the return type of main as void but returned an integer. It is recommended to use int main(). See [URL="http://www.gidnetwork.com/b-66.html"]here[/URL] 2) You have made a system call, however forgot to include the necessary header files for the function (stblib.h). However, …

Member Avatar for mfaisalm
0
187
Member Avatar for xavier666

Okay this program is really pissing me off! After line 95, the member variable is suddenly getting changed (That is, the 2nd string). Even after looking at it for 3 hours, I've failed to crack it :( Please help me out guys! [CODE] # include <iostream> # include <cstring> using …

Member Avatar for xavier666
0
146
Member Avatar for ontherocks

I would suggest you to read the chapter on pointers from your text-book before asking such questions here. These topics are covered in any standard books... Here is the syntax... [CODE] #include <iostream> using namespace std; void func(int array[]); int main() { int array[] = {10,20,30,40}; func(array); // func(&(array[0])); // …

Member Avatar for ontherocks
0
158
Member Avatar for sana_moi
Member Avatar for safe2010
0
245
Member Avatar for xavier666

Here is a very simple code demonstrating how 'protected' is used [CODE]# include <iostream> using namespace std; class A { protected : int a; }; class B : public A { public : void f_1() // * { a = 10; cout << a; } }; int main() { B …

Member Avatar for Fbody
0
115
Member Avatar for gaurav_13191

[CODE]#include<conio.h>[/CODE] This code hurts :O [QUOTE]I tried but could not find any other mistake which could have caused runtime error.. Can you please help!![/QUOTE] We here will not directly give you the answer. Check again. You'll find the error... Give us the new corrected code...

Member Avatar for arkoenig
0
110
Member Avatar for iceman29

[QUOTE]its so easy!!!![/QUOTE] It's the I-know-the-answer-but-I-won't-tell syndrome. It generally happens to people who suffer from I-don't-know-the-answer Don't be too hard on him...

Member Avatar for xavier666
0
204
Member Avatar for danny.chungie

Wow! You're so close! Just fill in the last two functions and you're done. Then you'll see that you don't even need our help. You also need to attach the ass1.h file to your post and give proper code tags...

Member Avatar for ithelp
-1
152
Member Avatar for farooqaaa

Well, I'm a noobie but when I have to send an entire structure array, I just send the pointer to the 1st position of the array. Here is a sample code [CODE]# include <iostream> using namespace std; typedef struct AA { int a; }A; void print (A *struc_point) { cout …

Member Avatar for farooqaaa
0
260
Member Avatar for Aia

Dave, Will be [B]really[/B] missing you. Whenever I saw that Dave has replied to my post, it meant that my query has been solved. It's a shame that I couldn't know you better. All I know that you were a gifted programmer and a true gentleman, always polite and full …

Member Avatar for sureronald
9
625
Member Avatar for selviManoharan

You know what, one could start a [U]Hall Of Fame[/U] for such posts like [URL="http://bash.org/?top"]Bash[/URL] We could show the new users what type of posts [B]not[/B] to make.

Member Avatar for peter_budo
-7
117
Member Avatar for xavier666

I've come across two questions from my previous years college test papers. I just couldn't solve them [LIST=1] [*][I]Define rational number as an ADT (abstract data structure)[/I] [*][I]Write a suitable C code to sort a finite set of elements where an element may appear a large number of times[/I] [/LIST] …

Member Avatar for Narue
0
145
Member Avatar for reshmasalian

If I ask you what does [icode]printf("Hello");[/icode] mean. You'll most probably say [QUOTE]It prints "Hello" on the screen[/QUOTE] but you didn't answer my original question about its...uh..."meaning" (which it doesn't have). You only stated its purpose. So please rephrase your questions If your questions were [QUOTE]What are the differences between …

Member Avatar for sanji17
-4
195
Member Avatar for aianne

@aianne I would recommend you scrap that compiler (which supports non-standard header files) and get yourself a new one that supports C99 I would recommend [URL="http://sourceforge.net/projects/codeblocks/"]Code::Blocks.[/URL]

Member Avatar for Top9ne
0
1K
Member Avatar for Xufyan

Do you know this feature of characters in C? [CODE]char ch = 'A'; ch = ch + 1; printf("%c", ch);[/CODE] Output [CODE]B[/CODE] Now, you said ASCII code of 'A' = 65 & ASCII code of 'a' = 90, hence try to figure how much you should add/subtract from a character …

Member Avatar for Xufyan
0
211
Member Avatar for gabz16
Member Avatar for xavier666

Okay, this time, i have to say it's a weird error. This code runs fine in Code::Blocks 8.02 but fails to run in my college compiler. I think my college compiler is the GCC Compiler (same as my home compiler) but in LINUX environment. Something like [CODE]vi sort.c cc sort.c …

Member Avatar for Banfa
0
652
Member Avatar for missmedude
Member Avatar for WaltP
0
112
Member Avatar for Xufyan

Are you trying to do something like this? [CODE]Enter The Number - 7 7 % 2 = 1 7 % 3 = 1 7 % 4 = 3 7 % 5 = 2 7 % 6 = 1[/CODE] Your for loop is a bit faulty. If you can correct that, …

Member Avatar for Xufyan
0
126
Member Avatar for Iam3R

I just heard from a source that some systems treat [icode]return 0[/icode] as a "function gone wrong". So to avoid platform dependencies, one should use [icode]return EXIT_SUCCESS[/icode] Is this all correct?

Member Avatar for nezachem
0
226
Member Avatar for omgaga

[QUOTE]Currently, i was assigned to create an array, [B]which i have no idea what array is[/B].[/QUOTE] Oh come on! Then I (along with several others) would suggest you to read your C Programming book before diving into such problems

Member Avatar for Fbody
0
92
Member Avatar for mirness

[QUOTE=mirness]it's about binary trees [B]but we'll use names instead of numbers or single chars[/B][/QUOTE] Can you make a binary tree using numbers or single characters? If you can, post that attempt. If you can't, you have to go back to square one and read the theory first.

Member Avatar for xavier666
0
53
Member Avatar for retchedmonkey

You might wanna see that in LINE # 20 & 21, you messed up the comments. It should be like this [CODE]printf("%s\n", s); /*Testing the string was infact inputted*/ for (i = 0; c != '\0'; i++)/*Traverses the character string until EOF*/[/CODE] I was just thinking, can we give more …

Member Avatar for xavier666
3
432
Member Avatar for lionaneesh

LINE 13 - while(c < 5) When c = 4, array index is out of its bounds. The problem with C is that it C will not check for such array out of bounds conditions. The program will compile and run but will give the error at the end of …

Member Avatar for xavier666
0
126
Member Avatar for iNach

[QUOTE=iNach][CODE]#include <conio.h> #include <iostream> int main(int argc, char *argv[]) { char k; k = getch(); if (k==27) printf("ESC pressed.\n"); return EXIT_SUCCESS; }[/CODE][/QUOTE] Agreed but what are you going to do about this thing -> [icode]conio.h[/icode] Mind you, your code is not portable at this point. (Unless you make an exe …

Member Avatar for xavier666
0
8K
Member Avatar for xavier666

I just received the MERGE SORT code from my friend, here it is [CODE]void sort_merge (int *array, int low, int high) { int mid; if (low < high) { mid = (low + high) / 2; sort_merge (array, low, mid); sort_merge (array, mid + 1, high); array_merge (array, low, high, …

Member Avatar for xavier666
0
4K
Member Avatar for lionaneesh

You could've posted a list of books you [U]didn't[/U] find useful. You can try [URL="http://pweb.netcom.com/~tjensen/ptr/cpoint.htm"]this[/URL] You should take it slow while studying this book

Member Avatar for jonsca
0
169
Member Avatar for HBK_100

[QUOTE]You cannot write [CODE]username == 'udental'[/CODE][/QUOTE] It's not that he cannot write it. Technically speaking, it's not a syntax error but it will always be evaluated to false. (At least my Code::Blocks compiler tells me that) As per my knowledge, we are trying to check the equality of two char …

Member Avatar for jonsca
0
110
Member Avatar for COKEDUDE

You could also do something like this [CODE] .... char input[10]; int converted_number = 0; int length; int i = 0; printf("Enter Input : "); fgets(input,10,stdin); input[strlen(input) - 1] = '\0'; if(strlen(input) > 2) // number is within 20 hence must be within 2 digits { printf("Invalid"); return 0; } …

Member Avatar for sumitunya
0
2K
Member Avatar for xavier666

Let's say we want to free the total memory used by a linked list in a program, I generally do it like this [CODE]typedef struct linked_list { int some_data; struct linked_list *link; }NODE; int free_memory(NODE * head) { NODE * temp = NULL; if(head == NULL) return 0; // FAILURE …

Member Avatar for Ancient Dragon
0
98
Member Avatar for latszer

@latszer Hello, LINE 17 - You cannot assign a array to another array I think you were trying to use the [icode]==[/icode] sign but it is not allowed for strings, i'e, [icode]username_1==usercheck[/icode]. It will not give any error but it will always be evaluated to false. Use [icode]strcmp[/icode] as Dave …

Member Avatar for Narue
1
221
Member Avatar for bobbyross
Member Avatar for ithelp

[QUOTE]If you just have a text editor you can probably write a program to pare down your code to the strings (marked by a line number), import that into word, correct everything and make your changes by hand. [/QUOTE] But the problem with that method is that it will even …

Member Avatar for Dave Sinkula
0
95
Member Avatar for xavier666

[B]Here is the sample program[/B] [CODE]# include <stdio.h> # include <stdlib.h> // COMPILER : GNU GCC COMPILER // EDITOR : CODE::BLOCKS 8.02 struct test { int data; struct test *link; }; void change(struct test *ptr); int main() { struct test *fresh = (struct test *)malloc(sizeof(struct test)); int some_data = 10; …

Member Avatar for xavier666
0
144
Member Avatar for Gaiety

[CODE]#define CHK_REM_2_3_5( n ) ( REM_2( n ) && REM_3( n ) && (REM_5( n ) )[/CODE] @Gaiety I think there are more divisors other than 2, 3 & 5 Please clear your concept of prime numbers

Member Avatar for Gaiety
0
2K
Member Avatar for fete
Member Avatar for xavier666
-2
110
Member Avatar for abhimanipal

[QUOTE=niek_e]When they give you this just put on a disgusted face and walk away[/QUOTE] Don't you think that they will feel that aspirant has chickened out after seeing the code

Member Avatar for xavier666
0
142
Member Avatar for iamcreasy

And try not to use [icode]gets()[/icode]. It's an erratic function. To cut a long post short, look [URL="http://www.gidnetwork.com/b-56.html"]here[/URL]

Member Avatar for xavier666
0
147
Member Avatar for Creator00

[QUOTE=Creator00]Could you please help me to solve this?[/QUOTE] Sure we could help you but at least show us what you have come up with so far

Member Avatar for xavier666
0
58
Member Avatar for imolorhe

[QUOTE=imolorhe]I have tried but can't [/QUOTE] Show us how much or whatever you have tried. Before moving into such questions on programming, think how you would solve the problem sequencially. Can you atleast do it without pointers, using array-index? [QUOTE=landonmkelsey]Assume matrices stored in column order[/QUOTE] In C, 2D Arrays lements …

Member Avatar for xavier666
0
176
Member Avatar for xavier666

The program generates a calendar for one year. The program only asks for the day on which 1st January falls from user. Notes : [LIST] [*]Compiler - Turbo C++ 4.5 [*]Leap year has been considered [*]The only reason for including [icode]conio.h[/icode] is because of [icode]clrscr()[/icode]. If somebody can give me …

Member Avatar for binkiwinki
-3
375

The End.