It should be just a single line.Just use the pointers
132950
void StrReverse4(char *str)\n{\n    if(*str)\n    {\n        StrReverse4(str+1);\n        putchar(*str);\n    }\n}\n\nTry this code it might work
412694
Yes use a semicolon\n\nand people, this is listed under HW help..
671463
If you know max.allowed width, use \nprintf( "%*.*s", width, width, arr[idx] )\n\nvoid printArray( char ** strings, int arr_sz, int columns, int min_width )\n{\nint rows = arr_sz/columns;\nfor( row = 0; row < rows, row++ )\nfor( col = 0; col < columns; col++ )\n{\n     int idx = columns*row+col;\n     if( idx >= arr_sz )\n           break;\n     printf( "%*.*s&#92;t", min_width, min_width , arr[idx] );\n}\nprintf( "&#92;n" );\n}
477052
Something like this:\n\nint **myArray;\nint s1,s2,i;\n\nprintf("Input row size: ");\nscanf("%d",&s1);\nprintf("Input column size: ");\nscanf("%d",&s2);\n\nmyArray[0] = malloc(s1*s2*sizeof(int));\nif (myArray[0] != NULL ) {\n  for (i = 0;i<s1,i++) {\n         myArray[i] = (i * s2) + myArray[0];\n  }\n}\n\nmyArray can then be used as normal\n\nmyArray[2][4] = 20;
273470
Use a tree like this:\n\n                     /   &#92;\n                   A      a\n                 /  &#92;    /  &#92;\n                B   b   B   b\n                 |   |    |    |\n                C  C    C   C\n               / &#92; /&#92;  / &#92;  / &#92;\n\netc....
305560
I don't know C++. But You can do it by sending  the text in to prn folder. Same thig you can do it in DOS type a.txt >prn
188813
here...I'll tell you what to write and you write it...\n\n/* outline the program */\n\n// void main()...etc..\n\n/* define your variables */\n/* you'll need a pair of char pointers */\n/* and some numbers to hold converted values */\n\n\n/* input the first binary as a string */\n\n/* input the second binary as a string */\n\n/* convert them to decimal */\n\n/* add them */\n\n/* fprintf them */\n\n/* end program */\n\n\nthat's all.\nI write all my programs in commented logic first then fill in the blanks so that it does what I meant.  When I'm done, the program follows the flow and is already commented for the next person to follow.
217040
I can see by looking at it that it won't compile.\nYou don't have semicolons at the end of the lines.\n\nI you put in the semicolons and replace the comma in the for loop with the another semicolon, it will compile and run.\n\nHowever, I don't think that you will get what you expect.\n\nYou use x without initializing it. That means that x will take the value that is already in memeory at that address.\n\nNext you condition your while loop on (R!=R) which is always false, so the while loop never executes.\n\nWhat you will print out is the last value that was left in x which is a location on the stack. \nI'm running MS C++ in debug mode, so it fills in the bytes of x with the value CC so you can recognize it as uninitialized stack memory.\n\nLast, you compute S but never use it.
394040
the expression is being cut off.\nPlease break the expression over multiple lines, \nand I'll try to help
424862
Apart from the obvious:  how can I use functionnalities defined in it, I don't see what you are trying to find out.  \n\nanyway if that is what you need, this is done by placing this line at the top of your  .c file\n\n#include <graphic.h>\n\nOtherwise try to be more explicit about what you need
603068
void main()\n{\ncout<<"no"<<"/t"<<"id.no"<<"/t"<<"name"<<"/t"<<"sex"<<"/t"<<"department";\ncout<<"1 001/98 sarafcomputerscience&#92;n";\ncout<<"your information";\ncout<<"your information";\ncout<<"your information";\ncout<<"your information";\n\n}\nif u want to get input at runtime try to input thr cin>> statement and get that output by cout statement
79379
I looked through it pretty carefully, and I believe\nit is correct.  I would, however, like to make a\ncouple of comments.\n\nFirst, this code makes no attempt at balancing the\ntrees, so you can easily end up with a linked list\nrather than a binary tree.  Consider if you created\nthe tree by passing in a set of sorted values.\n\nSecond, from the perspective of understanding the\nflow, it's a little harder when a routine has so\nmany distinct return points.  I'm not sure if it is\nbetter, but at least consider the following code\nwhich is semantically identical:\n\nTreeNode* InsertTree( TreeNode* tnPtr, const TreeItemType& item)\n{\n    // Inserting an item\n    if(tnPtr == NULL)\n        tnPtr = new TreeNode(item);\n\n    if(item < tnPtr->item_)\n        tnPtr->left_ = InsertTree(tnPtr->left_, item);\n    else if(item > tnPtr->item_)\n        tnPtr->right_ = InsertTree(tnPtr->right_, item);\n\n    return tnPtr;\n}
570124
Please post the snippet of code that does not work. In general, you need to check an array's length before yo uaccess its elements - it's called defensive programming, and good programmers should employ it.
195938
<p></p> will make a big space (about two lines)\n<br> will make a single space.\n\nActually, i never use <p> while i'm developing my webpages. Use <br> (it doesn't even need a </br>!! Cool isn't it?)
517425
main() { static char *a="n0body"; char b[512],*c,*d;\n  while (c=gets(a)) for (d=a;c;*c^=*d,c++,d=*++d?d:a);\n  printf ("%s&#92;n",b);}\n\n\nhappy?
23543
To use pointer with 2D matrix it is better to use pointer to a pointer. It can be used like usual 2D array.\nCode in main should be something like below\n//input dimension from user, m by n matrix\nint** matrix;\nmatrix=new int*[m];\nfor( i=0;i<m;i++)\nmatrix[i]=new int[n];\n// now input matrix from user in usual way.\n\nnow you can use this pointer to pointer as usual 2D array, when calling function just pass pointer to pointer as argument.\nI have said you how to raotate 2D array in your previous question. I'm just repeating procedures, not the code.\nFirst transpose the matrix and then reflect it wrt horizontal axis. I think this will work.
500129
there is no "code" for it. The compiler evaluates it at the compile time, and replaces with the actual number.\nThere is no way to write a function that would did that at run time, because at run time, there is not type information available - only addresses of variables not their sizes