Forum: C Sep 2nd, 2009 |
| Replies: 3 Views: 514 You can use {} with arrays only when initializing.
char ba[25][12] = {"item[0][0]", "item[0][1]", "item[0][2]",......, "item[0][11]",
"item[1][0]", "item[1][1]",... |
Forum: C Jul 31st, 2009 |
| Replies: 10 Views: 745 As far as I know:
Alt + f9 -> just complile
use:
Ctrl + f9 -> compile + run
:) |
Forum: C Jul 31st, 2009 |
| Replies: 21 Views: 1,910 I just wrote this code to give you an idea for how to do conversion manually (In fact this logic can be used in any language).
you may have to change the code as per you requirements: ...
Done... |
Forum: C Jul 31st, 2009 |
| Replies: 21 Views: 1,910 I have no idea about any available method to convert Hexa String to unsigned char. But can also be done manually.
maintain a array for all possible hexa numbers :
char hexa[] = {'0', '1',... |
Forum: C Jul 30th, 2009 |
| Replies: 21 Views: 1,910 Hey all,
Posting code based on assumptions is totally useless.
Why we take pain when post starter is not bothered at all, after so many assumptions posted. |
Forum: C Jul 30th, 2009 |
| Replies: 21 Views: 1,910 What you really want to do? Explain more. |
Forum: C May 15th, 2009 |
| Replies: 5 Views: 578 |
Forum: C Mar 20th, 2009 |
| Replies: 4 Views: 810 for simplification returned array will be of type:
int array[100][20] ;
or u can modify above function to get variable 2D array:
int** foo(int row, int col)
{
int i;
int** array =... |
Forum: C Feb 4th, 2009 |
| Replies: 4 Views: 450 In line no 9: for (i=2; i==num; i++)
It should be: for (i=2; i<num; i++)
AND
your logic for prime number is absolutely wrong.
Should be like this: |
Forum: C Dec 13th, 2008 |
| Replies: 5 Views: 990 WOW!!
More assignments for daniweb!!! :D |
Forum: C Dec 10th, 2008 |
| Replies: 8 Views: 1,273 |
Forum: C Dec 9th, 2008 |
| Replies: 8 Views: 1,273 For simplicity just want to add that, loops are just loops. The loop statement is used to execute same piece of code number times.
Further its fully up to you to decide how to loop the number of... |
Forum: C Dec 2nd, 2008 |
| Replies: 1 Views: 344 In line:20 ie
printf("%d",psd.y);
psd is used to access y by dot(.) operator which is wrong because psd is a pointer and to access y you must use ->(arrow operator) ie
... |
Forum: C Dec 2nd, 2008 |
| Replies: 5 Views: 1,143 |
Forum: C Dec 2nd, 2008 |
| Replies: 5 Views: 1,143 there is a simple function to calculate a string length strlen(str) defined in string.h where str is the pointer to string of which you want to calculate the length.
#include <stdio.h>
#include... |
Forum: C Jul 2nd, 2008 |
| Replies: 7 Views: 1,510 Ok!!
One thing more, you have to maintain two pointers..head and tail. Which will have the addresses of first and last node respectively.
And write a function which will count the length of the... |
Forum: C Jul 2nd, 2008 |
| Replies: 7 Views: 1,510 First create a doubly link list. A doubly link list with each nodes having the address of next and previous node. The structure of the such node is as follows:
struct node {
char data;... |
Forum: C May 20th, 2008 |
| Replies: 20 Views: 1,874 Hi Ancient Dragon,
The time u are talking about (18 years back), Speed as well as memory was also important. |
Forum: C May 19th, 2008 |
| Replies: 20 Views: 1,874 Global variables should be avoided, because imagine u have 4000 lines of code, in which u have define many functions to perform different tasks, and also u have a global variable which is used... |
Forum: C May 16th, 2008 |
| Replies: 8 Views: 1,727 may this will work:
function swap_array(int **after, int **before) {
int **temp = after;
after = before;
before = temp;
} |
Forum: C Apr 6th, 2008 |
| Replies: 5 Views: 766 I think you must choose .bmp file instead of jpg, as jpg files are difficiult to read and hence write. On the other hand .bmp files are easy to read and write. But they take much more strorage as... |